Created
August 6, 2018 07:33
-
-
Save SeptiyanAndika/2699736f8615211f46e5e47203462f81 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const AWS = require('aws-sdk'); | |
var params = { | |
IdentityPoolId: "ap-southeast-1:xxxx" | |
}; | |
AWS.config.region = 'ap-southeast-1'; | |
AWS.config.credentials = new AWS.CognitoIdentityCredentials(params); | |
var lambda = new AWS.Lambda(); | |
lambda.invoke({ | |
FunctionName: 'client-lambda-dev-public', // your function name | |
Payload: JSON.stringify({}) // how you send the email to the Lambda event | |
}, function(err, data){ | |
if (err) { | |
console.log(err, err.stack); | |
} else { | |
console.log(data); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment