A SysOps Administrator in Account () is configuring an Amazon EC2 Auto Scaling group to launch instances from a shared Amazon Machine Image (AMI) owned by Account (). The AMI is backed by an Amazon Elastic Block Store (Amazon EBS) snapshot encrypted using a customer managed key (CMK) in Account . The Administrator must establish the necessary permissions so that the Auto Scaling group can decrypt the snapshot to launch the instances. Which combination of actions must the Administrator perform to meet these requirements? (Select TWO.)
- In Account , update the KMS key policy of the CMK to grant the administrator identity in Account permissions to perform the `kms:CreateGrant` and `kms:DescribeKey` operations.Cevap
- In Account , create a KMS grant for the Auto Scaling service-linked role (`AWSServiceRoleForAutoScaling`) using the CMK Amazon Resource Name (ARN) from Account , specifying the operations `Decrypt`, `GenerateDataKeyWithoutPlaintext`, and `CreateGrant`.Cevap
- CIn Account , attach an IAM policy to the EC2 instance profile role that allows `kms:Decrypt` and `kms:GenerateDataKey` operations targeting the CMK in Account .
- DIn Account , update the KMS key policy of the CMK to directly grant the Auto Scaling service-linked role in Account permissions to perform the `kms:Decrypt` and `kms:GenerateDataKeyWithoutPlaintext` operations.
- EIn Account , re-encrypt the snapshot using the AWS-managed KMS key for Amazon EBS (`aws/ebs`) before sharing the AMI with Account .
Cevap
To resolve this, the administrator must update the KMS key policy in the key-owning account to allow the consumer account to create grants, and then create a KMS grant in the consumer account for the Auto Scaling service-linked role with the required operations.
For an Auto Scaling group to launch instances using an encrypted AMI from another account, the KMS key policy in the sharing account must allow the consumer account to create grants. Then, the consumer account must use the CLI or SDK to create a grant for the Auto Scaling service-linked role (`AWSServiceRoleForAutoScaling`) with the `Decrypt`, `GenerateDataKeyWithoutPlaintext`, and `CreateGrant` operations. This allows the Auto Scaling service to delegate the decryption of the EBS snapshot to the Amazon EC2 service when provisioning the instances.
Adım Adım Çözüm
Anahtar Kavram
Cross-account Amazon EBS encryption with Amazon EC2 Auto Scaling requires delegating KMS permissions via key policies and creating KMS grants for the service-linked role in the consumer account.