Created
May 18, 2020 18:31
-
-
Save ashutoshkarna03/166969d545939194a39448f864014f8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_instance_details(instance_id, client): | |
response = client.describe_instances( | |
InstanceIds=[ | |
instance_id, | |
], | |
) | |
return dict( | |
instance_type = response['Reservations'][0]['Instances'][0]['InstanceType'], | |
state = response['Reservations'][0]['Instances'][0]['State']['Name'], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment