A SysOps Administrator is deploying a conformance pack containing an AWS Config rule to evaluate EBS volume encryption. The administrator configures automatic remediation for the rule using an AWS Systems Manager (SSM) Automation document. The remediation is configured to encrypt non-compliant volumes using a customer managed key (CMK) in AWS Key Management Service (AWS KMS).
Although the administrator has attached an IAM policy to the SSM Automation service role that allows all KMS actions (kms:*), the automatic remediation fails. The execution history indicates a 'KMS Access Denied' error.
Which of the following explains the cause of this issue?
- AThe SysOps Administrator's IAM user policy lacks the iam:PassRole permission for the SSM Automation service role.
- BThe SysOps Administrator failed to configure an Amazon EventBridge rule to route the AWS Config compliance status change to the Systems Manager Automation service.
- The key policy of the customer managed key does not explicitly permit the SSM Automation service role to perform the required KMS operations.Cevap
- DThe IAM service-linked role for AWS Config (AWSServiceRoleForConfig) lacks the kms:GenerateDataKey and kms:Decrypt permissions for the KMS key.
Cevap
The key policy of the customer managed key does not explicitly permit the SSM Automation service role to perform the required KMS operations.
For customer managed KMS keys, key policies are the primary mechanism for access control. If a key policy does not explicitly permit an IAM principal (in this case, the SSM Automation service role), or does not delegate permission to the AWS account to use IAM policies for access control, the principal will be denied access regardless of its attached IAM policies.
Adım Adım Çözüm
Anahtar Kavram
AWS Config automatic remediation executes Systems Manager Automation documents. When encrypting resources using AWS KMS customer managed keys during remediation, the key policy must explicitly grant the SSM service role access to the key.