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

The latest codebuild/amazonlinux2-x86_64-standard includes SAM CLI 1.78.0 blocking build/deploy for java17 Lambda #637

Closed michalrames closed 1 year ago

michalrames commented 1 year ago

Describe the bug Despite using the latest codebuild image, I am unable to build & deploy SAM template for a java17 Lambda runtime.

To Reproduce Steps to reproduce the behavior:

  1. Create SAM template with AWS::Serverless::Function and Runtime: java17
  2. Create CodeBuild pipeline with SAM BUILD and SAM deploy
  3. Pipeline fails with Error: 'java17' runtime is not supported due to using SAM CLI 1.78

Expected behavior Build succeeds thanks to using SAM CLI 1.83 (or whichever version started supporting java17 runtime)

Platform (please complete the following information):

Additional context This is not an issue with runtime support in the docker image - the docker image already contains java17 runtime.

The issue can be worked around by upgrading the SAM CLI in the build pipeline (pip install --upgrade aws-sam-cli), but this adds to the build time and is undesirable

michalrames commented 1 year ago

Looks like the image now runs SAM CLI 1.83 (which resolves this issue), but https://gallery.ecr.aws/codebuild/amazonlinux2-x86_64-standard doesn't show any new build of the image - cannot confirm & close.

subinataws commented 1 year ago

New version is published on public ECR now: public.ecr.aws/codebuild/amazonlinux2-x86_64-standard:5.0