Catching Event Detail from Elastic Beanstalk with Python and Boto

Asked

Viewed 37 times

2

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

1 answer

1


You can keep asking for events until your Nvironment status changes from "Updating" for "Ready". To browse 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']                                                 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.