AWS Certified Developer – Associate — Question 155
A company has an Amazon S3 bucket that contains sensitive data. The data must be encrypted in transit and at rest. The company encrypts the data in the S3 bucket by using an AWS Key Management Service (AWS KMS) key. A developer needs to grant several other AWS accounts the permission to use the S3 GetObject operation to retrieve the data from the S3 bucket.
How can the developer enforce that all requests to retrieve the data provide encryption in transit?
Answer options
- A. Define a resource-based policy on the S3 bucket to deny access when a request meets the condition "aws:SecureTransport": "false".
- B. Define a resource-based policy on the S3 bucket to allow access when a request meets the condition "aws:SecureTransport": "false".
- C. Define a role-based policy on the other accounts' roles to deny access when a request meets the condition of "aws:SecureTransport": "false".
- D. Define a resource-based policy on the KMS key to deny access when a request meets the condition of "aws:SecureTransport": "false".
Correct answer: A
Explanation
The correct answer is A because defining a resource-based policy on the S3 bucket to deny access when 'aws:SecureTransport' is false ensures that all requests must use HTTPS for encryption in transit. Option B is incorrect as it would allow access without encryption. Option C is not suitable because it focuses on the roles in other accounts rather than the S3 bucket itself. Option D addresses KMS key access rather than the S3 bucket's access requirements.