Get automated email for exposed IAM access keys via an EventBridge rule on AWS Health Risk events
Short answer
C An EventBridge rule on AWS Health Risk events (AWS_RISK_CREDENTIALS_EXPOSED) to SNS alerts on repo-exposed access keys.
Question
Key Takeaways
When AWS discovers IAM access keys exposed on public code repositories, it emits an AWS Health event (AWS_RISK_CREDENTIALS_EXPOSED), not a GuardDuty instance-credential finding. Routing AWS Health events through EventBridge to SNS gives automated notification for exactly this exposure scenario. GuardDuty's InstanceCredentialExfiltration finding is specific to EC2 instance-role credentials used externally and does not cover developer access keys found in repos.
The company wants automated email alerts when IAM access keys from developer accounts are found on public code-repository sites. AWS detects credentials exposed in public repositories and publishes an AWS Health event of type AWS_RISK_CREDENTIALS_EXPOSED. An EventBridge rule that matches AWS Health events in the Risk service category (or that specific event type) and targets an SNS topic delivers the required automated email notifications.
Common mistake: Selecting the GuardDuty InstanceCredentialExfiltration option. That finding type applies to EC2 instance-profile temporary credentials used outside AWS, not to IAM user access keys discovered on public code repositories, so it does not match the detection requirement.
Expert Analysis
Why the Answer Is Correct
AWS proactively scans public code repositories and, when it finds exposed IAM access keys, publishes an AWS Health event (AWS_RISK_CREDENTIALS_EXPOSED). An EventBridge rule reacting to AWS Health events in the Risk service category and targeting an SNS topic provides the automated email notification the company needs, directly matching the "access keys detected on code repository sites" scenario.
Why the Other Options Are Wrong
A is wrong because the GuardDuty finding it names, UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS, is specific to EC2 instance-role credentials used from outside AWS—not IAM access keys found on public repos—so it does not fire for this case. B (polling account contact email) is manual and not automated. D requires building external anomaly-detection software ingesting CloudTrail, far more operational overhead than the managed AWS Health/EventBridge path.
Community Comment Notes
Community voted A (67) but the precise detection for keys exposed on public repos is the AWS Health AWS_RISK_CREDENTIALS_EXPOSED event, which option C targets. A commenter correctly noted A's finding type is "exclusive to EC2 instance profiles" and that C is the detection path. The technically correct answer is C.
Official Reference
https://docs.aws.amazon.com/health/latest/ug/event-bridge-health.html
This link opens the official vendor documentation in a new tab.
Community Votes
67% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 7 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 7
-
AWSLoverLoverLoverLoverLover 👍 1 Answered ACorrect Answer: A. Create an Amazon EventBridge rule to send Amazon Simple Notification Service (Amazon SNS) email notifications for AWS Health events with the eventTypeCode AWS_RISK_CREDENTIALS_EXPOSED. Not C. Create an Amazon EventBridge rule that reacts to AWS Health events that have a value of Risk for the service category. Configure email notifications by using Amazon Simple Notification Service (Amazon SNS). While this captures a broader range of events, it may lead to unnecessary notifications. Focusing specifically on the AWS_RISK_CREDENTIALS_EXPOSED event ensures that alerts are relevant to exposed credentials.
-
Wardove 👍 1 Answered CThe Answer is C, here is a similar solution: https://github.com/aws/aws-health-tools/blob/master/automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/README.md Answer cannot be A because referenced finding type is exclusive to EC2 instance profiles, and is triggered only if instance session credentials are actually being used to authenticate as the instance. https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_finding-types-iam.html#unauthorizedaccess-iam-instancecredentialexfiltrationoutsideaws
-
mikelord 👍 1 Answered AOption A is the correct solution because it leverages Amazon GuardDuty to detect unauthorized use or exposure of AWS access keys and uses Amazon EventBridge along with Amazon SNS to provide automated email notifications, efficiently meeting the requirement with the least effort.
-
phmeeeee 👍 1 Answered AC - AWS Health focuses on service status & planned changes. Correct answer is A - GuardDuty can detect exposed credentials and generates the finding UnauthorizedAccess and send the event to EventBridge to trigger the SNS.
-
VPNalumni 👍 1https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_finding-types-iam.html#unauthorizedaccess-iam-instancecredentialexfiltrationoutsideaws A
Show 2 more comments
-
SCSC02Q 👍 1 Answered CIts C, since Q asks for DETECTION, whereas A is only after the event, GuardDuty finding indicates compromised access has already happened.
-
youonebe 👍 1 Answered Aanswer A, no doubt
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.