-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
aws s3 cp exit code 255: botocore.awsrequest.AWSRequest object at #8988
Comments
Hello @fishcharlie, thanks for reaching out. I have replicated the command you ran and did not get the same error. For a further look, please include the full debug logs by adding --debug to your command and redacting any sensitive information. Thanks! |
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
@fishcharlie Try to add a region while configuring the credential. It will work |
Even with a bad command, the output shouldn't be |
Hi @dmartin-isp, we definitely agree that's not intended output. We'll need debug logs as requested above, or a simple repro to investigate further though. I don't believe anyone internally has been able to hit this case yet. |
Managed to reproduce this consistently in our CI environment only (GHA). Logs: https://gist.github.com/nickdbush/36efe6752d78cdd261a07fec4e39da2a We're mocking S3 with adobe/S3Mock. Development environment is macOS and GHA is Linux. Without |
Thanks for the logs, @nickdbush! We found where the erroneous message is leaking in for the CLI, there's some missing error handling for region detection through IMDS. We can improve the message being returned, but the actual failure is coming from an IMDS response on your host. Is that also being virtualized/mocked? The request that's failing is a very simple PUT with one header to get an IMDS v2 token (more info) for added security. The IMDS instance you're contacting is returning a 400 which may be that it doesn't support this API (if third-party) or something else unexpected is happening.
We'll start looking at fixing the output. While we're doing that, any more info on if anyone encountering this is using a third-party IMDS emulator? If not, could you provide more info on your specific setup. We wouldn't anticipate this happening in a standard ECS/EC2 setup. |
@nateprewitt yeah we were missing a region flag for the CLI on our end, which ended up unblocking us! no other services mocked except S3, and given that it was only happening in Actions, it is a bit of a puzzle of what may have been responding with that 400. cheers :^) |
Describe the bug
When running
aws s3 cp code.zip s3://my-bucket/folder/code.zip
, it exits with code 255 and prints the following:Regression Issue
Expected Behavior
It to successfully upload the file.
Current Behavior
Fails with exit code 255 and prints:
Reproduction Steps
Honestly I have no idea what is even going wrong. aws cli doesn't even print a good error messages. So I have no idea how to even reproduce this or what is even going wrong...
Would be more than happy to help debug further but need some guidance here since the error message is so poor.
Possible Solution
No response
Additional Information/Context
CLI version used
2.18.0
Environment details (OS name and version, etc.)
Python/3.12.6 Linux/6.5.0-1025-azure exe/x86_64.ubuntu.22
The text was updated successfully, but these errors were encountered: