Skip to content
This repository has been archived by the owner on Dec 24, 2019. It is now read-only.

Chunk DescribeInstances (50 instances at a time) #25

Closed
hjacobs opened this issue Apr 26, 2017 · 2 comments
Closed

Chunk DescribeInstances (50 instances at a time) #25

hjacobs opened this issue Apr 26, 2017 · 2 comments
Assignees

Comments

@hjacobs
Copy link
Owner

hjacobs commented Apr 26, 2017

It appears that AWS/boto can describe only 50 instances at the time (hard limit). For large clusters, we ran into the issue since we can easily exceed 50 node cluster.

Proposed solution: split instances into 50 items batches for processing.

See #24

@hjacobs
Copy link
Owner Author

hjacobs commented Apr 27, 2017

I just tried it out and the error looks like:

>>> len(instance_ids)
76
>>> a = boto3.client('autoscaling')
>>> a.describe_auto_scaling_instances(InstanceIds=instance_ids)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 253, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 557, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the DescribeAutoScalingInstances operation: The number of instance ids that may be passed in is limited to 50

@hjacobs hjacobs self-assigned this Apr 27, 2017
@hjacobs
Copy link
Owner Author

hjacobs commented Apr 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant