Question
A CloudOps engineer must ensure that all of a company's current and future Amazon S3 buckets have logging enabled. If an S3 bucket does not have logging enabled, an automated process must enable logging for the S3 bucket.
Which solution will meet these requirements?
- A. Use AWS Trusted Advisor to perform a check for S3 buckets that do not have logging enabled. Configure the check to enable logging for S3 buckets that do not have logging enabled.
- B. Configure an S3 bucket policy that requires all current and future S3 buckets to have logging enabled.
- C. Use the s3-bucket-logging-enabled AWS Config managed rule. Add a remediation action that uses an AWS Lambda function to enable logging.
- D. Use the s3-bucket-logging-enabled AWS Config managed rule. Add a remediation action that uses the AWS-ConfigureS3BucketLogging AWS Systems Manager Automation runbook to enable logging. Correct
Explanation
The correct answer is D because AWS Config with the s3-bucket-logging-enabled managed rule can monitor S3 buckets for logging compliance. By adding a remediation action using the AWS-ConfigureS3BucketLogging Systems Manager Automation runbook, it automatically enables logging on non-compliant S3 buckets, meeting the requirement to ensure all current and future S3 buckets have logging enabled.