0.0.9 • Published 7 years ago

@nutshelllab/service-invoke v0.0.9

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
7 years ago

service-invoke

About

This package is used in Nutshell's lambda-powered micro-service template. We have a rule saying it's ok for a lambda to make a direct invokation of another lambda ONLY IF there're both in the same service.

That's why this package infered the current service execution context.

Usage

Configure your serverless.yml to inject environment variable

provider:
  ...
  environment: # Service wide environment variables
    SLS_SERVICE_NAME: ${self:service.name} 
    SLS_STAGE: ${self:provider.stage} 

Invoke in your JS File

import serviceInvoke from '@nutshelllab/service-invoke'

/// ... your awesome code here
const result = await serviceInvoke('lambda-in-the-same-service', {
  // PAYLOAD
})

:construction: This repo has just be created :construction:

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago