An enterprise is launching a new microservice on Amazon Elastic Container Service (Amazon ECS) that needs to write data to an Amazon DynamoDB table. Which configuration represents the most secure method for granting the microservice the necessary permissions?
- ACreate an IAM user with DynamoDB write permissions, generate permanent access keys, and store them in the application container code.
- Associate an IAM role with the container task definition, granting it temporary security credentials with write access to the DynamoDB table.Answer
- CConfigure the container to use the AWS account root user access keys to ensure uninterrupted access to the DynamoDB database.
- DRequest AWS Support to configure and manage the database access permissions within the container under the Shared Responsibility Model.
Answer
Associating an IAM role with the container task definition, granting it temporary security credentials with write access to the DynamoDB table.
Associating an IAM role with the ECS task definition is the recommended practice. It allows the microservice container to retrieve temporary security credentials automatically. This removes the need to store long-term, hardcoded access keys in the code or container environment, minimizing credential exposure.
Step-by-Step Solution
Key Concept
Using IAM roles to grant temporary credentials to AWS resources and applications
Estimated Time:1m 0s