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
질문됨 3년 전838회 조회
1개 답변
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
답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠