A company requires all Amazon EBS volumes in its AWS account to be encrypted. A SysOps administrator configures the AWS Config managed rule `encrypted-volumes` to monitor compliance. If an unencrypted volume is created, AWS Config must automatically trigger an AWS Systems Manager (SSM) Automation document to delete the non-compliant volume.
What configuration steps must the administrator perform to successfully implement this automated remediation?
- Configure the AWS Config rule's automatic remediation to target the `AWS-DeleteEBSVolume` SSM document. Specify an IAM service role for the remediation that has permissions to delete EBS volumes, and grant the administrator the `iam:PassRole` permission for this service role.Answer
- BConfigure the AWS Config rule's automatic remediation to target the `AWS-DeleteEBSVolume` SSM document. Specify an IAM service role for the remediation that has permissions to delete EBS volumes, and modify the trust policy of the administrator's IAM user to assume the service role.
- CCreate an Amazon EventBridge rule triggered by AWS Config compliance change events, and target the `AWS-DeleteEBSVolume` SSM document, relying on the default EventBridge service-linked role to authorize the deletion of the volume.
- DConfigure a CloudWatch Logs metric filter to scan AWS Config logs for non-compliance messages, create a CloudWatch alarm based on this metric, and set the alarm action to run the `AWS-DeleteEBSVolume` SSM document.
Answer
Configure the AWS Config rule's automatic remediation to target the `AWS-DeleteEBSVolume` SSM document. Specify an IAM service role for the remediation that has permissions to delete EBS volumes, and grant the administrator the `iam:PassRole` permission for this service role.
The correct configuration uses AWS Config's built-in automatic remediation feature targeting Systems Manager Automation. An IAM role with permissions to delete EBS volumes is passed to AWS Config to run the automation document on the administrator's behalf. For the administrator to successfully configure this delegation, they must have the `iam:PassRole` permission for that IAM role.
Step-by-Step Solution
Key Concept
AWS Config automatic remediation requires both an execution service role with target resource permissions and the `iam:PassRole` permission for the identity establishing the remediation link.