DEA-C01 practice question 23 of 25

A company stores its processed data in an S3 bucket. The company has a strict data access policy. The company uses IAM roles to grant teams within…

Full set: 287 questions
A company stores its processed data in an S3 bucket. The company has a strict data access policy. The company uses IAM roles to grant teams within the company different levels of access to the S3 bucket. The company wants to receive notifications when a user violates the data access policy. Each notification must include the username of the user who violated the policy. Which solution will meet these requirements?
Answer options
A: Use AWS Config rules to detect violations of the data access policy. Set up compliance alarms.
B: Use Amazon CloudWatch metrics to gather object-level metrics. Set up CloudWatch alarms.
C: Use AWS CloudTrail to track object-level events for the S3 bucket. Forward events to Amazon CloudWatch to set up CloudWatch alarms. Correct answer
D: Use Amazon S3 server access logs to monitor access to the bucket. Forward the access logs to an Amazon CloudWatch log group. Use metric filters on the log group to set up CloudWatch alarms.
Correct Answer:
C. Use AWS CloudTrail to track object-level events for the S3 bucket. Forward events to Amazon CloudWatch to set up CloudWatch alarms.
Explanation

AWS CloudTrail is the appropriate service for auditing API activity. By enabling data events for the S3 bucket, all object-level API calls (like GetObject, PutObject, DeleteObject) are logged. These logs include the userIdentity element, which contains details about the principal that made the request, such as the username or assumed role. These detailed logs can be sent to Amazon CloudWatch Logs. In CloudWatch, you can create metric filters to search for specific patterns, such as AccessDenied errors, and configure alarms to send notifications when these patterns are detected, thus meeting all requirements.

Why Incorrect

A. AWS Config tracks resource configuration changes, not real-time API access violations by users. It is unsuitable for this use case.
B. Amazon CloudWatch metrics for S3 are aggregated and do not provide user-level details needed to identify a specific user violating a policy.
D. S3 server access logs are delivered on a best-effort basis and are not real-time. CloudTrail is the recommended service for security auditing and compliance.

References

1. AWS CloudTrail User Guide, "Logging Amazon S3 API calls by using AWS CloudTrail," Section: "Data events." This document explains how CloudTrail captures S3 object-level API activity.

2. AWS CloudTrail User Guide, "Working with CloudTrail log files," Section: "CloudTrail userIdentity element." This section details the userIdentity field which contains the necessary user information.

3. Amazon CloudWatch User Guide, "Creating alarms from CloudTrail events using the console," Section: "Create a CloudWatch alarm for a CloudTrail event." This guide shows how to create alarms based on specific API activity captured by CloudTrail.

Scroll to Top