Skip to content

Instantly share code, notes, and snippets.

@sdejean
Created May 6, 2016 23:17
Show Gist options
  • Select an option

  • Save sdejean/259b5dd70bc910da56bc80708e9dc75b to your computer and use it in GitHub Desktop.

Select an option

Save sdejean/259b5dd70bc910da56bc80708e9dc75b to your computer and use it in GitHub Desktop.
from __future__ import print_function
from pprint import pprint
import json
import boto3
print('Loading function')
asg = boto3.client('autoscaling')
def lambda_handler(event, context):
try:
print("Describe AutoScaling Groups")
res = asg.describe_auto_scaling_groups()
pprint(res, indent=2, depth=1)
print("Done")
except Exception as e:
print(e)
raise(e)
return {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment