Passage: A company wants to restrict access to production S3 objects while allowing developers to test in a separate environment. Engineers propose using a single IAM role that can read from the production bucket, but with conditions to reduce risk. They also want to ensure that only requests from specific VPC endpoints can reach S3 during testing, not from public internet traffic. Finally, they need to prevent accidental cross-environment reads by enforcing a naming convention for object keys. The security lead suggests using resource-level policies and condition keys to bind requests to the correct environment. Which AWS policy feature is most aligned with binding access to the correct environment in the passage?

Answer

Applying resource-level conditions in a bucket policy such as s3:prefix and relevant request-source conditions

Explanation

Condition keys in resource policies allow fine-grained checks like allowed object prefixes and request source constraints. This directly supports environment isolation described in the passage.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list