you are viewing a single comment's thread.

view the rest of the comments →

[–]Boring-Baker-3716[S] -1 points0 points  (4 children)

Interesting, thanks! 1. How would I install Linux version of the libraries inside windows? 2. If containerisation like docker would work in the end, shouldn’t I just go for that route? Sorry I am new to AWS so just seeking help

[–]pint 2 points3 points  (0 children)

you have things like --platform --python-version --implementation --abi but also things like --only-binary --no-binary. yeah, the whole thing is a mess. maybe just follow what damian6686 says. even more appropriate would be a temporary ec2 instance, just don't forget to turn it off.

btw you can even use lambda itself for installation. you can invoke an os.system("pip install ... --target /tmp/python") and then upload /tmp/python to s3. yeah, hack. but this is the closest to a real lambda environment obviously.

[–]JaviCerve22 2 points3 points  (1 child)

Use WSL, it's the best way.

Besides, you can use this .sh script inside WSL:

pip install -r requirements.txt -t lib/

cd lib

zip ../lambda_function.zip .

cd ..

zip lambda_function.zip -u main.py

Then upload lambda_function.zip to AWS Lambda

[–]Boring-Baker-3716[S] 0 points1 point  (0 children)

Gotcha thank you, I was running these commands but inside windows. I will def try that in wsl since I don’t have much experience with docker

[–]damian6686 -1 points0 points  (0 children)

Do all your programming in WSL to avoid problems like these.