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

"Unexpected status from PUT request ..." when using aws lightsail push-container-image #95

Open
kahwooi opened this issue Nov 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kahwooi
Copy link

kahwooi commented Nov 8, 2024

AWS CLI version:

aws --version
aws-cli/2.19.2 Python/3.12.6 Windows/11 exe/AMD64

AWS push image command:

aws lightsail push-container-image --region ap-southeast-1 --service-name multisites --label latest --image fileserver:latest --debug

Response with error:

[7BskipStatuses: file has already been closed
failed commit on ref "manifest-sha256:b952282490bfea5fafd5e29c3fbf34ed76c75fb3a6f27f426f15c16ad56086ad": unexpected status from PUT request to https://01234567890.dkr.ecr.ap-southeast-1.amazonaws.com/v2/sr/manifests/179925523046539500-6s3mh2aluueng: 400 Bad Request
2024-11-08 08:25:23,788 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "awscli\clidriver.py", line 499, in main
  File "awscli\clidriver.py", line 634, in __call__
  File "awscli\customizations\commands.py", line 206, in __call__
  File "awscli\customizations\lightsail\push_container_image.py", line 65, in _run_main
  File "subprocess.py", line 571, in run
subprocess.CalledProcessError: Command '['lightsailctl', '--plugin', '--input-stdin']' returned non-zero exit status 1.

Command '['lightsailctl', '--plugin', '--input-stdin']' returned non-zero exit status 1.
@kahwooi kahwooi changed the title Failed to push container image, failed commit on ref "manifest-s ... ": unexpected status from PUT request to https://041381048620.dkr.ecr..... Failed to push container image, failed commit on ref "manifest-s ... ": unexpected status from PUT request to https://01234567890.dkr.ecr..... Nov 8, 2024
@paxan paxan added the triage Need to investigate label Nov 8, 2024
@paxan paxan changed the title Failed to push container image, failed commit on ref "manifest-s ... ": unexpected status from PUT request to https://01234567890.dkr.ecr..... "Unexpected status from PUT request ..." when using aws lightsail push-container-image Nov 21, 2024
@paxan
Copy link
Member

paxan commented Nov 21, 2024

Hi @kahwooi

We think this issue happens when an image, that was built while using Docker's containerd image store feature, is being pushed to Lightsail-managed container image repository (basically, when you use aws lightsail push-container-image ... command).

Workaround

Please try disabling "containerd image store" feature. The screenshot below shows how it looks when it is enabled. Ensure it is unchecked and press "Apply & restart" button.

image

Once that feature is disabled, please build your container app and then push it. For example, if the local image ref is blog-app, then you'll do something like this:

$ docker build --platform=linux/amd64 -t blog-app .

$ aws lightsail push-container-image --image blog-app --label server --service-name my-blog

Please comment here if this workaround helps or if it doesn't.

Meanwhile, we are investigating a solution on our end, such that customers won't need this workaround.

Thank you for reporting this issue and being a Lightsail customer.

@paxan paxan added bug Something isn't working and removed triage Need to investigate labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants