A company is using a multi-account AWS architecture. A SysOps administrator is configuring an application running on an Amazon EC2 instance in Account A (account ID ) that must retrieve a database connection string. The connection string is stored as a SecureString parameter named `/prod/db/connection_string` in AWS Systems Manager Parameter Store in Account B (account ID ). The parameter is encrypted with a customer managed AWS KMS key in Account B. Which configuration will allow the application in Account A to retrieve the parameter value?
- Configure the application to assume an IAM role in Account B that has permissions to perform ssm:GetParameter on the parameter and kms:Decrypt on the KMS key. Grant the EC2 instance profile in Account A permissions to assume this role.Cevap
- BConfigure a resource-based policy on the Parameter Store parameter in Account B to allow Account A's IAM role to perform ssm:GetParameter, and add Account A's IAM role to the KMS key policy in Account B with kms:Decrypt permissions.
- CShare the Parameter Store parameter with Account A using AWS Resource Access Manager (RAM). Update the KMS key policy in Account B to grant kms:Decrypt permissions to the EC2 instance profile role in Account A.
- DConfigure the IAM role of the EC2 instance in Account A with permissions to perform ssm:GetParameter directly on the parameter ARN in Account B, and grant it kms:Decrypt permissions on the KMS key in Account B.
Cevap
Configure the application to assume an IAM role in the destination account that has permissions to retrieve the parameter and decrypt it using the customer managed KMS key, while granting the EC2 instance profile in the source account permissions to assume this role.
Systems Manager Parameter Store does not support resource-based policies. To access a parameter across AWS accounts, the application must assume an IAM role in the target account (Account B) that has the required permission policies (ssm:GetParameter and kms:Decrypt). The source account's IAM role must have permission to perform sts:AssumeRole on the target role.
Adım Adım Çözüm
Anahtar Kavram
Cross-account access to Systems Manager Parameter Store parameters using IAM role assumption
Tahmini Süre:1m 30s