An organization wants to establish an automated response system when an Amazon EC2 instance's CPU utilization exceeds for more than 15 minutes, which indicates a runaway process. A SysOps administrator configures an Amazon EventBridge rule triggered by the corresponding Amazon CloudWatch alarm state change to `ALARM`. The remediation strategy is to trigger a custom AWS Systems Manager Automation runbook named `ResolveRunawayProcess` that will restart the problematic service on the instance. The runbook requires a service role (`SSMAutomationServiceRole`) to execute its steps. Which configuration and permission setup will successfully execute the remediation with the least privilege?
- Set the EventBridge rule target to Systems Manager Automation and select the ResolveRunawayProcess document. Assign an IAM role to the EventBridge target containing the ssm:StartAutomationExecution permission for the document and the iam:PassRole permission for the SSMAutomationServiceRole resource.Cevap
- BSet the EventBridge rule target to Systems Manager Automation and select the ResolveRunawayProcess document. Assign an IAM role to the EventBridge target containing the ssm:StartAutomationExecution permission, and configure the trust relationship of the SSMAutomationServiceRole to trust the EventBridge service principal (events.amazonaws.com).
- CSet the EventBridge rule target to Systems Manager Run Command and select the ResolveRunawayProcess document. Assign an IAM role to the EventBridge target containing the ssm:SendCommand permission and the iam:PassRole permission for the instance profile role.
- DSet the EventBridge rule target to AWS Config, and configure an AWS Config remediation action to execute the ResolveRunawayProcess document. Assign an IAM role to AWS Config containing the ssm:StartAutomationExecution permission.
Cevap
Set the EventBridge rule target to Systems Manager Automation and select the ResolveRunawayProcess document. Assign an IAM role to the EventBridge target containing the ssm:StartAutomationExecution permission for the document and the iam:PassRole permission for the SSMAutomationServiceRole resource.
The correct configuration establishes a path where EventBridge acts as the caller. It invokes the Systems Manager Automation target (`ResolveRunawayProcess` document) and passes the execution role (`SSMAutomationServiceRole`) to Systems Manager using `iam:PassRole` permissions. Without `iam:PassRole`, Systems Manager cannot execute the Automation runbook steps under the specified service role context.
Adım Adım Çözüm
Anahtar Kavram
EventBridge and Systems Manager Automation Remediation IAM Permissions