- Newest
- Most votes
- Most comments
This behavior is not a defect, but rather the expected outcome based on how the s3:ExistingObjectTag condition key works in IAM policies for Amazon S3.
The s3:ExistingObjectTag condition key applies only to operations that interact with existing objects and their tags. It does not apply to operations that create new objects or modify the object itself (rather than just its tags).
In your scenario:
-
Operations like GetObject, GetObjectTagging, DeleteObjectTagging, PutObjectTagging, and GetObjectAcl are successful (return 200) because they are operations that interact with an existing object or its tags. The policy allows these actions when the specified tag exists on the object.
-
Operations like PutObject, PutObjectAcl, and DeleteObject return a 403 (Access Denied) because:
- PutObject: This operation creates a new object, so the s3:ExistingObjectTag condition doesn't apply (there's no existing object to check tags on).
- PutObjectAcl: This modifies the object's ACL, not its tags, so the condition doesn't apply.
- DeleteObject: While this operates on an existing object, allowing this operation based solely on a tag could lead to unintended deletions. Amazon S3 requires more explicit permissions for delete operations.
To allow these operations, you would need to grant permissions using different condition keys or remove the condition entirely, depending on your security requirements.
If you need to allow all S3 actions including those that are currently denied, you might consider using a different approach to permissions or adding separate statements for those specific actions without the tag condition.
Remember, when using condition keys like s3:ExistingObjectTag, it's important to understand which operations they apply to and how they interact with different S3 actions to ensure your IAM policies provide the intended level of access.
Sources
How Amazon S3 works with IAM - Amazon Simple Storage Service
Troubleshoot IAM policies - AWS Identity and Access Management
Relevant content
asked a year ago

https://aws.permissions.cloud/tag/s3:ExistingObjectTag/%3Ckey%3E on this document it shows that we can have s3:ExistingObjectTag condition on put and delete api requests
Hi, the document that you mention is not managed by AWS. We cannot check and validate all such docs. The best is to always and only refer to AWS public documentation to validate your designs.