Question 160
A Lambda function using a new execution role cannot read an S3 object because an S3 bucket policy requires a different VPC endpoint. The security team proposes: Inspect the bucket policy conditions, actual request context and identity permissions rather than assigning AmazonS3FullAccess. Which additional safeguard should accompany the proposed change?
Explanation
Correct Answer
This deployment safeguard is specifically required: Keep the condition aligned with service-specific network patterns and test all legitimate application paths. It accompanies the technical response, Inspect the bucket policy conditions, actual request context and identity permissions rather than assigning AmazonS3FullAccess., because Resource-policy network conditions can deny requests independently of the caller's general S3 identity permissions. The scenario triggering this requirement is: A Lambda function using a new execution role cannot read an S3 object because an S3 bucket policy requires a different VPC endpoint.
Incorrect Answers
Avoid putting long-term AWS access keys in mobile code and use managed token expiration and revocation controls. That precaution does not address the current risk: resource-policy network conditions can deny requests independently of the caller's general S3 identity permissions. The relevant follow-up is: Keep the condition aligned with service-specific network patterns and test all legitimate application paths.
Use exact principal ARN and prefix conditions, and validate unintended access paths before enabling the policy. That precaution does not address the current risk: resource-policy network conditions can deny requests independently of the caller's general S3 identity permissions. The relevant follow-up is: Keep the condition aligned with service-specific network patterns and test all legitimate application paths.
Keep the application data used for policy evaluation minimal and test deny-by-default behavior. That precaution does not address the current risk: resource-policy network conditions can deny requests independently of the caller's general S3 identity permissions. The relevant follow-up is: Keep the condition aligned with service-specific network patterns and test all legitimate application paths.