Getting Elastic Beanstalk Event Detail with Python and Boto

2

I have a deploy script done with Fabric and Boto to make application deploy in AWS Beanstalk and would like to print Event Details generated in beanstalk on the terminal during deploy. Does anyone know if this is something possible? If so, how can it be done?

    
asked by anonymous 28.08.2014 / 22:52

1 answer

1

You can keep asking events until the status of your environment changes from "Updating" to "Ready" . To find events, use describe_events :

eb = boto.connect_beanstalk()                                                  
resposta = eb.describe_events(environment_name='seu_environment', max_records=10)
eventos = resposta['DescribeEventsResponse']['DescribeEventsResult']['Events'] 
for evento in eventos:                                                         
    print evento['Severity'], \                                                
        'em', datetime.fromtimestamp(evento['EventDate']), \                   
        ':', evento['Message']                                                 
    
30.08.2014 / 20:21