Data Protection

Several IAM roles have identity policies that allow access to an S3 bucket and its objects. The bucket must reject every request that is not sent over TLS, whatever policy grants it. Which bucket policy statement meets this requirement?

Show the answer

Correct answerC. Deny s3:* on the bucket ARN and its objects, when aws:SecureTransport is false.

AWhy not this: Object operations target object ARNs, so a Deny on the bucket ARN alone does not cover GetObject or PutObject.

BWhy not this: A conditional Allow does not deny insecure requests that the roles' identity policies already allow.

CWhy this is right: An explicit Deny on the bucket and object ARNs rejects every non-TLS request regardless of other grants.

DWhy not this: A VPC endpoint restriction controls the network path but does not enforce TLS.

An explicit Deny on both the bucket ARN and its objects (bucket/*) when aws:SecureTransport is false rejects every non-TLS request, because an explicit Deny overrides the roles' identity-policy Allows. A Deny on the bucket ARN alone misses object operations such as GetObject, and a conditional Allow does not stop requests that other policies already allow.