• /
  • Log in
  • Free account

AWS Elastic Beanstalk installation for Java

If you are an Amazon AWS Elastic Beanstalk user, the Java agent requires additional configuration.


Before completing the configuration, you must first:

To complete Java agent installation on AWS Elastic Beanstalk:

  1. In your WAR file, add the newrelic.jar and newrelic.yml files to WEB-INF/lib/.
  2. Repackage and deploy your new WAR file as a new application or an update to a previous application.
  3. Locate and connect to the underlaying EC2 instance. Once connected, find the path to newrelic.jar file using this command - ensure you search one directory at a time. Use either /var or /usr as appropriate.
sudo find </var | /usr> -name "newrelic.jar"

Pass -javaagent flag to JVM

To pass the -javaagent flag to JVM in AWS Elastic Beanstalk

  1. In the AWS console, open the Elastic Beanstalk.

  2. Select the relevant region.

  3. Select your application.

  4. In the left pane, select Configurations.

  5. Open Software Configuration.

  6. Under Container Options, add the following in the JVM options field:

  7. Select Apply to save.

Your Elastic Beanstalk will then update your environment.

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.