Creating ecs service from ecs-cli

0

Hi,

I would like to create a new ecs service instance from ecs-cli, with the parameters specified below:

Launch type: FARGATE
Service name: ecs-service-01
Number of tasks: 1
Cluster VPC: vpc-0000000
Subnets: subnet-0000000
Security Groups: sg-00000000 (default)
Auto-assign public IP: ENABLED

I had a look at options available from the URL below, but it seems like the command only set launch-type and VPC from the above specified options.
https://docs.aws.amazon.com/en_us/AmazonECS/latest/developerguide/cmd-ecs-cli-compose-service-create.html#cmd-ecs-cli-compose-service-create-options

Could someone show me if it is possible to set all of the 7 options shown above from ecs-cli command?

monocom
asked 3 years ago826 views
1 Answer
0

I found the solution here:
https://docs.aws.amazon.com/en_us/AmazonECS/latest/developerguide/cmd-ecs-cli-compose-ecsparams.html

The necessary params can be set using ecs-params.yml, with the option below:
-------snippet-----------
awsvpc_configuration:
subnets:
- "subnet ID 1"
- "subnet ID 2"
security_groups:
- "security group ID"
assign_public_ip: ENABLED

monocom
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions