Setup integration: AWS Elastic Beanstalk Notification

You need to setup an AWS SNS HTTPS endpoint for this integration!

This integration requires marbot  plus

AWS Elastic Beanstalk can run applications in various languages and frameworks. AWS Elastic Beanstalk Notifications are triggered by notable events include environment creation errors and all changes in environment and instance health. You can get either all event types or none; there is no filter feature available in Elastic Beanstalk.

Monitoring your Elastic Beanstalk environment

You need an existing Elastic Beanstalk environment for this example to work!

Unfortunately, Elastic Beanstalk (EB) notifications can not be configured to use an SNS topic using the graphical AWS Management Console. Instead, you have to use the AWS CLI to use the option in the aws:elasticbeanstalk:sns:topics namespace.

The command will add the option value to the aws:elasticbeanstalk:sns:topics namespace without touching the other namespaces. If you have existing options defined in the aws:elasticbeanstalk:sns:topics namespace it will override those values.

Replace the following values in the command below:

  • APPLICATION_NAME with the name of the EB application
  • ENVIRONMENT_NAME with the name of the EB environment
  • TOPIC_ARN with the SNS topic ARN that you created for marbot

And run the command in your terminal to enable SNS notifications:

aws --region us-east-1 elasticbeanstalk update-environment \
--application-name APPLICATION_NAME \
--environment-name ENVIRONMENT_NAME \
--option-settings Namespace=aws:elasticbeanstalk:sns:topics,OptionName="Notification Topic ARN",Value=TOPIC_ARN

Sample Alert

When the environment state changes, e.g. because you deploy a new application version, you should get an alert in Slack via a direct message:

Elastic Beanstalk Alert