Bird
0
0

How can you securely store and provide database credentials to containers running on AWS ECS without hardcoding them in images?

hard📝 Application Q9 of 15
AWS - ECS and Fargate
How can you securely store and provide database credentials to containers running on AWS ECS without hardcoding them in images?
AWrite credentials in ECS task definition plaintext
BStore credentials in container image files
CUse public environment variables in task definition
DUse AWS Secrets Manager and inject secrets as environment variables
Step-by-Step Solution
Solution:
  1. Step 1: Identify secure secret storage

    AWS Secrets Manager securely stores secrets and integrates with ECS to inject them at runtime.
  2. Step 2: Avoid insecure methods

    Hardcoding in images or plaintext task definitions exposes secrets; public environment variables are insecure.
  3. Final Answer:

    Use AWS Secrets Manager and inject secrets as environment variables -> Option D
  4. Quick Check:

    Secure secret injection = C [OK]
Quick Trick: Use Secrets Manager to inject credentials securely [OK]
Common Mistakes:
  • Hardcoding secrets in images
  • Using plaintext task definitions
  • Exposing secrets as public env variables

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes