AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 336
A security team wants to use AWS CloudTrail to monitor all actions and API calls in multiple accounts that are in the same organization in AWS Organizations. The security team needs to ensure that account users cannot turn off CloudTrail in the accounts.
Which solution will meet this requirement?
Answer options
- A. Apply an SCP to all OUs to deny the cloudtrail:StopLogging action and the cloudtrail:DeleteTrail action.
- B. Create IAM policies in each account to deny the cloudtrail:StopLogging action and the cloudtrail:DeleteTrail action.
- C. Set up Amazon CloudWatch alarms to notify the security team when a user disables CloudTrail in an account.
- D. Use AWS Config to automatically re-enable CloudTrail if a user disables CloudTrail in an account.
Correct answer: A
Explanation
Applying a Service Control Policy (SCP) to deny cloudtrail:StopLogging and cloudtrail:DeleteTrail actions is the most secure method because SCPs apply to all users and roles, including the root account, across the organization. Local IAM policies cannot restrict the root user and are difficult to manage at scale. While CloudWatch alarms and AWS Config can detect or remediate the issue, they are reactive solutions rather than preventive measures.