AWS Certified Developer – Associate — Question 30

A developer needs to deploy an application running on AWS Fargate using Amazon ECS. The application has environment variables that must be passed to a container for the application to initialize.
How should the environment variables be passed to the container?

Answer options

Correct answer: B

Explanation

The correct answer is B because environment variables must be defined in the task definition to be available to the container at runtime. Options A, C, and D are incorrect as they either refer to the incorrect definition context or use the wrong parameter for passing environment variables.