Step 1: Update your Amazon ECS application
In this section, you update your Amazon ECS application with a new revision of its task definition. The updated revision adds a new key and tag pair. In Step 3: Use the CodeDeploy console to deploy your Amazon ECS service, you deploy the updated version of your Amazon ECS application.
To update your task definition
Open the Amazon ECS console at https://console.aws.amazon.com/ecs/
. -
In the navigation pane, choose Task Definitions.
-
Select the check box for the task definition used by your Amazon ECS service.
-
Choose Create new revision.
-
For this tutorial, make a small update to the task definition by adding a tag. At the bottom of the page, in Tags, create a new tag by entering a new key and value pair.
-
Choose Create. You should see your task definition's revision number has been incremented by one.
-
Choose the JSON tab. Make a note of the following because you need this information in the next step.
-
The value for
taskDefinitionArn
. Its format isarn:aws:ecs:
. This is the ARN of your updated task definition.aws-region
:account-id
:task-definition/task-definition-family
:task-definition-revision
-
In the
containerDefinitions
element, the value forname
. This is the name of your container. -
In the
portMappings
element, the value forcontainerPort
. This is the port for your container.
-