Aria BioPharma is designing a secure compliance monitoring platform. In the Shared Services account (Account ), a build pipeline generates custom Amazon Machine Images (AMIs) containing proprietary security auditing software. The root EBS volumes of these AMIs are encrypted using an AWS KMS Customer Managed Key (CMK) located in the Shared Services account. To deploy these AMIs, the solutions architect must configure an Auto Scaling group in the Production account (Account ) to launch EC2 instances from the shared AMIs. Which of the following configurations will allow the Auto Scaling group in the Production account to successfully launch the instances while maintaining the principle of least privilege?
- Share the custom AMI with Account . In Account , modify the KMS key policy to grant the Auto Scaling service-linked role in Account (arn:aws:iam::222222222222:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling) permissions to kms:Decrypt, kms:DescribeKey, and kms:CreateGrant.Cevap
- BEncrypt the AMI root volumes using the default AWS-managed KMS key for Amazon EBS (aws/ebs) in Account . Modify the key policy of this AWS-managed key to grant Account cross-account decrypt access, and share the AMI with Account .
- CShare the custom AMI with Account . Attach a Service Control Policy (SCP) to the Organizational Unit containing Account that explicitly allows the autoscaling.amazonaws.com service principal to perform kms:Decrypt and kms:CreateGrant actions on the KMS key in Account .
- DShare the custom AMI with Account . Configure a SAML 2.0 federated role in Account that trusts Account . Configure the Auto Scaling group in Account to assume this federated role using sts:AssumeRoleWithSAML to access the KMS key.
Cevap
Sharing the custom AMI with the Production account and modifying the KMS key policy in the Shared Services account to grant the Production account's Auto Scaling service-linked role kms:Decrypt, kms:DescribeKey, and kms:CreateGrant permissions.
To deploy an instance from an encrypted AMI in another account using an Auto Scaling group, the source account must share the AMI and update its Customer Managed Key (CMK) policy. The key policy must grant the target account's Auto Scaling service-linked role (AWSServiceRoleForAutoScaling) the kms:Decrypt, kms:DescribeKey, and kms:CreateGrant permissions. The kms:CreateGrant permission is critical because it allows Auto Scaling to create a grant on the key, delegating decryption permissions to the Amazon EC2 service which mounts the volume.
Adım Adım Çözüm
Anahtar Kavram
Cross-account KMS Customer Managed Key sharing with service-linked roles for encrypted AMI deployments.
Tahmini Süre:2m 30s