1.0.0 • Published 6 years ago

lambdifying v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

lambdifying: Lambda aws helper

Invoke(name,Payload,LogType) -> Promise

The name must a string in format:

'FunctionName:Qualifier:InvocationType'

'FunctionName:Qualifier'

'FunctionName:InvocationType'

'FunctionName'

The default values to InvocationType is RequestResponse, $LATEST to Qualifier and Tail to LogType.

Usage

const {invoke} = require('lambdifying')

invoke('lambdaName:prod:Event',{data:'is here'})
    .then((response) => {
        // response is the Payload parsed
    })
    .catch(error => {
        // error could be the error in request or LogResult if there is FunctionError
    })

invoke('lambdaName:prod',{data:'is here with RequestResponse as InvocationType'})
    .then((response) => {
        // response is the Payload parsed
    })
    .catch(error => {
        // error could be the error in request or LogResult if there is FunctionError
    })

invoke('lambdaName',{data:'is here with RequestResponse as InvocationType and Qualifier as $LATEST'})
    .then((response) => {
        // response is the Payload parsed
    })
    .catch(error => {
        // error could be the error in request or LogResult if there is FunctionError
    })

Client

Installing:

npm install -g lambdifying

Using:

lambdifying --help
Options:
  --version             Show version number                            [boolean]
  --help                Show help                                      [boolean]
  -i, --invoke          function to invoke in format:
                        FunctionName:Qualifier:InvocationType
                        FunctionName:Qualifier
                        FunctionName:InvocationType
                        FunctionName
                                                                        [string]
  -p, --payload         Payload to send                                 [string]
  --pf, --payload-from  File from where get payload                     [string]
  --lt, --logtype                                     [string] [default: "Tail"]
1.0.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago