Skip to content

Instantly share code, notes, and snippets.

@hendrixroa
Last active April 25, 2023 01:23
Show Gist options
  • Save hendrixroa/f088b0993ac97a50187bcb7daee1e878 to your computer and use it in GitHub Desktop.
Save hendrixroa/f088b0993ac97a50187bcb7daee1e878 to your computer and use it in GitHub Desktop.
AWS ECS Task defintion to config containers using template variables to avoid hardcoding.
[
{
"essential": true,
"image": "${ecr_image_url}",
"name": "${name}",
"portMappings": [
{
"containerPort": ${port},
"hostPort": ${port}
}
],
"logConfiguration": {
"logDriver" : "awslogs",
"options" : {
"awslogs-region" : "${region}",
"awslogs-group" : "${name}",
"awslogs-stream-prefix" : "${prefix_logs}"
}
},
"environment": ${environment}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment