Creating ECS task definitions
You have now reached the point where you have defined an ECS cluster using CloudFormation and created a number of supporting resources, including an RDS instance for your application database and an Application Load Balancer to service connections to your application.
At this stage, you are ready to create the ECS resources that will represent your application, which include ECS task definitions and ECS services.
We will get started by defining an ECS task definition in your CloudFormation template, as demonstrated in the following example:
Parameters: ... ... ApplicationImageId: Type: String Description: ECS Amazon Machine Image (AMI) ID ApplicationImageTag: Type: String Description: Application Docker Image Tag Default: latest ApplicationSubnets: Type: List<AWS::EC2::Subnet::Id> Description: Target subnets for EC2 instances ... ... Resources: ApplicationTaskDefinition: Type: AWS::ECS::TaskDefinition Properties...