An enterprise is designing a secure storage solution where an application running in Account B must read encrypted objects from an Amazon S3 bucket located in Account A. The objects in the S3 bucket must be encrypted at rest using AWS KMS.
Which two configuration steps are required to enable this cross-account access? (Select TWO.)
- Create a customer managed key in Account A, and configure its key policy to allow the IAM role in Account B to perform the kms:Decrypt action.Cevap
- Configure the IAM policy attached to the application's IAM role in Account B to allow the kms:Decrypt action on the ARN of the KMS key in Account A.Cevap
- CUse the default AWS-managed key for Amazon S3 (aws/s3) in Account A and modify its key policy to grant decrypt permissions to the IAM role in Account B.
- DAttach a Service Control Policy (SCP) to the AWS Organization root that grants Account B direct access to Account A's KMS keys, removing the need for local IAM or KMS policies.
- ECreate a trust relationship on Account A's KMS key policy using the sts:AssumeRoleWithSAML action to federate the Account B identity directly.
Cevap
To configure cross-account access to KMS-encrypted objects, you must create a Customer Managed Key in Account A, configure its key policy to allow the IAM role in Account B to decrypt, and attach an IAM policy to the IAM role in Account B that permits the decrypt action on the KMS key.
Cross-account AWS KMS access requires configuring permissions on both the resource policy (the KMS key policy in Account A) and the identity-based policy (the IAM policy in Account B). Additionally, you must use a Customer Managed Key (CMK) because the default AWS-managed keys (such as aws/s3) cannot be shared across accounts as their key policies are immutable.
Adım Adım Çözüm
Anahtar Kavram
Cross-account access to KMS keys requires using Customer Managed Keys (CMKs) and configuring permissions on both the KMS key policy in the source account and the IAM policy in the destination account.