ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 117 - DVA-C02 discussion

Report
Export

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?

A.
Define an array that includes the environment variables under the environment parameter within the service definition.
Answers
A.
Define an array that includes the environment variables under the environment parameter within the service definition.
B.
Define an array that includes the environment variables under the environment parameter within the task definition.
Answers
B.
Define an array that includes the environment variables under the environment parameter within the task definition.
C.
Define an array that includes the environment variables under the entryPoint parameter within the task definition.
Answers
C.
Define an array that includes the environment variables under the entryPoint parameter within the task definition.
D.
Define an array that includes the environment variables under the entryPoint parameter within the service definition.
Answers
D.
Define an array that includes the environment variables under the entryPoint parameter within the service definition.
Suggested answer: B

Explanation:

This solution allows the environment variables to be passed to the container when it is launched by AWS Fargate using Amazon ECS. The task definition is a text file that describes one or more containers that form an application. It contains various parameters for configuring the containers, such as CPU and memory requirements, network mode, and environment variables. The environment parameter is an array of key-value pairs that specify environment variables to pass to a container. Defining an array that includes the environment variables under the entryPoint parameter within the task definition will not pass them to the container, but use them as command-line arguments for overriding the default entry point of a container. Defining an array that includes the environment variables under the environment or entryPoint parameter within the service definition will not pass them to the container, but cause an error because these parameters are not valid for a service definition.

Reference: [Task Definition Parameters], [Environment Variables]

asked 16/09/2024
Krzysztof Dyrdal
48 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first