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
feita há 3 anos838 visualizações
1 Resposta
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
respondido há 3 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas