Coder Social home page Coder Social logo

Comments (2)

cptrfan avatar cptrfan commented on September 26, 2024

I just encountered the exact same issue and was able to resolve it.
In case anyone is experiencing the same issue, I will leave a note here on how I resolved it.

Basically, the issue was when I zipped the files, I was selecting the root folder and zip it.
However, this will create another folder layer in the zip file.
You can verify this by unzipping the zip file you've just created, and compare with the original unzipped folder; you will see extra folder layer there before getting to the script files like easy_install.py or lambda_function.py.

So the solution was, instead of selecting one folder and zip it, go into the folder and select all the folders and .py files and zip them.
I also found that Windows default zip application does not always maintain the Linux file attributes,
so zipping the files on Ubuntu worked for me.

On Ubuntu,

# Install zip and unzip
sudo apt-get install zip unzip

# Download lambda_function.zip from this repository
wget https://github.com/ManivannanMurugavel/selenium-python-aws-lambda/raw/master/lambda_function.zip

# Create a folder to store the content of lambda_function.zip
mkdir lambda_function

# Unzip lambda_function.zip into the folder you just created
unzip lambda_function.zip -d lambda_function/

# Go into the folder
cd lambda_function

# Now, modify lambda_function.py however you want.

# Create a new zip file with your changes
zip -r {your_desired_destination_folder}/lambda_function.zip *

Then, upload the newly created lambda_function.zip to your AWS S3.
Hope this helps!

from selenium-python-aws-lambda.

ManivannanMurugavel avatar ManivannanMurugavel commented on September 26, 2024

from selenium-python-aws-lambda.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.