Monitoring Jump Start: Elastic Beanstalk environment

Michael Wittig – 14 Mar 2018

Elastic Beanstalk is a platform to run your applications on AWS. Elastic Beanstalk also provides features to help you to monitor your applications. We created a CloudFormation template that you can use to monitor any Elastic Beanstalk environment in a minute.

What do I have to monitor?

Each EC2 instance sends metrics to CloudWatch that we can observe with CloudWatch Alarms. We recommend to create alarms for the following metrics:

  • CPU
    • CPUUtilization
    • CPUCreditBalance

If a metric crosses the alarm’s threshold, you receive an alert in Slack. Elastic Beanstalk comes with a mechanism to customize environments that you can use to automate the creation of CloudWatch Alarms.

  1. In your Elastic Beanstalk project’s source code, create a folder .ebextensions (learn more
  2. Copy the ([marbot-elastic-beanstalk.config] file into the .ebextensions folder (file must end with .config!).
  3. Adjust the MarbotEndpointId option_settings in the marbot-elastic-beanstalk.config file.
  4. Deploy the application.

Besides metrics, Elastic Beanstalk sends out notifications if the state of the environment has changed. E.g., because of a failed deployment.

Since AWS does not support filtering the notifications, marbot takes over filtering for you. For each new important notification, you receive an alert in Slack.

Set up instructions

  1. Create the CloudFormation stack with a single click
    1. Ensure that you selected the AWS region of your Elastic Beanstalk environment monitoring target
    2. Set the EndpointId parameter to the ID of your endpoint. You can get this value by asking @marbot for it on your Slack channel.
    3. Set the ApplicationName parameter to the name of the Elastic Beanstalk application.
    4. Set the EnvironmentName parameter to the name of the Elastic Beanstalk environment.
    5. Review the threshold parameters
    6. Save by clicking the Create button.
      Monitoring Jump Start: Elastic Beanstalk environment
Michael Wittig

Michael Wittig

Consultant focusing on Amazon Web Services (AWS). Entrepreneur building Author of Amazon Web Services in Action, Rapid Docker on AWS, and

You can contact me via Email, Twitter, and LinkedIn.

Published on

marbot teaser

Chatbot for AWS Monitoring

Configure monitoring for Amazon Web Services: CloudWatch, EC2, RDS, EB, Lambda, and more. Receive and manage alerts via Slack. Solve incidents as a team.

Add to Slack
Microsoft Teams
Add to Teams