AWS Elastic Beanstalk installation for PHP

AWS Elastic Beanstalk is a dynamic service that allows easy deployment and scalability for your PHP applications. Follow these instructions to install AWS with New Relic's PHP agent.

For more information about using Amazon tools with New Relic, see Amazon Web Services (AWS) users.

Downloading New Relic

To download the latest New Relic agent:

  1. Log in to New Relic.
  2. From the New Relic menu bar, select (account) > Account settings.
  3. Select the option to download the agent for your platform.

Requirements

Before you install New Relic's PHP agent, make sure you have a supported Amazon Web Services account. In addition, for any New Relic installation, you will need your New Relic license key. This is a 40-character hexadecimal string that New Relic provides when you sign up for your account.

Installation

To install New Relic's PHP agent on AWS Elastic Beanstalk:

  1. In the .ebextensions folder inside your Elastic BeanStalk application, create a new file named newrelic.config.
  2. Add the following content to the file:

    packages:
      yum:
        newrelic-php5: []
      rpm:
        newrelic: INSERT_LINK_TO_AGENT
    commands:
      configure_new_relic:
        command: newrelic-install install
        env:
          NR_INSTALL_SILENT: true
          NR_INSTALL_KEY: INSERT_LICENSE_KEY
  3. Replace INSERT_LINK_TO_AGENT with the appropriate URL:

    • 64-bit AMI

      http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
    • 32-bit AMI

      http://yum.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm
  4. Replace INSERT_LICENSE_KEY with your New Relic license key.
  5. Push your app to Elastic BeanStalk:

After a successful setup, it can take up to fifteen minutes before metrics begin to appear in New Relic. To view your APM Overview page: From the New Relic menu bar, select APM > Applications > (selected app).

For more help

Additional documentation resources include:

Join the discussion about PHP in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.