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
gefragt vor 3 Jahren838 Aufrufe
1 Antwort
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
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen