Installing the infrastructure agent on AWS

Are you deploying Amazon EC2 instances and want to deploy the New Relic infrastructure monitoring agent on them? Do you want to know the fastest, easiest way to deploy the agent? Would you like to receive data within 60 seconds? If you answered yes to any of these questions, this post is for you!

Zero to data in 60 seconds!

Installing the infrastructure agent on AWS

Whether you’re in development or testing, you’re deploying a production instance, or you need an instance to work with for development, you’ll want to deploy the New Relic infrastructure monitoring agent.

The great news is that deploying the New Relic infrastructure agent on an Amazon EC2 Amazon Linux instance is a quick. How quick? That depends on how fast you click. (Watch the video in the next section to see me deploy 9 instances in 23 seconds.)

Amazon Linux, provided by Amazon Web Services (AWS), is an environment for applications running on Amazon EC2.

To jump in and try out installing the New Relic infrastructure agent on just one instance, you can follow this quickstart:


But the best news is that once you’ve launched your instances, you’ll start seeing data in New Relic within just 60 seconds.


3 … 2 … 1 … launch!

There are several ways to deploy the New Relic infrastructure agent. One is to launch an Amazon EC2 instance, SSH into it, and manually deploy the agent. Or you can use AWS CloudFormation to take care of everything. Or, you can even use automation tools.

Regardless of your path, nothing beats the sheer speed of kicking off EC2 instances yourself and deploying the latest version of the New Relic infrastructure agent simultaneously. Here’s how to do it.


First, some ground rules

  • If you don’t already have one, you’ll need a New Relic account.
  • Get your New Relic ingest-license key from API keys. Find your API keys by clicking your account name (in the lower left). Use the three dots on the right side to copy your key.
  • You’ll also need an AWS account. If you don’t have one, get one at
  • For this demo, I’ll be using Amazon Linux 2. You’ll need to substitute the proper code if you are using other versions of Linux.


Basic steps

There are 5 basic steps to installing the infrastructure agent on AWS:

1. Launch an instance from the AWS Amazon EC2 console and give it a name.

2. Select Amazon Linux 2 AMI.

3. Select your options for:

  • key pair
  • network (Select a security group that allows HTTP traffic.)
  • storage

4. Open Advanced details. (This is where the magic happens.)

5. Select Launch instance to complete the process.


The magic in step 4

In step 4, where you configure the advanced details, look for a section at the bottom labeled User data. Copy and paste this short script in the User data field (don’t select base64). Then replace [YOUR_KEY] with your license key.

Syntax counts! Copy/paste may modify the quote marks or dashes. If you are experiencing issues with your copy/paste, double-check your single and double quotation marks and double-dashes.

Here’s an example with a license key of 12345:

Next steps

Feel free to share this with anyone who needs to know how fast and easy it is to deploy the New Relic infrastructure monitoring agent to an Amazon EC2 instance.

If you’re not already using New Relic, get started with New Relic today.

DISCLAIMER: Webiscope LTD hereby declare that it do not own the rights to this content. All rights belong to the owner. No Copyright Infringement Intended.

Contact Us

Webiscope is now part of Aman Group

We are happy to announce that Webiscope is now part of Aman Group. We look forward giving our customers and partners greater value with more complete solutions and outstanding service.