AWS and AppDynamics APM

[Monitoring Cloud Applications]

Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Doug Bothwell peer review


Although the architecture for this example is trivially simple, much more is possible with Elastic Beanstalk.


After completing you complete this demo, the next step is to deploy manually rather than running the script. See Deploying applications manually.


Create a VPC and a Key Pair

In the AWC console:

  • Create a Virtual Private Cloud (VPC), or decide which pre-existing VPC to use.
    • Unless using the default VPC, note the ID of your chosen VPC.

If you want to SSH into EC2 instances:

  • Create a Key Pair, or decide which pre-existing Key Pair to use use. 
    • Note the name of your chosen Key Pair.

Construct the command

To deploy applications with Elastic Beanstalk, you need to know the variables variable settings for every AppDynamics Agent your application needs. This tutorial uses the Java Agent only, which keeps the list of variables required settings small.

In a text editor, create a string that begins with with ./

To that string, add script options, paired with values for the corresponding environment variables, as shown Append the script options and environment variable settings to the command string, as described in the table below. See the example command string below the table.

The completed string is your command.


Code Block
./ -c -p 8090 -K <your-secret-key> -r us-east-2 -a tutorialapp -e tutorialenv -b /Users/exampleperson/aws-elasticbeanstalk/java -i t2.small

A note about security



Do not use the procedure as described here,


with your secret key


entered at the command line in plain text,


in a production environment.

It may or may not be considered acceptable even for testing, depending on practices at your organization.


See Best Practices for Managing AWS Access Keys.

Set up the demo and the CLI


All file paths in these examples begin with the home directory, designated by the ~ character. Replace the ~ with whatever filesystem location you prefer.

In a terminal:

  • Git clone the demo repo. 
  • cd into the tutorial target directory as described above.
  • (Optional) Create a virtual environment.
  • Install eb.

Run the demo script

In a terminal, still in the tutorial target directory.

  • Run the following commandcd testing
  • Run your command.
    • When prompted, provide options you omitted from the command, if any.

Verify that the EC2 Node is Registered with the Controller


  • Click the URL (at bottom right in the screenshot above).
    • The Spring Music example application should open in a browser.

  • Use the +  button to add albums to the web page.
    • This is required to generate load for AppDynamics to monitor.

Monitor your Cloud Application with AppDynamics