Created
May 15, 2017 06:07
-
-
Save oivoodoo/5e741d72fdcb6bade599a3d5aded05df to your computer and use it in GitHub Desktop.
describe EMR
This file contains hidden or 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
import json | |
from boto3 import client | |
def date_handler(obj): | |
if hasattr(obj, 'isoformat'): | |
return obj.isoformat() | |
else: | |
raise TypeError | |
cluster_id = "<cluster-id>" | |
client = client('emr', 'us-east-1') | |
print(json.dumps(client.describe_cluster(ClusterId=cluster_id), | |
default=date_handler)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment