backbone-sdb.js
function getEC2IAMSecurityCredentials(role, callback) {
		httpRequest({host: EC2_METADATA_HOST, path: SECURITY_CREDENTIALS_RESOURCE + role}, null, function(error, jsonStr, httpResponse) {
			var credentials;
			try {
				credentials = JSON.parse(jsonStr);
			} catch (parseError) {
				if (!error) error = parseError;
			}

			callback(error, credentials, httpResponse);
		});
	}
function getEC2IAMSecurityCredentials(role, callback) {
		httpRequest({host: EC2_METADATA_HOST, path: SECURITY_CREDENTIALS_RESOURCE + role}, null, function(error, jsonStr, httpResponse) {
			var credentials;
			try {
				credentials = JSON.parse(jsonStr);
			} catch (parseError) {
				if (!error) error = parseError;
			}

			callback(error, credentials, httpResponse);
		});
	}
function getEC2IAMSecurityCredentials ( role , callback ) { httpRequest ( { host : EC2_METADATA_HOST , path : SECURITY_CREDENTIALS_RESOURCE + role } , null , function ( error , jsonStr , httpResponse ) { var credentials ; try { credentials = JSON . parse ( jsonStr ) ; } catch ( parseError ) { if ( ! error ) error = parseError ; } callback ( error , credentials , httpResponse ) ; } ) ; }
Gets the security credentials from the metadata service.

@method getEC2IAMSecurityCredentials
@private
@param {String} role IAM role name.
@param {Function} callback Callback function that receives the parsed credentials object returned by the metadata service.
Gets the security credentials from the metadata service .