AWS Certified Developer – Associate (DVA-C02) — Question 46
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 be made over HTTPS, enforcing encryption in transit. Option B would incorrectly allow unencrypted requests, while option C applies the policy incorrectly to roles instead of the S3 bucket. Option D relates to the KMS key, which does not govern the transport layer security directly.