0

I am trying to follow the instructions on this page: How do I create a Lambda layer using a simulated Lambda environment with Docker? on a Windows 7 environment.

I followed all of these steps:

  • installed Docker Toolbox
  • created a local folder 'C:/Users/Myname/mylayer' containing requirements.txt and python 3.8 folder structure
  • run the following commands in docker toolbox:
    cd c:/users/myname/mylayer
    docker run -v "$PWD":/var/task "lambci/lambda:build-python3.8" /bin/sh -c "pip install -r requirements.txt -t python/lib/python3.8/site-packages/; exit"

It returns the following error:
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

I don't understand what I am doing wrong. Maybe something obvious (I'm a beginner) but I spent the whole day trying to figure it out and it is getting quite frustrating. Appreciate the help!

1 Answer 1

1

I ran the following in Windows 10 Powershell and it worked

docker run -v ${pwd}:/var/task "amazon/aws-sam-cli-build-image-python3.8" /bin/sh -c "pip install -r requirements.txt -t python/lib/python3.8/site-packages; exit"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.