A SysOps Administrator is configuring an Amazon EC2 Auto Scaling group to launch instances with encrypted Amazon EBS volumes. The EBS volumes must be encrypted using a customer managed AWS KMS key in the same account ().
The administrator creates a custom IAM policy that grants the Auto Scaling service-linked role (`AWSServiceRoleForAutoScaling`) permission to perform `kms:Encrypt`, `kms:Decrypt`, `kms:ReEncrypt*`, `kms:GenerateDataKey*`, `kms:DescribeKey`, and `kms:CreateGrant` actions on the KMS key. This policy is successfully attached to the service-linked role.
The KMS key has the following key policy:
{
"Version": "2012-10-17",
"Id": "key-policy-ebs",
"Statement": [
{
"Sid": "Allow administration of the key",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123456789012:role/SysOpsAdminRole"
},
"Action": [
"kms:Create*",
"kms:Describe*",
"kms:Enable*",
"kms:List*",
"kms:Put*",
"kms:Update*",
"kms:Revoke*",
"kms:Disable*",
"kms:Get*",
"kms:Delete*",
"kms:ScheduleKeyDeletion",
"kms:CancelKeyDeletion"
],
"Resource": "*"
},
{
"Sid": "Allow cryptographic operations",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123456789012:role/ApplicationServerRole"
},
"Action": [
"kms:Encrypt",
"kms:Decrypt",
"kms:ReEncrypt*",
"kms:GenerateDataKey*",
"kms:DescribeKey"
],
"Resource": "*"
}
]
}
When the Auto Scaling group attempts to scale out, the new instances fail to launch, and the activity history indicates a failure to use the KMS key.
Which of the following modifications will resolve this issue?
- AAttach the custom IAM policy directly to the EC2 instance profile role (ApplicationServerRole) instead of the Auto Scaling service-linked role.
- BModify the KMS key policy to remove the 'Allow administration of the key' statement to resolve policy conflicts.
- Add a statement to the KMS key policy that grants the AWS account's root principal (arn:aws:iam::123456789012:root) permissions for all KMS actions (kms:*).Cevap
- DChange the launch template to use the default AWS-managed key aws/ebs, as customer managed KMS keys are not supported by Auto Scaling groups.