---
title: "Deploy Datadog on AWS Elastic Beanstalk"
description: "Learn how to deploy the Datadog Agent and monitor AWS Elastic Beanstalk."
author: "David Caplan"
date: 2014-05-07
tags: ["infrastructure monitoring", "aws", "aws elastic beanstalk"]
blog_type_id: the-monitor
locale: en
---

*Editor's note (September 2019): The steps below have been modified for Agent 6. See our *[*documentation*](https://docs.datadoghq.com/integrations/amazon_elasticbeanstalk.md)* for more details about this integration.*

***David Caplan ***[***@davc***](https://twitter.com/davc)*** is the Chief Technology Officer at ***[***SolveBio***](https://www.solvebio.com/)*** and runs his own blog, ***[***davecap.com***](http://www.davecap.com/)***.***

At SolveBio we use [AWS Elastic Beanstalk](https://aws.amazon.com/elasticbeanstalk/) to manage some of our apps on EC2. Our API for biomedical data is critical for running diagnostic tests, so we like to keep an eye on its performance. We started using Datadog a few weeks ago to help us out with monitoring and metrics, but we ran into some issues getting it to play nicely with Elastic Beanstalk. This article describes how we got it all working together.

## How SolveBio uses Elastic Beanstalk

Similar to [Heroku](https://www.heroku.com/), Elastic Beanstalk makes it super easy to deploy various web apps to EC2. At SolveBio, we mostly work with [Python](https://www.python.org/) and [Node.js](http://nodejs.org/), so the method described here focuses on those stacks. The [Datadog Agent](https://docs.datadoghq.com/agent/basic_agent_usage.md?tab=agentv6) is a daemon managed by [`supervisord`](http://supervisord.org), which sends system metrics to Datadog but also works as a `statsD` proxy.

One kink we initially encountered was that the Datadog Agent and Elastic Beanstalk rely on separate installations of `supervisord`. This confuses the heck out of Elastic Beanstalk. Luckily, getting past this kink is simple. You just have to tell Elastic Beanstalk to stop Datadog before deploying and start it again when you're done.

Before continuing, make sure you've read the [Elastic Beanstalk Getting Started Guide](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/GettingStarted.html) and [Customizing and Configuring a Python Container](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_custom_container.html).

## Deploy the Datadog Agent on Elastic Beanstalk

Once your project is all set up for Elastic Beanstalk, you can deploy the Datadog Agent by using Beanstalk's environment configuration files. Datadog provides a [`99datadog.config` file](https://docs.datadoghq.com/integrations/amazon_elasticbeanstalk.md#alternate-datadog-agent-configuration) that you can download and place in a new `.ebextensions` directory. You can also use the [containerized Datadog Agent](https://docs.datadoghq.com/integrations/amazon_elasticbeanstalk.md#datadog-container-agent-configuration) for monitoring, if you use containers in your Elastic Beanstalk environment.

Once you save your configuration file, commit the changes and then deploy your app using `git aws.push`. The Agent should be installed once the update finishes, and it should also keep working after further deploys to your Elastic Beanstalk instances. We found it helpful to [enable SSH login](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.ec2connect.html) to our instances for debugging.

## Now the Elastic Beanstalk monitoring fun begins

Now that we're up and running, monitoring AWS Elastic Beanstalk with Datadog has already proven to be very helpful. With that said, we're still getting acquainted with Datadog so I'll be back in a few weeks to share my thoughts on key AWS Elastic Beanstalk metrics to monitor and any tips and tricks or best practices I've gained. In the meantime, if you'd like to gain visibility into your AWS Elastic Beanstalk performance you can <!-- Sign-up trigger (try Datadog for free for 14 days) omitted -->.