Step 4: Update your AppSpec file
In this section, you update your AppSpec file with a Hooks section. In
the Hooks section, you specify a Lambda function for the
AfterAllowTestTraffic lifecycle hook.
To update your AppSpec file
-
Open the AppSpec file file you created in Step 2: Create the AppSpec file of the Tutorial: Deploy an application into Amazon ECS.
-
Update the
TaskDefinitionproperty with the task definition ARN you noted in Step 2: Update your Amazon ECS application. -
Copy and paste the
Hookssection into your AppSpec file file. Update the ARN afterAfterAllowTestTrafficwith the ARN of the Lambda function that you noted in Step 3: Create a lifecycle hook Lambda function. -
Save your AppSpec file and upload to its S3 bucket.