Configuring ECS specific parameters

We also need to create an ECS specific parameters file, ecs-params.yml, which defines resource (CPU and memory) settings for the task to create in addition to setting the Network Mode as awsvpc, which is the only supported Network Mode for the Fargate launch type. The run parameters include the network configuration for subnets, security groups, and setting the Assign public IP option for the task to ENABLED. The subnets are obtained from the output of the ecs-cli up command. The security group is obtained from the output of the Get-EC2SecurityGroup -Region "us-east-1" -GroupId $groupid command, as listed earlier:

version: 1task_definition:  task_execution_role: ecsExecutionRole ecs_network_mode: awsvpc ...

Get Amazon Fargate Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.