-
Notifications
You must be signed in to change notification settings - Fork 343
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
s3_object get operations fail with "object not found" #1548
Comments
Thanks for taking the time to open this issue. I've been able to reproduce the issue and I've opened #1549 which should fix the issue. That said, looking specifically at the Amazon AWS documentation, object names should not include the leading |
…1549) s3_object - fix regression related to leading / in object key names SUMMARY fixes #1548 S3 object key names should not include a leading / (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html). However, for historical reasons we've supported them (we just pruned them out) this pruning was dropped in 6.0.0 without warning. For the sake of simplifying things and moving closer to the actual AWS resources, deprecate pruning out the leading /. (Arbitrarily modifying inputs and resource names tends to lead to strange edge cases) ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_object ADDITIONAL INFORMATION Regression of ansible/ansible#30576 / ansible/ansible#30579 Reviewed-by: Alina Buzachis
…1549) s3_object - fix regression related to leading / in object key names SUMMARY fixes #1548 S3 object key names should not include a leading / (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html). However, for historical reasons we've supported them (we just pruned them out) this pruning was dropped in 6.0.0 without warning. For the sake of simplifying things and moving closer to the actual AWS resources, deprecate pruning out the leading /. (Arbitrarily modifying inputs and resource names tends to lead to strange edge cases) ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_object ADDITIONAL INFORMATION Regression of ansible/ansible#30576 / ansible/ansible#30579 Reviewed-by: Alina Buzachis (cherry picked from commit b53f7d7)
…1549) (#1554) [PR #1549/b53f7d72 backport][stable-6] s3_object - fix regression related to leading / in object key names This is a backport of PR #1549 as merged into main (b53f7d7). SUMMARY fixes #1548 S3 object key names should not include a leading / (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html). However, for historical reasons we've supported them (we just pruned them out) this pruning was dropped in 6.0.0 without warning. For the sake of simplifying things and moving closer to the actual AWS resources, deprecate pruning out the leading /. (Arbitrarily modifying inputs and resource names tends to lead to strange edge cases) ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_object ADDITIONAL INFORMATION Regression of ansible/ansible#30576 / ansible/ansible#30579 Reviewed-by: Mark Chappell
Thanks for much for taking a look. Agree with removing the leading /. I think when we originally put these tasks together, we heavily relied on the documentation which says to included it. Your PR attentions a controlled, phased and informed approach of moving away from this though. Appreciate you taking a look so quickly. Cheers. |
Summary
On version 6.0.0, using the s3_object module to get objects from S3 buckets fails with "object not found". This was previously working using version 5.4.0.
Breaking configuration (NOTE: This configuration WORKS on 5.4.0):
BREAKING
When removing the prefixed "/" on the object parameter, the get operation is successful.
SUCCESSFUL
The documentation here - (https://ansible-collections.github.io/amazon.aws/branch/stable-6/collections/amazon/aws/s3_object_module.html#ansible-collections-amazon-aws-s3-object-module) - doesn't mention anything about removing the prefixed forward slash.
Error output:
Issue Type
Bug Report
Component Name
s3_object
Ansible Version
Collection Versions
AWS SDK versions
Configuration
$ ansible-config dump --only-changed
OS / Environment
PRETTY_NAME="Ubuntu 22.04.2 LTS"
Steps to Reproduce
Example breaking retrieve task:
Expected Results
When I run the above task, I expect the get operation to succeed.
This configurations WORKS on 5.4.0. BREAKING on 6.0.0. Root cause seems to be leading "/" in object parameter. Documentation states it is required.
Actual Results
Broken results on 6.0.0 WITH leading "/" in object parameter:
WORKING results on 6.0.0 WITHOUT leading "/" in object parameter:
Code of Conduct
The text was updated successfully, but these errors were encountered: