aws / aws-codebuild-docker-images

Official AWS CodeBuild repository for managed Docker images http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html
Other
1.11k stars 973 forks source link

python3.11 not supported with amazonlinux2-aarch64-standard:3.0 #662

Closed Rodriguevb closed 7 months ago

Rodriguevb commented 1 year ago

Describe the bug The amazonlinux2-aarch64-standard:3.0 (current latest image version) uses SAM CLI v1.79.0. However, the latest python version is 3.11 and this version of SAM does not support python3.11.

To Reproduce

buildspec.yml

version: 0.2
phases:
  install:
    runtime-versions:
      python: latest
  build:
    commands:
      - sam --version
      - sam build --template-file template.yml

Logs

[Container] 2023/08/07 09:03:12 Processing environment variables
[Container] 2023/08/07 09:03:12 Resolved 'python' runtime alias 'latest' to '3.11'.
[Container] 2023/08/07 09:03:12 Selecting 'python' runtime version '3.11' based on manual selections...
...
[Container] 2023/08/07 09:03:13 Running command sam --version
SAM CLI, version 1.79.0
... 
Building codeuri: /codebuild/output/src2369554271/src/lambda runtime: python3.11 metadata: {} architecture: arm64 functions: Converter

Build Failed
Error: 'python3.11' runtime is not supported
...

Platform (please complete the following information):

Question How can I force SAM to use the latest version ? Or can you increase the SAM version used by default?

purplexed commented 1 year ago

Hey @Rodriguevb ,

This error is not related to the codebuild runtime, but to the sam cli version being outdated. If you'd run pip install --upgrade aws-sam-cli before the sam build that should do the trick.

However, I believe that the ticket shouldn't be closed, as the image should definitely have the SAM CLI updated to be able to support the runtimes the image does.

mdgm88 commented 10 months ago

Any update on this?

Dylan-AWS commented 7 months ago

This issue is addressed by #697