A SysOps administrator is configuring event-driven remediation to automatically stop any Amazon EC2 instance that is flagged as non-compliant by an AWS Config rule. The administrator plans to use AWS Systems Manager Automation to execute the remediation runbook. The configuration must follow the principle of least privilege. Which two actions must the administrator take to ensure the auto-remediation executes successfully? (Select two.)
- Create an IAM role for Systems Manager with a trust policy that allows ssm.amazonaws.com to assume the role, and attach a policy allowing the ec2:StopInstances action.Cevap
- Attach an IAM policy to the administrator's identity that allows the iam:PassRole action targeting the Systems Manager Automation role.Cevap
- CAttach an IAM policy to the administrator's identity that allows the sts:AssumeRole action targeting the Systems Manager Automation role.
- DCreate an Amazon EventBridge rule that detects Config compliance state changes and configure its target to trigger the AWS Config remediation configuration.
- EEnable CloudWatch detailed monitoring on all EC2 instances to trigger the AWS Config rule evaluations at 1-minute intervals.
Cevap
To configure event-driven auto-remediation in AWS Config using Systems Manager, the administrator must create an IAM role for Systems Manager with a trust policy that allows ssm.amazonaws.com to assume the role (along with ec2:StopInstances permissions), and attach an IAM policy to the administrator's identity that allows the iam:PassRole action targeting the Systems Manager Automation role.
To implement auto-remediation in AWS Config using Systems Manager Automation, two critical IAM configurations are needed: first, an IAM service role (with a trust policy for ssm.amazonaws.com) containing the necessary permissions (such as ec2:StopInstances) to perform the remediation action on the target resource; second, the configuring administrator needs iam:PassRole permission on that service role to grant Systems Manager the authority to assume the role and execute the tasks.
Adım Adım Çözüm
Anahtar Kavram
Configuring event-driven remediation in AWS Config using Systems Manager Automation requires establishing a service trust relationship, granting the service permissions to take action, and authorizing the administrative user to pass the execution role using the iam:PassRole permission.
Tahmini Süre:2m 30s