Security, Compliance, and Governance

Workloads use an S3 gateway endpoint to access buckets owned by their AWS organization. Even if a workload's IAM permissions expand, requests through this endpoint must not reach buckets owned outside the organization. Which control meets this requirement?

Show the answer

Correct answerB. Restrict the endpoint policy using aws:ResourceOrgID.

AWhy not this: Policies on organization-owned buckets cannot restrict requests to buckets owned by other organizations.

BWhy this is right: aws:ResourceOrgID identifies the resource owner's organization and can restrict destination buckets.

CWhy not this: aws:PrincipalOrgID identifies the caller's organization, not the destination bucket owner's organization.

DWhy not this: A gateway endpoint has no IAM role to which a permissions boundary can be attached.

An endpoint policy using aws:ResourceOrgID can restrict requests through that endpoint to resources owned by the organization. aws:PrincipalOrgID checks the caller's organization, so it does not prevent an internal caller from accessing an external bucket.