apancutt / aws-eb-newrelic-deploynotify
Send AWS Elastic Beanstalk deployment notifications to New Relic.
Installs: 19 932
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 1
Forks: 2
Open Issues: 0
Language:Shell
pkg:composer/apancutt/aws-eb-newrelic-deploynotify
This package is not auto-updated.
Last update: 2025-10-25 21:21:28 UTC
README
This script can be executed as part of the container commands directive supported by Elastic Beanstalk extensions to send a deployment notification to New Relic via the HTTP API service.
Installation
-
Download the bash script from this project into your application.
cd /path/to/your/app mkdir bin wget -P bin "https://raw.github.com/apancutt/aws-eb-newrelic-deploynotify/master/aws-eb-newrelic-deploynotify.sh" chmod +x bin/aws-eb-newrelic-deploynotify.sh -
Create an
.ebextensionsdirectory in your application root:mkdir .ebextensions -
Create a new file (or append to an existing one) for the
container_commandsconfiguration:echo "00_aws-eb-newrelic-deploynotify:" >> .ebextensions/03_container_commands.config echo " command: \"bin/aws-eb-newrelic-deploynotify.sh -a <APP NAME> -k <API KEY>\"" >> .ebextensions/03_container_commands.config echo " leader_only: true" >> .ebextensions/03_container_commands.configNote: If you already have a file for container commands, simply append the following lines:
00_aws-eb-newrelic-deploynotify: command: "bin/aws-eb-newrelic-deploynotify.sh -a <APP NAME> -k <API KEY>" leader_only: trueDon't forget to replace the arguments with the correct values.
-
Deploy to Elastic Beanstalk and check New Relic for a deployment notification (Applications > Your App > Events > Deployments). If a notification doesn't appear, check your environment logs in Elastic Beanstalk for any errors.
Usage
The installation steps above describe the minimal effort required to get this script working, but you may wish to make use of these extra options.
-aThe name your the application in Elastic Beanstalk.-dThe name of the deployer (default:AWS Elastic Beanstalk).-eError if the HTTP request fails. Note that this will abort the deployment.-hDisplays this help message.-kYour New Relic API key.-qQuiet mode.-vDisplay version information.
Caveats
- This script has only been tested with PHP applications. Please help improve this script by submitting pull requests for compatibility with alternative environments.
- The detection of the current application version is based on an undocumented feature of Elastic Beanstalk's deployment process which is subject to change without notice. The accuracy of the current version is not guaranteed.