aws-sam-build-images icon indicating copy to clipboard operation
aws-sam-build-images copied to clipboard

Bug: export command not found in aws ecr image public.ecr.aws/sam/build-python3.10:latest

Open vickyasokan26 opened this issue 11 months ago • 1 comments

Description:

When my cdk diff command builds a docker to perform the comparison of Cloud formation template it fails .

We think it is because of the latest update to poetry from 1.8.5 to 2.0.0 which has introduced a breaking change in how plugins are used.

Steps to reproduce:

Just create a aws lambda python function in aws-cdk typescript and run npx cdk diff.

Observed result:

**Bundling asset CheckLambdaStack/CheckLambda/Code/Stage... The command "export" does not exist. Error: Failed to bundle asset RTCDevCheckLambdaStack/RealTimeCDevCheckLambda/Code/Stage, bundle output is located at /builds/vodafoneziggodi/di/aap/advanced_analytics/telemetry/project-techrootcauses/rt_cdev_check/cdk.out/asset.2cbd48f694c3b903a60424282b7108e20afc54cd86c398776343f10a0967c1cc-error: Error: docker exited with status 1 --> Command: docker run --rm -u "0:0" -v "/builds/vodafoneziggodi/di/aap/advanced_analytics/telemetry/project-techrootcauses/rt_cdev_check/rt_cdev_check_lambda_handler:/asset-input:delegated" -v "/builds/vodafoneziggodi/di/aap/advanced_analytics/telemetry/project-techrootcauses/rt_cdev_check/cdk.out/asset.2cbd48f694c3b903a60424282b7108e20afc54cd86c398776343f10a0967c1cc:/asset-output:delegated" -w "/asset-input" cdk-9f0cf53d290dd98449b12b73c74495f5b6da66d5949995ecccb80d3d9a23433b bash -c "poetry export --with-credentials --format requirements.txt --output requirements.txt && python -m pip install -r requirements.txt -t /asset-output && cp -rT /asset-input/ /asset-output" **

Expected result:

It should be able to build the image without issues.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Amazon Linux
  2. If using SAM CLI, sam --version: NA
  3. AWS region: eu-west-1

vickyasokan26 avatar Jan 09 '25 10:01 vickyasokan26

Hi thanks for reporting, could you help with the following questions

  • where latest update to poetry from 1.8.5 to 2.0.0 happens?
  • does this issue only apply to python3.10? Or any other python images?

roger-zhangg avatar Jan 24 '25 20:01 roger-zhangg

feel free to re-open if still relavent

roger-zhangg avatar Sep 08 '25 18:09 roger-zhangg