Skip to content

Lambda SAM build (ARM64 archi) - Python libs fails #3525

@gabriele-l

Description

@gabriele-l

I am trying to build a Lambda function using sam (1.36.0) within CodeBuild, the Lambda has arm64 architecture as well as the CodeBuild configuration (aws/codebuild/amazonlinux2-aarch64-standard:2.0).
Using Python 3.8.10
I have in my requirements.txt the dependencies below:

PyYAML
pandas
s3fs
xlsxwriter

CodeBuild throws error:

Build Failed
Error: PythonPipBuilder:ResolveDependencies - {wrapt==1.13.3(sdist)}

My build details:

version: 0.2
phases:
  install:
    runtime-versions:
      python: 3.8
    commands:
      - which python
      - python --version
      - pip install aws-sam-cli --upgrade
      - sam build --template $(pwd)/template.yaml
      - aws cloudformation package --template $(pwd)/.aws-sam/build/template.yaml --s3-bucket XXXXX --s3-prefix PREFIX_PATH_DUMMY --output-template-file product.template-eu-west-1.yaml
      - sam deploy --template-file ./product.template-eu-west-1.yaml --stack-name DUMMY --capabilities CAPABILITY_IAM

I also manually tested this on t4g Graviton instance, doing pip install requirements.txt, there it works. But when using CodeBuild it fails.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions