A SysOps administrator is configuring an AWS Config rule to automatically remediate non-compliant Amazon S3 buckets. The remediation action is set to run an AWS Systems Manager (SSM) Automation document. The administrator creates a service role named ConfigRemediationRole with a trust policy allowing ssm.amazonaws.com to assume it and attaches the necessary permissions to remediate S3 buckets. However, when the administrator attempts to assign this role to the remediation configuration in AWS Config, the console returns an error indicating that they are not authorized to perform the action.
Which action is required to resolve this authorization failure?
- AModify the S3 bucket policy to grant the administrator's IAM user kms:Decrypt and kms:GenerateDataKey permissions.
- Add the iam:PassRole permission for the ConfigRemediationRole to the IAM policy of the administrator who is configuring the remediation.Cevap
- CAdd the sts:AssumeRole permission for the config.amazonaws.com service principal directly to the administrator's IAM policy.
- DConfigure an Amazon EventBridge rule to route the remediation request directly to the S3 bucket, bypassing AWS Config.
Cevap
Add the iam:PassRole permission for the ConfigRemediationRole to the IAM policy of the administrator who is configuring the remediation.
When configuring AWS Config remediation (which uses Systems Manager Automation under the hood), the SysOps administrator must specify an IAM service role that the automation service will assume to execute the tasks. To assign this role, the administrator's IAM identity must have the iam:PassRole permission. This prevents users from escalating their privileges by passing highly privileged roles to AWS services.
Adım Adım Çözüm
Anahtar Kavram
IAM PassRole Permission for Service Configurations