A company's security compliance audit reveals that several Amazon EBS snapshots have been shared publicly. The SysOps administrator must implement a solution to automatically revert any publicly shared EBS snapshots to private. The administrator decides to use Amazon EventBridge to detect the change and trigger the AWS Systems Manager Automation runbook `AWS-ModifySnapshotAttribute`.
Which actions are required to configure the automation pipeline and ensure it has the necessary permissions? (Select TWO.)
- Configure an IAM role for the EventBridge rule target that grants the `ssm:StartAutomationExecution` permission for the `AWS-ModifySnapshotAttribute` runbook.Answer
- Configure an IAM service role for the Systems Manager Automation execution that contains the `ec2:ModifySnapshotAttribute` permission.Answer
- CConfigure an IAM role for the EventBridge rule target that grants the `iam:PassRole` permission for the EC2 Instance Profile role to allow direct modification of the snapshot.
- DConfigure an Amazon EventBridge rule with an input transformer that triggers an Amazon EC2 Run Command target using the `AWS-RunShellScript` document on the affected EBS snapshot.
- EConfigure an AWS Config rule to send a custom notification status to an Amazon SNS topic, and subscribe the Systems Manager Automation runbook directly to the SNS topic.
Answer
The correct actions are: configuring an IAM role for the EventBridge rule target that grants `ssm:StartAutomationExecution` for the target runbook, and configuring an IAM service role for the Systems Manager Automation execution that contains the `ec2:ModifySnapshotAttribute` permission.
To automate the remediation of public EBS snapshots, the EventBridge rule must have permission to invoke the Systems Manager Automation target, which is achieved by assigning an IAM role with the `ssm:StartAutomationExecution` permission. Additionally, the Systems Manager Automation runbook must have a service role (Automation Assume Role) with the necessary `ec2:ModifySnapshotAttribute` permission to execute the action of making the snapshot private.
Step-by-Step Solution
Key Concept
Automating remediation of public resources using EventBridge and Systems Manager Automation.
Estimated Time:2m 30s