Skip to content

Instantly share code, notes, and snippets.

if (digest == signature) {
// Request is valid
} else {
// Request is invalid
console.log("Request is invalid");
}
exports = function(payload) {
var queryArg = payload.query.arg || '';
var body = {};
if (payload.body) {
body = JSON.parse(payload.body.text());
}
// Get x-signature header and create digest for comparison
@jkras
jkras / newrelic-infra.config
Created January 2, 2017 23:08
New Relic Infrastructure Server Config file for AWS Elastic Beanstalk
files:
"/home/ec2-user/new_relic_servers_setup.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
printf "license_key: $NEW_RELIC_LICENSE_KEY" | sudo tee /etc/newrelic-infra.yml
printf "[newrelic-infra]\nname=New Relic Infrastructure\nbaseurl=http://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64\nenable=1\ngpgcheck=0" | sudo tee /etc/yum.repos.d/newrelic-infra.repo
yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'