Configure the Java agent for AWS Elastic Beanstalk

  • Updated

Amazon Web Services (AWS) is a secure cloud services platform. By using Contrast, AWS users can maximize the security of their applications.

Make sure you have an AWS Elastic Beanstalk account.

To configure the Java agent for AWS Elastic Beanstalk:

  1. In your WAR file, add the contrast.jar file to WEB-INF/lib/.

  2. Repackage and deploy the new WAR file, either as a new application or an update to a previous application.

  3. Locate and connect to the underlying Elastic Compute Cloud (EC2) instance. Once connected, use the following command to find the path to contrast.jar file. (Add the full path to the agent after /opt, as appropriate.)

    sudo find /opt -name "contrast.jar"
  4. Next, you will pass the -javaagent flag to JVM in Elastic Beanstalk. In the AWS console, open Elastic Beanstalk. Choose a region and your application.

  5. In the left navigation, select Configurations.

  6. Open Software Configuration.

  7. In the JVM command line options field, substitute <YourContrastJarPath> for the path to your Contrast JAR and enter -javaagent:<YourContrastJarPath>.

  8. Select Apply to save.

  9. Elastic Beanstalk updates your environment.

For more information about AWS and the Contrast Java agent, go to the AWS documentation.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request