2 Answers
- Newest
- Most votes
- Most comments
2
Hello.
Even with Object Lock, you can still tag existing S3 objects.
I tried the following command in my AWS account.
The target S3 bucket has Object Lock enabled in compliance mode.
As a result, the tag was set on the object.
aws s3api put-object-tagging --bucket cloudtrail-12345689012 --key AWSLogs/123456789012/CloudTrail/ap-northeast-1/2025/01/01/123456789012_CloudTrail_ap-northeast-1_20250101T0000Z_hoge.json.gz --tagging '{"TagSet":[{"Key": "testtag","Value": "hoge"}]}'
1
Yes, you can add tags to an object even if that object has a legal hold or is under a retention period in Compliance mode. You can modify the metadata of the object but not the data of the object itself. That is, you cannot delete or override the data.
Thank you for taking the time to answer my question.
Relevant content
asked 6 months ago

You can see that the tags are set as follows:

Thank you for taking the time to answer my question.