Complete the code to specify the family name in an AWS ECS task definition.
{
"family": "[1]"
}The family field defines the name of the task definition family in ECS.
Complete the code to specify the container image in the task definition.
{
"containerDefinitions": [
{
"image": "[1]"
}
]
}The image field specifies the Docker image to use for the container, such as nginx:latest.
Fix the error in the task definition to correctly specify the CPU units for the container.
{
"containerDefinitions": [
{
"cpu": [1]
}
]
}The cpu field expects an integer number of CPU units, not a string or decimal.
Fill both blanks to define environment variables correctly in the container definition.
{
"containerDefinitions": [
{
"environment": [
{"name": "[1]", "value": "[2]"}
]
}
]
}Environment variables require a name and a value string.
Fill all three blanks to correctly configure port mappings in the container definition.
{
"containerDefinitions": [
{
"portMappings": [
{
"containerPort": [1],
"hostPort": [2],
"protocol": "[3]"
}
]
}
]
}The containerPort and hostPort are integers specifying ports. The protocol is usually "tcp" or "udp".