Identity and Access Management

An S3 bucket contains objects from multiple projects, each tagged with its own Project value. A role's GetObject permissions must depend on each object's Project tag rather than the bucket's tags. Which condition should its Allow statement use?

Show the answer

Correct answerC. StringEquals comparing s3:ExistingObjectTag/Project to ${aws:PrincipalTag/Project}

AWhy not this: Request object tags describe submitted tags rather than existing tags on an object being read.

BWhy not this: GetObject does not submit a new Project resource tag for this condition to compare.

CWhy this is right: The condition compares the requested object's stored Project value with the caller's Project attribute.

DWhy not this: Tag key names neither identify the object's stored Project value nor compare it with the caller's value.

s3:ExistingObjectTag/Project evaluates the stored tag on the object being read. s3:RequestObjectTag/Project evaluates tags submitted in supported write requests, not the stored object tags used to authorize GetObject.