- Newest
- Most votes
- Most comments
Yes, it is possible to add tags to objects that are being copied to an S3 bucket using AWS DataSync. You can configure this during the task creation or modification in DataSync.
Here's how you can add tags to objects during DataSync transfer:
- When creating or editing a DataSync task:
- Go to the "Configure settings" section
- Look for "Tags" under "Object configuration"
- Enable "Add tags to transferred objects"
- Add your desired key-value pairs for the tags
You can do this through:
- AWS Management Console
- AWS CLI
- AWS SDK
Example using AWS CLI:
aws datasync create-task \ --source-location-arn "source-arn" \ --destination-location-arn "destination-arn" \ --options '{"ObjectTags": "PRESERVE"}'
Important notes:
- You can preserve existing tags from the source location
- You can add new tags during transfer
- Tags will be applied to all objects transferred in that task
- There are limits to the number of tags per object (50 tags per object in S3)
answered a year ago
You're correct - the "Tags" option you're seeing in the DataSync task creation is for tagging the DataSync task itself, not the objects being transferred to S3.
For tagging objects during transfer, you have a few alternative approaches:
- Use S3 Bucket Default Tags:
-
Go to your destination S3 bucket -
Under "Properties" -
Look for "Tags" section -
Add default tags that will be applied to all new objects
- Use S3 Lifecycle rules with tags
- Post-transfer tagging options:
-
AWS S3 Batch Operations -
AWS Lambda function triggered by S3 events -
AWS CLI or SDK scripts
If you specifically need to tag objects during the transfer process, you might want to consider using AWS CLI, SDK or other transfer tools that provide more granular control over object metadata and tags.
answered a year ago
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 10 months ago

thanks for your response.. unfortunately I am unable to find said option
Under DataSync >>Tasks>>Create task I see
Tags - optional A tag is a label that you assign to an AWS resource. Each tag consists of a key and an optional value.
But this did not work as expected.