Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is amazon lambda suitable for web scraping?

If I create a function to get webpages. Will it execute it on different IP per execution so that my scraping requests dont get blocked?

like image 950
Anique Tahir Avatar asked Mar 19 '26 16:03

Anique Tahir


1 Answers

Yes, lambda by default executes with random IPs. You can trigger it using things like event bridge so you can have a schedule to execute the script every hour or similar. Others can possibly recommend using API Gateway, however, it is highly insecure to expose API endpoints available for anyone to trigger. So you have to write additional logic to protect it either by hard coded headers or say oauth.

like image 121
Matthew Avatar answered Mar 21 '26 16:03

Matthew