AWS Certified Solutions Architect Professional SAP-C02 Practice Question
A financial services company uses AWS Organizations to manage a multi-account environment. A dedicated Security account has been designated as the delegated administrator for Amazon GuardDuty, consolidating findings from all member accounts. The security team wants to implement an automated, centralized response to a specific high-severity GuardDuty finding, CryptoCurrency:EC2/BitcoinTool.B, which indicates an EC2 instance may be compromised for cryptocurrency mining. The required remediation action is to immediately isolate the affected EC2 instance by replacing its existing security groups with a single, pre-defined 'Quarantine' security group.
Which solution meets these requirements in the most secure and operationally efficient manner?
In each member account, create an Amazon EventBridge rule that filters for the specific GuardDuty finding. Configure the rule to trigger a local AWS Lambda function within the same account that modifies the EC2 instance's security groups.
In the Security account, create an Amazon EventBridge rule that filters for the specific GuardDuty finding. Configure the rule to trigger an AWS Lambda function. The Lambda function will assume a cross-account IAM role in the member account to modify the EC2 instance's security groups.
Configure GuardDuty to export all findings to a centralized Amazon S3 bucket in the Security account. Use S3 Event Notifications to trigger an AWS Lambda function that parses the finding, assumes a role into the member account, and modifies the EC2 instance's security groups.
In the Security account, create an AWS Lambda function containing IAM user credentials for each member account. Create an Amazon EventBridge rule that triggers this function for the specific GuardDuty finding, using the stored credentials to call the EC2 API in the appropriate member account.
The correct solution is to use a centralized, event-driven architecture. In the delegated GuardDuty administrator account, an Amazon EventBridge rule is created to specifically filter for the CryptoCurrency:EC2/BitcoinTool.B finding. This rule's target is a Lambda function in the same administrator account. When triggered, the Lambda function's code extracts the member account ID and instance ID from the GuardDuty finding details. It then assumes a pre-configured, cross-account IAM role in the target member account. This cross-account role is trusted only by the Lambda function's execution role and has a narrowly scoped IAM policy granting only the ec2:ModifyInstanceAttribute permission, which is required to change an instance's security groups. This approach is centralized, automated, scalable, and adheres to the principle of least privilege.
Deploying an EventBridge rule and Lambda function in each member account is incorrect because it is not a centralized solution. It creates significant operational overhead for management, updates, and ensuring consistency across a large number of accounts.
Using an S3 bucket as an intermediary is incorrect because it adds unnecessary complexity and latency compared to the direct integration between GuardDuty and EventBridge. While GuardDuty can export findings to S3, using EventBridge for real-time, event-driven automation is the more efficient and standard pattern.
Using a Lambda function with hardcoded IAM user access keys for each member account is a major security anti-pattern and is therefore incorrect. This approach violates the principle of least privilege and introduces the significant risk of exposed long-lived credentials. Cross-account IAM roles are the secure way to grant temporary, programmatic access between accounts.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is a cross-account IAM role more secure than using IAM user credentials for inter-account access?
Open an interactive chat with Bash
How does Amazon EventBridge improve operational efficiency in this use case?
Open an interactive chat with Bash
What is the principle of least privilege, and how is it applied in this solution?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Design for New Solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access