Pythonpipbuilder: resolve dependencies – list index out of range

Question:

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

Answer:

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

Leave a Reply