Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
119 lines (110 sloc) 7.34 KB

AppDynamics Agent Deployment on AWS Elastic Beanstalk


This repository contains the logic to deploy AppDynamics Agents within an AWS Elastic Beanstalk environment. The standard Extension process of Elastic Beanstalk is used. The extension will be added by creating a folder called .ebextensions within your Application Folder. General Details can be found in the .ebextensions Documentation.

The steps performed by the Extensions could vary by technology but here is a general description:

  • Download of the Agent Bits
  • Execution of the Deployment Script
    • Setting of the the Environment variables
    • Extracting the Agent
    • Configuration of the Application
    • Startup of the Agent if needed

Supported Technologies/Agents

Platform Application Agent Machine Agent Analytics Agent
Java Yes Yes Yes

Repository Structure

Folder Description
_common Files that span across each platform
_common/.ebextensions/nginx Nginx configuration for the sample application
<platform>-(machine)-(analytics) Platform and Agent specific scripts
<platform>-(machine)-(analytics)/.ebextensions Platform specific AWS Elastic Beanstalk Extension Configuration
<platform>-(machine)-(analytics)/testing Testing Script for Linux

Supported Environment Variables

Variable Description Required Default
APPDYNAMICS_CONTROLLER_HOST_NAME Environment Variables for Agent Yes N/A
APPDYNAMICS_CONTROLLER_PORT Environment Variables for Agent Yes N/A
APPDYNAMICS_CONTROLLER_SSL_ENABLED Environment Variables for Agent No false
APPDYNAMICS_AGENT_ACCOUNT_NAME Environment Variables for Agent No customer1
APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY Environment Variables for Agent Yes N/A
APPDYNAMICS_AGENT_APPLICATION_NAME Environment Variables for Agent Yes N/A
APPDYNAMICS_AGENT_TIER_NAME Environment Variables for Agent No Env Name
APPDYNAMICS_SIM_ENABLED Environment Variables for Agent No false
APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME Setting required for Business iQ. See Analytics Agent for details No N/A
APPDYNAMICS_ANALYTICS_EVENT_ENDPOINT Setting required for Business iQ. See Analytics Agent for details No N/A
APPDYNAMICS_DEBUG Will set the Agents Logging Level to Debug if true No N/A

Install Pre-requisites


Check MacOS EB CLI Install for details. Install using homebrew:

  • brew update
  • brew install awsebcli


  • Clone this repository
    • git clone
  • Navigate to your Application Folder or Clone your Application repository
    • git clone
    • cd spring-music
  • Copy or create the .ebextensions Folder within your Apps root folder
    • mkdir .ebextensions
  • Depending on your application you might need to change the Nginx configuration
    • cp -r ../aws-elasticbeanstalk/_common/.ebextensions/nginx ./.ebextensions/
  • Copy or create the .ebextensions/appd.config File into the previously created Folder
    • cp ../aws-elasticbeanstalk/java/.ebextensions/appd.config ./.ebextensions/
  • Configure the appd.config File
    • Select the appropriate Agent Versions e.g.:
    • Configure the Environment Variables. These are the minimum required ones:
  • Make sure you got your Buildfile (how your application bits are built) and Procfile (how your application is started)
    • Buildfile e.g. build: ./gradlew clean assemble
    • Procfile e.g. web: java -Dserver.port=8080 -jar build/libs/staging-1.0.jar
  • Commit your changes
    • git add ./
    • git commit -m "my app with appdynamics"
  • Deploy your Application
    • eb init <MY-NEW-EB-APP> -p java
    • eb create <MY-NEW-EB-APP-ENV>

Sample Deployment

Linux using Testing Script

  • Make sure you have git and eb (Elastic Beanstalk CLI) installed
  • Clone this Repository git clone
  • Navigate to the Agent Combination you want to test cd ./aws-elasticbeanstalk/<platform>-(machine)-(analytics)/testing
  • Execute the script with the corresponding options
    • The script will prompt if you forget to specify all required options
    • You can display the Usage Info by ./ -h


  • Sample Application UI Sample Application UI
  • Elastic Beanstalk UI Elastic Beanstalk UI
  • AppDynamics Flowmap AppDynamics Flowmap
  • AppDynamics Server Visibility AppDynamics Server Visibility
  • AppDynamics Analytics Agent AppDynamics Analytics Agent

Important Notes

  • There is a delay of the Machine Agent Startup, so give it some time.


  • Get all Elastic Beanstalk Log Files as .zip
    • eb logs -z
  • Where to look
    • Staging/Build/Deployment Errors eb-activity.log
    • Application Logs web-1.log and web-1.error.log (Example for a Java web App)


  • Source Rules for EB Log files
  • Other Technologies
  • Automated Jenkins testing
You can’t perform that action at this time.