A SysOps Administrator is configuring cross-account access to a customer managed KMS key in Account A () to allow an application running on an IAM role in Account B () to decrypt data.
Currently, the KMS key policy in Account A contains the following default statement:
{
"Sid": "Enable IAM User Permissions",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123456789012:root"
},
"Action": "kms:*",
"Resource": "*"
}
Which combination of actions must the SysOps Administrator perform to grant the application in Account B access to the KMS key? (Select TWO.)
- In Account A, modify the customer managed KMS key policy to grant the Account B AWS account root principal (`arn:aws:iam::987654321098:root`) permission to perform the `kms:Decrypt` action.Cevap
- In Account B, attach an IAM policy to the application's IAM role that allows the `kms:Decrypt` action on the KMS key ARN in Account A.Cevap
- CIn Account A, attach an IAM policy to the administrator role that allows Account B's IAM role to access the KMS key directly.
- DIn Account B, update the default AWS-managed KMS key policy (`aws/s3`) to delegate KMS permissions to the application's IAM role.
- EIn Account B, configure a resource-based policy on the application's IAM role that trusts the KMS key in Account A.
Cevap
In Account A, modify the customer managed KMS key policy to grant the Account B AWS account root principal permission to perform the `kms:Decrypt` action; and in Account B, attach an IAM policy to the application's IAM role that allows the `kms:Decrypt` action on the KMS key ARN in Account A.
For cross-account access to a customer managed AWS KMS key, both accounts must grant permissions. The owning account (Account A) must update the KMS key policy to trust the consuming account (Account B) root principal or the specific IAM role. The consuming account (Account B) must then grant permission to the IAM role via an identity-based IAM policy targeting the KMS key's Amazon Resource Name (ARN).
Adım Adım Çözüm
Anahtar Kavram
AWS KMS cross-account access requires authorization from both the resource-based key policy in the owning account and the identity-based IAM policy in the consuming account.