A SysOps administrator is configuring cross-account access for an application running on an Amazon EC2 instance in Account A. The application must retrieve a database credential stored in AWS Secrets Manager in Account B. The secret in Account B is currently encrypted using a customer managed AWS KMS key. Which combination of actions must the administrator perform to grant the application access to the secret? (Select TWO.)
- Configure the resource-based policy of the secret in Account B to grant secretsmanager:GetSecretValue permissions to the IAM role of the EC2 instance in Account A.Cevap
- Configure the key policy of the customer managed KMS key in Account B to grant kms:Decrypt permissions to the IAM role of the EC2 instance in Account A.Cevap
- CModify the default KMS key policy for the AWS managed key aws/secretsmanager in Account B to grant cross-account decryption access to Account A.
- DAttach an IAM policy to the EC2 instance role in Account A that grants kms:Decrypt access to the default AWS managed key in Account B.
- EConfigure an IAM policy in Account A that grants the iam:PassRole permission to the AWS Secrets Manager service principal in Account B.
Cevap
Configure the resource-based policy of the secret in Account B to grant secretsmanager:GetSecretValue permissions to the IAM role of the EC2 instance in Account A, and configure the key policy of the customer managed KMS key in Account B to grant kms:Decrypt permissions to the IAM role of the EC2 instance in Account A.
To successfully set up cross-account access to a secret in AWS Secrets Manager, two key configurations are required in the owning account (Account B): first, the secret's resource policy must grant the external IAM role access to retrieve the secret value; second, the key policy of the customer managed KMS key used to encrypt the secret must grant the external IAM role decryption privileges.
Adım Adım Çözüm
Anahtar Kavram
Cross-account access to AWS Secrets Manager secrets requires using a customer managed KMS key, configuring the resource-based policy of the secret, and configuring the key policy of the KMS key to allow decryption by the external IAM principal.
Tahmini Süre:2m 0s