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 \