> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mezmo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Elastic Beanstalk

> Configure the Mezmo agent on AWS Elastic Beanstalk by adding a .config file to your app's .ebextensions directory with your ingestion key.

For the best user experience, we recommend logging into the [Mezmo web app](https://app.Mezmo.com/) and following the account-tailored add log source instructions. You may also follow the more generic instructions below

Copy the configuration for your version of the Mezmo agent into a .config file in your Elastic Beanstalk app's .ebextensions directory.

Before redeploying your Elastic Beanstalk app, be sure to insert your [Mezmo Ingestion Key](https://app.Mezmo.com/manage/api-keys) and specify any custom directories you want the Mezmo agent to monitor.

## Mezmo Agent v2

```yaml theme={null}
files:
  "/etc/yum.repos.d/logdna.repo":
    mode: "000644"
    owner: root
    group: root
    content: |
      [logdna]
      name=logdna packages
      baseurl=https://assets.logdna.com/el6/
      enabled=1
      gpgcheck=1
      gpgkey=https://assets.logdna.com/logdna.gpg

  "/home/ec2-user/logdna.sh":
    mode: "000755"
    owner: root
    group: root
    content: |
      #!/bin/bash
      rpm --import https://assets.logdna.com/logdna.gpg
      yum -y install logdna-agent
      systemctl start logdna-agent
      systemctl enable logdna-agent

  "/etc/logdna.env":
    mode: "000644"
    owner: root
    group: root
    content: |
      LOGDNA_INGESTION_KEY=YOURAPIKEY
      LOGDNA_TAGS=TEST

commands:
  1_install_agent:
    command: "/home/ec2-user/logdna.sh"
  2_enable_agent:
    command: "systemctl restart logdna-agent"

```
