ECS.client.create_service() Incorrectly Requiring loadBalancers param
See original GitHub issueAttempting to run ECS.client.create_service() without a load balancer. Per the documentation, loadBalancers parameter is not required: https://boto3.readthedocs.org/en/latest/reference/services/ecs.html#ECS.Client.create_service
When executed via boto3, I’m seeing the following error:
(Error code 400)
File "/usr/local/lib/python3.5/site-packages/botocore/client.py", line 310, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.5/site-packages/botocore/client.py", line 407, in _make_api_call
raise ClientError(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidParameterException) when calling the CreateService operation: A role was passed, but no load balancers were present.
The aws_cli tool does not require the loadBalancers parameter.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Troubleshoot common errors with API calls in Amazon ECS
This error is logged when the AWS Identity and Access Management (IAM) user or role making the API call doesn't have the required...
Read more >Service definition parameters - Amazon Elastic Container ...
A service definition defines how to run your Amazon ECS service. The following parameters can be specified in a service definition.
Read more >EcsClient (AWS SDK for Java - 2.18.41)
Service client for accessing Amazon ECS. This can be created using the static builder() method. Amazon Elastic Container Service.
Read more >Deploy services to a swarm - Docker Documentation
the image name and tag the service containers should run; how many containers participate in the service; whether any ports are exposed to...
Read more >Network.AWS.ECS.CreateService - Hackage
The load balancer distributes traffic across the tasks that are associated ... This parameter is required for task definitions that use the awsvpc...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Removing
role
fixes the issue. It appears that there is some confusion on whether adding arole
param means thatloadBalancers
param is required:https://boto3.readthedocs.org/en/latest/reference/services/ecs.html#ECS.Client.create_service role:…“This parameter is only required if you are using a load balancer with your service.”
As stated before,
role
can be used with the aws_cli tool without requiringloadBalancers
.@mccammon - Not the documentation is updated with more detail. You can see in our documentation https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html#ECS.Client.create_service:
I am closing the issue as the issue has been resolved.