6

Description: I am trying to use sam build with the following requirements but its throwing the error: Pythonpipbuilder: resolve dependencies - list index out of range

  • pyotp
  • ulid-py
  • aws_encryption_sdk
  • boto3
  • requests
  • attrs
  • cryptography

Steps to reproduce the issue:

  1. Create a virtual env.
  2. Activate virtual env in a terminal
  3. pip install -r requirements.txt
  4. sam build

Observed result: Build Failed Error: PythonPipBuilder:ResolveDependencies - list index out of range

Expected result: Build Succeeded

Additional environment details Amazon Linux 2 Workspace Python3.8

2 Answers 2

7

If you encounter this problem you have to use sam build --use-container in other to go around the problem with the requirements.txt Its a well known issue and a GitHub issue has been submitted https://github.com/aws/aws-lambda-builders/issues/229#issuecomment-841407255

Sign up to request clarification or add additional context in comments.

Comments

0

I had the same failure when my serverless application specified Runtime as python3.6, while the environment was using Python3.7.

1 Comment

thank you for your answers, it seems to be a well known issue with some dependencies and it requires the user to use sam build --use-container

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.