You are deploying an application to Amazon ECS on AWS Fargate. The container needs environment variables passed in for the application to start. Where should you specify these environment variables?
Choose an answer
Tap an option to check your answer.
Correct answer: Add an array of environment variables under the environment parameter in the task definition..
Why this is the answer
In Amazon ECS, environment variables for containers are specified within the task definition. The task definition acts as a blueprint for your application, describing the containers, their resources, and their configurations, including environment variables. The environment parameter within the container definitions section of the task definition is the correct place to define these variables. Incorrect options: Specifying environment variables in the service definition is incorrect because the service definition primarily manages the lifecycle and scaling of tasks, not the individual container configurations. The entryPoint parameter in either the task or service definition is used to override the default entry point of a container image, not to pass environment variables.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed