You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation suggests that metadata can be set when mode=copy but this doesn't appear to be the case. I cannot get metadata to be changed on the copy whatever I do.
This appears to be because the module doesn't override (or provide the option to override) the MetadataDirective parameter, which defaults to COPY (search for it in the boto3 docs).
I first observed this trying to copy an object while modifying its metadata (not shown here, but the copy always has the same metadata as its source). I suspect the reason is that objects have system defined metadata called Content-Type (visible in the console), which in essence is copied due to the directive, but this is speculation on my part.
Additionally, please consider updating the examples which show metadata as a comma separated string while the documentation lists it as a dict (which works as shown below).
Summary
The documentation suggests that metadata can be set when
mode=copy
but this doesn't appear to be the case. I cannot get metadata to be changed on the copy whatever I do.This appears to be because the module doesn't override (or provide the option to override) the
MetadataDirective
parameter, which defaults toCOPY
(search for it in the boto3 docs).I first observed this trying to copy an object while modifying its metadata (not shown here, but the copy always has the same metadata as its source). I suspect the reason is that objects have system defined metadata called
Content-Type
(visible in the console), which in essence is copied due to the directive, but this is speculation on my part.Additionally, please consider updating the examples which show
metadata
as a comma separated string while the documentation lists it as a dict (which works as shown below).Issue Type
Bug Report
Component Name
s3_object
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Arch Linux
Steps to Reproduce
Expected Results
metacopy
should have its metadata set, likewithmeta
does.Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: