How To Deploy Python Selenium Script in AWS Lambda in 2022

preview_player
Показать описание

In this video, I am showing you how to create a serverless Python Selenium script and deploy successfully your Python Selenium script in AWS Lambda. We are also going to utilize AWS lambda layers to provide a convenient way to package libraries and other dependencies that you can use with your Lambda functions. Using layers reduces the size of uploaded deployment archives and makes it faster to deploy your code. A layer is a . zip file archive that can contain additional code or data.

Selenium is an open-source tool that automates web browsers. It provides a single interface that lets you write test scripts in programming languages like Ruby, Java, NodeJS, PHP, Perl, Python, and C#, among others.

AWS Lambda is serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers

Donate
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Bitcoin Wallet: bc1q05j8gcnq4mzvgj603cxdc8xxck4jgnu2ljsrt4
Ethereum Wallet: 0x5e7BD4f473f153d400b39D593A55D68Ce80F8a2e

Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Tags:
- Python Selenium Tutorial
- Full Course Selenium
- Python Selenium
- Web Scraping Full Course
- Python Selenium Web Scraping Full Course

#selenium #aws #python
Рекомендации по теме
Комментарии
Автор

Hello
I've followed your video carefully and am pretty sure I didn't miss any detail or do anything wrong. However, I got the error:
"errorMessage": "Unable to import module 'main': No module named 'selenium'",
"errorType": "Runtime.ImportModuleError",
"stackTrace": []
I really hope you can help me with this, I've turn the internet upside down, but so far nothing works

minhthieu
Автор

Can't thank you enough for this, I am gonna write a blog and add this video there.

celeb_life_in_
Автор

Hi thanks for the video, this was something that frustrated me in may and dropping it all together. There are plenty of sites with the information, BUT the most important element: this ONLY works with Python 3.7 and Selenium 3.8.
Following the security mindset, everything back in may was trying to use the latest version =)

lboesch
Автор

what an incredible tutorial, priceless information very hard to find over the internet.

pablorosa
Автор

Really awesome tutorial, even I was able to get this up and running!

richardhoppe
Автор

Hi Michael,
Thank you so much for such a good video. Recently AWS lambda announced that lambda will not be maintaining Python3.7 anymore . Need to move my code to python 3.11. Not sure how to do this. Can you please make a video to use selenium chrome driver with python 3.11 in lambda? Or can you suggest me a way to solve this?

bindureddy
Автор

Hi Michael, can you make another video on selenium using container implementation to build lambda? It would be a life saver! Thanks in advance

umair.a
Автор

SUPERB !! i just need to pay attention to the zip path structure, thanks a lot!

rosoldamian
Автор

How did you manage to make headless-chromium turn from 102, 6 MB uncompressed to 5, 1 MB uncompressed at the 9:50 mark? It's like the number just changes without any explanation. How are you able to upload headless-chromium and chromedriver without exceeding the Layer size limit of 50MB? The exact same file uncompressed on my system is 100MB as well. I'd prefer not to have to use S3

austinsketches
Автор

Hi, Which selenium version is compatible with Python 3.9 lambda version??

ameeshagupta
Автор

thank you so much.
It was my big problem. you saved my time.!

qwertyrtgy
Автор

Hello bro, Thanks for ur great work, but I got a question
AWS Lambda end of support for Python 3.7

so it's not supported anymore at least for layers, do u have another way to get around with this, I would really appreciate this alot!

Thanks in advance !

شروحاتتقنية-ثز
Автор

I used the same versions but instead I download chromedriver and headless-chromium from s3 to my tmp files (because of the limit size of layers). I got this error: Message: 'chromedriver' executable may have wrong permissions. Do you know how to fix this?

AmiUstilovsky
Автор

Hello, thanks for sharing. I tested it and it worked perfectly as in the video, but I have a question. I couldn't get it to work with newer versions of the libraries. Why does this happen? Today I have several codes implemented with the latest versions and it would be a lot of work to adapt the old versions. Tks

mauriciobertolucci
Автор

Thank you for your work. I want to run Selenium4.8. and Request I have a urllib3 library conflict. what could be the problem?

serggurzhy
Автор

Hi, I have this error: "errorMessage": "2024-03-12T04:26:45.989Z Task timed out after 20.01 seconds". I followed all steps but this error appears.

kevinalarconqusipe
Автор

Hi Michael, in a few comments you talk about an updated video that doesn't rely on a deprecated version of Python. If this video exists, can you please provide a link here

jennydavies
Автор

Thanks for sharing this, incredibly helpful!

asdfghjkl
Автор

Hello, thanks for the video, but but when i am adding the layer of chormdrive there, i got a error 'Layers consume more than the available size of 262144000 bytes'

JoshNn-wb
Автор

aws lambda gonna end support for Python 3.7. Also it seems like the current setup we got cannot be migrated to python 3.11. I tried to migrate but chromedriver couldnt start. How should we go from here, Michael?

kenchop-bo
welcome to shbcf.ru