A common Lambda to call any AWS service via AWS SDK
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore First version Sep 21, 2018
README.md Add Medium post to README.md Sep 25, 2018
lambda-call-aws-sdk.js set response status code based on status code from api call Oct 7, 2018
package.json Adjust package.json version Sep 21, 2018

README.md

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
  }
}