Create ECS Task Definition

Create ECS Task Definition

  1. Initialize a FargateTaskDefinition object within the ProductsServiceStack constructor:
   FargateTaskDefinition fargateTaskDefinition = new FargateTaskDefinition(this, "TaskDefinition",
       FargateTaskDefinitionProps.builder()
           .build());

Architect

  1. Set the family name for the task definition group:
   .family("products-service")

Architect

  1. Next, define the CPU and memory limits for the task definition:
   .cpu(512)
   .memoryLimitMiB(1024)

Architect