A SysOps administrator is setting up automated remediation for security groups that allow unrestricted inbound SSH traffic. An AWS Config rule detects non-compliant security groups and publishes compliance change events. The administrator configures an Amazon EventBridge rule to match these compliance changes and target the `AWS-DisablePublicAccessForSecurityGroup` Systems Manager Automation document. During testing, the AWS Config rule successfully marks a security group as non-compliant, but the Systems Manager Automation execution is not initiated. Which configuration change will resolve this issue?
- AConfigure the EventBridge rule to send events to an AWS Config rule remediation target rather than invoking the Systems Manager API directly.
- BAdd a resource-based policy to the Systems Manager Automation document that allows the EventBridge service principal to execute the document.
- Attach an IAM policy to the EventBridge rule's execution role that grants the `iam:PassRole` permission for the Systems Manager Automation service role.Cevap
- DModify the trust policy of the Systems Manager Automation service role to allow the AWS Config service principal to assume the role.
Cevap
Attach an IAM policy to the EventBridge rule's execution role that grants the `iam:PassRole` permission for the Systems Manager Automation service role.
The correct solution is to attach an IAM policy to the EventBridge rule's execution role granting the `iam:PassRole` permission for the Systems Manager Automation service role. This allows EventBridge to pass the execution role to Systems Manager, enabling the service to assume that role and perform the required remediation actions on the security group.
Adım Adım Çözüm
Anahtar Kavram
IAM PassRole permissions for EventBridge to trigger Systems Manager Automation remediation