Skip to content

Instantly share code, notes, and snippets.

@PercussiveRepair
Created March 1, 2016 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PercussiveRepair/86f9696af2273b403b62 to your computer and use it in GitHub Desktop.
Save PercussiveRepair/86f9696af2273b403b62 to your computer and use it in GitHub Desktop.
boto3 describe_auto_scaling_groups with full results
def get_asgs( key = None, secret = None ):
""" get autoscaling groups """
boto3.setup_default_session( region_name='eu-west-1', aws_access_key_id=key, aws_secret_access_key=secret )
client = boto3.client('autoscaling')
paginator = client.get_paginator('describe_auto_scaling_groups')
groups = paginator.paginate().build_full_result()
return groups['AutoScalingGroups']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment