This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var qs = require('qs'); | |
var crypto = require('crypto'); | |
/** | |
* Verify HMAC | |
* @param proto | |
* @param hostname | |
* @param url | |
* @param method | |
* @param params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var qs = require('qs'); | |
var crypto = require('crypto'); | |
/** | |
* @param {http request} req | |
* @param {!string} apiKey | |
* @return {Boolean} True if verified | |
*/ | |
function verifyCallback(req, apiKey) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install cloud-utils | |
And then you can: | |
EC2_INSTANCE_ID=$(ec2metadata --instance-id) | |
You can get most of the metadata associated with the instance this way: | |
ec2metadata --help | |
Syntax: /usr/bin/ec2metadata [options] | |
Query and display EC2 metadata. |