A SysOps administrator wants to automatically stop any Amazon EC2 instance that is launched without a 'Project' tag. The administrator has created an Amazon EventBridge rule that detects when a new EC2 instance state changes to 'running'. Which target configuration and IAM permissions are required to successfully perform this remediation?
- Configure the rule to target AWS Systems Manager Automation using the AWS-StopEC2Instance runbook, and associate the rule with an IAM service role that allows EventBridge to execute ssm:StartAutomationExecution.Answer
- BConfigure the rule to target AWS Systems Manager Run Command using the AWS-StopEC2Instance runbook, and associate the rule with an IAM service role that allows EventBridge to execute ssm:SendCommand.
- CConfigure the rule to target AWS Systems Manager Automation using the AWS-StopEC2Instance runbook, but omit the IAM execution role since EventBridge has implicit permissions to run Systems Manager Automation.
- DConfigure the rule to target AWS Systems Manager State Manager, and associate the rule with an IAM service role that allows EventBridge to execute ssm:CreateAssociation.
Answer
Configure the rule to target AWS Systems Manager Automation using the AWS-StopEC2Instance runbook, and associate the rule with an IAM service role that allows EventBridge to execute ssm:StartAutomationExecution.
The correct option is configuring the rule to target AWS Systems Manager Automation using the AWS-StopEC2Instance runbook, and associating the rule with an IAM service role that allows EventBridge to execute ssm:StartAutomationExecution. Systems Manager Automation is designed for control-plane remediation tasks, such as stopping EC2 instances, and EventBridge requires an explicit IAM role with ssm:StartAutomationExecution permissions to invoke the target runbook.
Step-by-Step Solution
Key Concept
AWS Systems Manager Automation and Amazon EventBridge integration for automated remediation
Estimated Time:1m 0s