Skip to main content
Solved

How to add tags to an S3 object?

  • June 16, 2020
  • 3 replies
  • 134 views

someonesomeones

I'm uploading objects to my S3 bucket using the S3Connector (Action: Upload) and I see that I can add metadata but it looks like I can't add any tags for my new object. The lifecycle rules in my bucket depend on my objects being properly tagged. Is there any way to achieve this?

Best answer by david_r

I've not tested it myself, but look into if it's possible to use the Metadata headers in the S3Connector:

http://docs.safe.com/fme/2020.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/s3connector.htm

https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-object-metadata.html

Last resort would be to use the boto3 libraries (they're already installed with FME) in a PythonCaller to manually add tags after the S3Connector.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • Best Answer
  • June 16, 2020

I've not tested it myself, but look into if it's possible to use the Metadata headers in the S3Connector:

http://docs.safe.com/fme/2020.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/s3connector.htm

https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-object-metadata.html

Last resort would be to use the boto3 libraries (they're already installed with FME) in a PythonCaller to manually add tags after the S3Connector.


someonesomeones

I've not tested it myself, but look into if it's possible to use the Metadata headers in the S3Connector:

http://docs.safe.com/fme/2020.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/s3connector.htm

https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-object-metadata.html

Last resort would be to use the boto3 libraries (they're already installed with FME) in a PythonCaller to manually add tags after the S3Connector.

When using custom metadata headers the key-value pairs still fall under the "Metadata" property of the object and not the "Tags" property. It would be nice to have a new section in the S3Connector similar to the Metadata one but specifically for tags.

For now, I think the best option is to go with the PythonCaller approach. Thanks!


david_r
Celebrity
  • June 16, 2020

When using custom metadata headers the key-value pairs still fall under the "Metadata" property of the object and not the "Tags" property. It would be nice to have a new section in the S3Connector similar to the Metadata one but specifically for tags.

For now, I think the best option is to go with the PythonCaller approach. Thanks!

Interesting, thanks for sharing that.