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
demandé il y a 3 ans838 vues
1 réponse
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
répondu il y a 3 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions