Create Task Definition

Create Task Definition

  1. Create Task Definition for like service using image pushed to ECR.
  • In the ECS interface, select Task definitions
  • Select Create new task definition

 Microservices with AWS Fargate

  1. Configure Task definition
  • Set Task definition family, enter Microservice-Definition-STACK_NAME

 Microservices with AWS Fargate

  1. We use the image pushed to ECR in the repository STACK_NAME-like-XXX
  • Like service code designed to call an endpoint on a monolith to persist data with DynamoDB. Reference the value of the MONOLITH_URL environment. We will create the environment with the Key of MONOLITH_URL and Value of ALB (specifically alb-STACK_NAME-XXX)
  • Select Next

 Microservices with AWS Fargate

  1. Perform environment configuration
  • We use AWS Fargate
  • Operating system is Linux
  • You can customize the Task size
  • Select Task role, select STACK_NAME-EcsServiceRole-XXX

 Microservices with AWS Fargate

  1. Use Amazon CloudWatch

 Microservices with AWS Fargate

  1. Check again and select Create

 Microservices with AWS Fargate

  1. Thus, we have successfully created a Task definition Microservice-Definition-STACK_NAME

 Microservices with AWS Fargate