Introduction
The AWS Elastic Beanstalk integration lets you record deployment activity as Rootly pulses every time your Elastic Beanstalk application deploys. It works by embedding the Rootly CLI into your.ebextensions deploy hooks — no separate service or OAuth connection required.
With this integration, you can:
- Automatically log a deployment pulse to Rootly every time a new version is deployed to an Elastic Beanstalk environment
- Tag pulses with the environment, service, and custom labels that matter to your team
- Surface deployment context on the incident timeline when an outage coincides with a recent deploy
- Use Rootly’s API key and the CLI to fit naturally into your existing
.ebextensionsconfiguration
This integration is CLI-based and does not require an OAuth connection in Rootly. You configure it entirely through your application’s
.ebextensions directory, using your Rootly API key to authenticate the CLI.Before You Begin
Before setting up the Elastic Beanstalk integration, make sure you have:- A Rootly account and a Rootly API key (found under your account settings)
- An AWS Elastic Beanstalk application with access to modify
.ebextensionsconfiguration files - The ability to set environment configuration variables in Elastic Beanstalk for your API key and environment name
Store your Rootly API key as an Elastic Beanstalk environment variable rather than hardcoding it in your
.ebextensions config file. This keeps secrets out of your repository.Installation
Add environment variables to your Elastic Beanstalk environment
In the AWS Console (or via the EB CLI), add the following environment configuration variables to your Elastic Beanstalk environment:
These values will be read by the deploy hook script at runtime using
| Variable | Value |
|---|---|
rootly_api_key | Your Rootly API key |
environment | The environment name (e.g. production, staging) |
service | The service name as it appears in Rootly |
get-config container.Create the .ebextensions config file
In your application repository, create a file at
.ebextensions/rootly.config (the filename does not have to be rootly).Add the following content to the file, adapting the labels value for your use case:The script is placed in
appdeploy/pre/ so it runs before the new application version is deployed. This means the pulse fires at the start of each deployment. You can duplicate the hook into appdeploy/post/ to also log a pulse when the deployment completes.Customize labels for your team
Update the Labels appear on the pulse in Rootly and make it easier to filter deployment activity across services and environments.
labels variable in the script to include any metadata your team finds useful. Labels are comma-separated key-value pairs:Deploy your application
Commit the
.ebextensions/rootly.config file and deploy your application. On the next deployment, the hook script will run, install the Rootly CLI, and log a pulse to your Rootly workspace.Verify the integration is working by navigating to Pulses in Rootly after your next deployment. You should see a pulse with the summary “Deploy in progress…” tagged with the environment and service you configured.
How Pulses Work
Each time the deploy hook runs, the Rootly CLI sends a pulse to your workspace with:- Summary: The message passed to the
rootly pulsecommand (e.g. “Deploy in progress…”) - Environment: The environment name from the
environmentvariable - Service: The service name from the
servicevariable - Labels: Any key-value labels you configured
If an incident is declared around the same time as a deployment, the deployment pulse will surface automatically on the incident timeline — giving responders immediate context about whether a recent deploy may have contributed to the issue.
Customizing the Hook
Log a pulse on deployment completion
To also record when a deployment finishes, create a second hook file atappdeploy/post/:
Use the Rootly CLI for more than pulses
The Rootly CLI supports additional commands beyondpulse. You can also use it to declare incidents, update incident status, or trigger workflows from your deploy hooks. See the Rootly CLI documentation for the full command reference.
Troubleshooting
No pulse appears in Rootly after a deployment
No pulse appears in Rootly after a deployment
Check the Elastic Beanstalk environment logs for the deploy hook output. Look for errors from the
curl install command or the rootly pulse command. Common causes include network access restrictions that prevent the EC2 instance from reaching raw.githubusercontent.com or the Rootly API endpoint.The API key variable is empty at runtime
The API key variable is empty at runtime
Confirm that the environment configuration variable
rootly_api_key is set in your Elastic Beanstalk environment settings. Variables must be set in the environment itself (not just in the .ebextensions config) to be accessible via get-config container. Redeploy after adding variables.The hook script runs but the CLI fails to install
The hook script runs but the CLI fails to install
The install script requires
curl and internet access from the EC2 instance. If your Elastic Beanstalk environment runs in a private subnet without internet access, the CLI install will fail. In this case, pre-install the Rootly CLI in a custom AMI or bundle it directly in your application artifact rather than downloading it at deploy time.Pulses are not linked to the correct service or environment
Pulses are not linked to the correct service or environment
The
--services and --environments flags in the CLI command must match the exact names of the service and environment as they appear in Rootly. Names are case-sensitive. Check your Rootly services and environments configuration and update the service and environment variables in your Elastic Beanstalk environment settings accordingly.Related Pages
Rootly CLI
Full reference for the Rootly CLI, including all available commands and flags.
Pulses
Learn how deployment pulses appear in Rootly and how they surface during incidents.
Services
Configure services in Rootly to link deployment pulses to the right team and context.