AWS Certified Solutions Architect – Professional — Question 831
A Company had a security event whereby an Amazon S3 bucket with sensitive information was made public. Company policy is to never have public S3 objects, and the Compliance team must be informed immediately when any public objects are identified.
How can the presence of a public S3 object be detected, set to trigger alarm notifications, and automatically remediated in the future? (Choose two.)
Answer options
- A. Turn on object-level logging for Amazon S3. Turn on Amazon S3 event notifications to notify by using an Amazon SNS topic when a PutObject API call is made with a public-read permission.
- B. Configure an Amazon CloudWatch Events rule that invokes an AWS Lambda function to secure the S3 bucket.
- C. Use the S3 bucket permissions for AWS Trusted Advisor and configure a CloudWatch event to notify by using Amazon SNS.
- D. Turn on object-level logging for Amazon S3. Configure a CloudWatch event to notify by using an SNS topic when a PutObject API call with public-read permission is detected in the AWS CloudTrail logs.
- E. Schedule a recursive Lambda function to regularly change all object permissions inside the S3 bucket.
Correct answer: B, D
Explanation
To detect and notify the compliance team, enabling S3 object-level logging combined with a CloudWatch Events rule that monitors AWS CloudTrail logs for PutObject API calls with public-read permissions (Option D) is the correct approach. For automatic remediation, configuring a CloudWatch Events rule to trigger an AWS Lambda function (Option B) allows the system to instantly secure the S3 bucket when a policy violation is detected. Other options either do not provide real-time automated remediation or cannot natively filter PutObject ACL policies directly in S3 event notifications.