AWS Certified Developer – Associate — Question 314

A developer manages an Amazon RDS for PostgreSQL database. An Amazon Elastic Container Service (Amazon ECS) container that uses AWS Fargate needs to modify the contents of the database during a nightly run.

Which combination of steps should the developer take to provide database access to the container in the MOST secure manner? (Choose two.)

Answer options

Correct answer: A, C

Explanation

Enabling IAM database authentication (Option C) is highly secure because it eliminates the need to manage database credentials, relying instead on temporary AWS IAM security tokens. For standard password authentication, storing credentials in AWS Secrets Manager and injecting them securely via the ECS task definition (Option A) ensures that secrets are not exposed in plaintext. Passing passwords via CloudFormation environment variables (Option B) is insecure, Cognito (Option D) is not designed for direct RDS database authentication, and KMS permissions (Option E) secure storage encryption but do not grant database access.