Detection

An AWS Config rule flags security groups that allow unrestricted SSH, and automatic remediation runs the AWS-DisableIncomingSSHOnPort22 Automation runbook. Every remediation attempt fails with AccessDenied, although AWS Config's service-linked role exists. What should the security engineer configure?

Show the answer

Correct answerD. Set the AutomationAssumeRole parameter to a role that allows ec2:RevokeSecurityGroupIngress.

AWhy not this: Retrying uses the same permissions, so every attempt still fails.

BWhy not this: Service-linked role permissions are fixed by AWS and cannot be extended.

CWhy not this: Recording IAM resources changes what Config evaluates, not the permissions the runbook uses.

DWhy this is right: The runbook acts with its AutomationAssumeRole, which needs the permissions for the remediation.

AWS Config starts the runbook, but Systems Manager Automation performs the changes with the role given in the AutomationAssumeRole parameter. That role must trust Systems Manager and allow the actions the runbook takes. Service-linked roles cannot be edited, and more retries repeat the same failure.