What does the following AWS CLI create-service command for ECS do?

Advertisement

aws ecs create-service \
–cluster production \
–service-name rest-api \
–task-definition rest-api:1 \
–desired-count 2 \
–launch-type “FARGATE” \
–network-configuration \
“awsvpcConfiguration={subnets=[subnet-0b29129ab],securityGroups=[sg-0b29129ab]}”

  • changes the security groups of the running rest-api task
  • creates a cluster called production and launches two containers into Fargate with the rest-api task definition
  • launches two containers onto Fargate into the existing production cluster using the rest-api task definition
  • creates a service definition for the rest-api task; put two containers on the production cluster when launched ecs-cli up command
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.