An organization runs a backend microservice on Amazon Elastic Container Service (Amazon ECS) using AWS Fargate. The container needs to access a third-party API key at startup. A SysOps administrator stores the API key as a SecureString parameter named /prod/payment/api_key in AWS Systems Manager Parameter Store, encrypted with a customer managed AWS KMS key. In the ECS task definition, the parameter is referenced in the container definition's secrets configuration. When Fargate attempts to launch the tasks, they fail to transition to the RUNNING state, displaying a resource provisioning error. Which actions should the SysOps administrator take to resolve this issue? (Select TWO.)
- Add the ssm:GetParameters permission to the ECS task execution IAM role.Cevap
- Grant the kms:Decrypt permission for the customer managed KMS key to the ECS task execution IAM role.Cevap
- CAdd the ssm:GetParameters permission to the ECS task IAM role.
- DGrant the kms:Decrypt permission for the customer managed KMS key to the ECS task IAM role.
- EModify the trust policy of the ECS task execution IAM role to trust the Systems Manager service principal (ssm.amazonaws.com).
Cevap
To resolve the container provisioning failure, the ECS task execution IAM role must be granted permissions to retrieve the parameter (ssm:GetParameters) and to decrypt the parameter using the KMS customer managed key (kms:Decrypt).
The correct actions involve configuring the ECS task execution IAM role. This role is assumed by the ECS agent to perform pre-run actions such as pulling images and fetching secrets. It needs the ssm:GetParameters action to read the parameter and the kms:Decrypt action on the KMS key used for the parameter's encryption to successfully decrypt the SecureString.
Adım Adım Çözüm
Anahtar Kavram
Distinction between the ECS task execution role and the ECS task role, and the necessary IAM and KMS permissions required for SSM Parameter Store SecureString decryption during container initialization.