Courseiva
Security Logging and MonitoringmediumMultiple ChoiceObjective-mapped

How to Set Up Real-Time Alerts for IAM User Actions using CloudWatch Events

A company uses AWS CloudTrail to log all API calls. The security team needs to be alerted when an IAM user creates a new access key. Which approach is most efficient?

Quick Answer

The answer is to create a CloudWatch Events rule that matches the CreateAccessKey event and targets an SNS topic. This is the most efficient approach because CloudWatch Events (now part of Amazon EventBridge) provides real-time alert on IAM API calls by filtering the CloudTrail log stream for specific event names like CreateAccessKey, then routing that event directly to an SNS topic for immediate notification without any polling or manual queries. On the AWS Certified Security Specialty SCS-C02 exam, this scenario tests your understanding of the difference between log storage (CloudTrail), log analysis (CloudWatch Logs Insights), and event-driven automation (CloudWatch Events). A common trap is choosing CloudTrail itself, which only delivers logs to S3 and cannot natively send alerts, or selecting AWS Config, which tracks resource state changes but not individual API calls. Remember the memory tip: "Events for alerts, Trails for trails" — CloudWatch Events triggers real-time actions, while CloudTrail simply records the trail of API activity.

⚠ Common exam trap

Many exam-takers confuse AWS Config's resource compliance monitoring with real-time event detection, or assume that S3 event notifications are suitable for low-latency security alerts, when in fact EventBridge rules are purpose-built for this use case.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a CloudWatch Events rule that matches the CreateAccessKey event and targets an SNS topic.

CloudWatch Events (now part of Amazon EventBridge) can directly match the CreateAccessKey API call from AWS CloudTrail in real time and trigger an SNS notification. This approach is the most efficient as it requires no polling, no additional infrastructure, and provides immediate alerting with minimal latency.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Enable AWS Config managed rule to detect access key creation and trigger an SNS notification.

    Why it's wrong here

    AWS Config rules evaluate resource configurations, not API calls; they are not designed for real-time API monitoring.

  • Create a CloudWatch Events rule that matches the CreateAccessKey event and targets an SNS topic.

    Why this is correct

    CloudWatch Events can filter specific API calls in real-time and trigger actions like SNS notifications.

  • Use CloudWatch Logs Insights to run a query every minute on CloudTrail logs and send results to SNS.

    Why it's wrong here

    Running scheduled queries via CloudWatch Logs Insights introduces latency due to the polling interval and lacks a native event-driven mechanism for immediate alerting. This method is designed for ad hoc investigative analysis or periodic reporting on historical log data rather than real-time monitoring. It would be correct if the requirement were to generate a summary report of all access key creations over the previous hour instead of triggering an instantaneous alert.

  • Configure CloudTrail to send logs to an S3 bucket and enable S3 event notifications to an SNS topic.

    Why it's wrong here

    S3 event notifications occur when objects are created, but CloudTrail delivers logs in batches, causing delays; not real-time.

About these practice questions

Courseiva writes every SCS-C02 question from scratch — 376 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on SCS-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A security engineer needs to be alerted when an IAM user attempts to modify an S3 bucket policy. Which method is the MOST efficient?

easy
  • A.Enable VPC Flow Logs and analyze for S3 API traffic
  • B.Configure an AWS Config rule to detect changes and invoke a Lambda function
  • C.Create an Amazon CloudWatch Events rule that matches the PutBucketPolicy API call and triggers an SNS notification
  • D.Enable S3 server access logs and parse them for PutBucketPolicy entries

Why C: Amazon CloudWatch Events (now Amazon EventBridge) can directly capture the PutBucketPolicy API call as a real-time event and trigger an SNS notification without any additional compute or polling. This is the most efficient method as it requires no log parsing, no custom code, and no additional infrastructure, providing immediate alerting with minimal overhead.

Variation 2. A company runs a critical application on Amazon EC2 instances in an Auto Scaling group. The security team needs to monitor for unauthorized changes to security groups. They have enabled AWS Config with the security-group-change detection rule. However, they notice that changes are being detected but not all changes trigger a notification. The team wants to ensure that every security group modification (create, delete, or rule change) sends an alert to the security operations center via Amazon SNS. The current setup: AWS Config rules evaluate resources periodically, and SNS notifications are sent only when the rule compliance status changes. What should the team do to achieve real-time alerts for all security group changes?

hard
  • A.Deploy Amazon GuardDuty and enable the Security Group Monitoring feature.
  • B.Configure an Amazon EventBridge rule that matches API calls via CloudTrail for security group modifications and sends notifications to an SNS topic.
  • C.Increase the frequency of AWS Config rule evaluations to every minute to reduce detection latency.
  • D.Enable VPC Flow Logs and set up a metric filter for security group-related traffic anomalies.

Why B: CloudTrail logs all API calls, including security group modifications, in real time. By creating an Amazon EventBridge rule that matches SecurityGroup events and targets an SNS topic, the team can receive immediate notifications. Option A is incorrect because GuardDuty focuses on threat detection (e.g., suspicious API activity), not on monitoring all security group configuration changes. Option C is incorrect because even with frequent evaluations, AWS Config rules evaluate configuration snapshots periodically and do not provide real-time alerting for each change. Option D is incorrect because VPC Flow Logs monitor network traffic, not security group modifications.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SCS-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SCS-C02 exam.