An operations team is implementing event-driven compliance controls. They deploy an AWS Config rule to monitor that all Amazon SQS queues have Server-Side Encryption enabled. To automatically encrypt non-compliant queues, they designate the Systems Manager Automation document AWS-EnableSqsQueueEncryption. The team creates a dedicated IAM role named QueueEncryptionExecutionRole with the required SQS permissions, trusting Systems Manager to assume it. However, when the team tries to save this auto-remediation configuration, the operation fails with an authorization error. Which action will resolve this configuration failure?
- Assigning iam:PassRole permissions to the IAM identity performing the configuration, targeting the QueueEncryptionExecutionRole resource.Answer
- BUpdating the trust policy of QueueEncryptionExecutionRole to allow the config.amazonaws.com service principal to assume it instead of ssm.amazonaws.com.
- CConfiguring an Amazon EventBridge rule that intercepts the AWS Config compliance event to trigger a custom AWS Lambda function instead of using Systems Manager.
- DEnabling detailed CloudWatch monitoring on the Amazon SQS queues to verify the compliance state at one-minute intervals before the remediation runs.
Answer
Assigning iam:PassRole permissions to the IAM identity performing the configuration, targeting the QueueEncryptionExecutionRole resource.
When configuring automated remediation in AWS Config that uses an SSM Automation document, the AWS Config service associates a service execution role with Systems Manager. The IAM user or role performing this configuration must have the iam:PassRole permission for that execution role. This ensures the user is authorized to delegate the role's permissions to Systems Manager.
Step-by-Step Solution
Key Concept
AWS Config auto-remediation with Systems Manager Automation requires the configuring principal to possess iam:PassRole permission to pass the automation execution role to SSM.