Use the Amazon ECS Render Task Definition Action
masterThe amazon-ecs-render-task-definition action inserts a new container image URI into an existing Amazon ECS task definition JSON file. This creates a new, modified task definition file that can then be used for deployment.
Task Definition Source Precedence
The action requires a way to identify the task definition. The precedence for fetching the task definition is as follows:
task-definition(file path): If a file is provided, it takes precedence over all other options. If both a file and an ARN are provided, a warning is issued and the file is used.task-definition-arntask-definition-family
Note: If none of these three options are provided, the action will throw an error.
- name: Render Amazon ECS task definition
id: render-web-container
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: web
image: amazon/amazon-ecs-sample:latest