/lambda-aws-sdk-call

A common Lambda to call any AWS service via AWS SDK

Primary LanguageJavaScript

lambda-aws-sdk-call

A common Lambda to call any AWS service via AWS SDK. It is based on the AWSJavaScriptSDK. Check the documentation to get Config, Services, Methods and Parameters names. Initial motivations can be read at “One Lambda to call any AWS service via AWS SDK”

Installation

Create a new Lambda function, set its Runtime to Node.js 8.10+ and paste on it the content of the file:

https://github.com/DiegoZoracKy/lambda-aws-sdk-call/blob/master/lambda-call-aws-sdk.js

Example

Example of an input to call lambda's listFunctions method defining the param MaxItems equals to 1:

Input

{
  "AWSConfig": {
    "region": "us-east-1"
  },
  "service": "Lambda",
  "method": "listFunctions",
  "params": {
      "MaxItems": 1
  }
}