Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdk-cli deploy: fail: docker push to ecr unexpected status from PUT request 400 Bad Request #33264

Open
1 task
james-g-stream opened this issue Feb 1, 2025 · 1 comment
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry bug This issue is a bug. effort/medium Medium work item – several days of effort p3

Comments

@james-g-stream
Copy link

Describe the bug

when trying to run cdk deploy with an ecs.ContainerImage.fromAsset() I'm getting a fail: docker push to ecr unexpected status from PUT request 400 Bad Request. I've uninstalled and reinstalled docker, deleted the image asset it references from ecr and nothing seems to be working. cdk version 2.177.0 (build b396961)

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

ckd successfully push the docker image to ecr

Current Behavior

the docker push is returning 400 bad request and failing cdk deploy

Reproduction Steps

yarn cdk deploy

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.177.0 (build b396961)

Framework Version

No response

Node.js Version

v20.15.0

OS

macOS 14.5

Language

TypeScript

Language Version

No response

Other information

No response

@james-g-stream james-g-stream added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 1, 2025
@github-actions github-actions bot added the @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry label Feb 1, 2025
@pahud
Copy link
Contributor

pahud commented Feb 1, 2025

Was it working prior to 2.177.0 but failing in 2.177.0 ?

400 bad request generally indicates bad requests and it could be many different causes.

Are you able to simply push a local image to your ECR using your current AWS identity from local?

What's happening in CDK is essentially using $CDK_DOCKER or docker executive to docker build and push to ECR assets and handle required get-login-password for you. The image assets uploading process could fail due to network issue as well.

Let me know if you are able to manually push an random image to ecr?

@pahud pahud added effort/medium Medium work item – several days of effort p3 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry bug This issue is a bug. effort/medium Medium work item – several days of effort p3
Projects
None yet
Development

No branches or pull requests

2 participants