is there ANY way to execute aws-cli inside AWS Lambda? It doesn\'t seem to be pre-installed. (I\'ve checked with \"which aws\" via Node.js child-process, and it didn\'t exis
You can use the AWS node.js SDK which should be available in Lambda without installing it.
var AWS = require('aws-sdk');
var lambda = new AWS.Lambda();
lambda.invoke({
FunctionName: 'arn:aws:lambda:us-west-2:xxxx:function:FN_NAME',
Payload: {},
},
function(err, result) {
...
});
As far as I can tell you get most, if not all the cli functionality. See the full documentation here: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html