How to create a new service in ECS cluster behind a load balancer

0 votes

Hi Team, 

I have one ECS cluster in AWS. I want to create a new service behind a load balancer. How can I do that with AWS CLI command?

Nov 8, 2020 in AWS by akhtar
• 38,260 points
1,530 views

1 answer to this question.

0 votes

Hi@akhtar,

The following create-service example shows how to create a service that is behind a load balancer. You must have a load balancer configured in the same Region as your container instance. This example uses the --cli-input-json option and a JSON input file called ecs-simple-service-elb.json with the following content.

$ aws ecs create-service \
    --cluster MyCluster \
    --service-name ecs-simple-service-elb \
    --cli-input-json file://ecs-simple-service-elb.json
answered Nov 8, 2020 by MD
• 95,460 points

Related Questions In AWS

0 votes
1 answer

How to attach a load balancer to an Auto Scaling group in AWS?

Hi@akhtar, You can attach one or more Classic Load ...READ MORE

answered Nov 26, 2020 in AWS by MD
• 95,460 points
877 views
0 votes
1 answer

How to create a Cluster Security Group in RedShift?

Hi@akhtar, You can create a new Amazon AWS Redshift ...READ MORE

answered Nov 27, 2020 in AWS by MD
• 95,460 points
947 views
0 votes
1 answer

How to create a Cluster Snapshot in AWS RedShift?

Hi@akhtar, You can create a manual snapshot of the ...READ MORE

answered Nov 27, 2020 in AWS by MD
• 95,460 points
798 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Create a task set in a service in ECS Cluster.

Hi@akhtar, You can create a task set in ...READ MORE

answered Nov 8, 2020 in AWS by MD
• 95,460 points
741 views
0 votes
1 answer

How to create a new, empty repository in AWS CodeCommit?

Hi@akhtar, You can create a repository and associate it with ...READ MORE

answered Nov 23, 2020 in AWS by MD
• 95,460 points
794 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP