Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dherault committed Jul 1, 2019
1 parent 51191cd commit bea8ccd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,21 @@ To use `AWS.invoke` you need to set the lambda `endpoint` to the serverless endp
const lambda = new AWS.Lambda({
apiVersion: '2015-03-31',
region: 'us-east-1',
endpoint: process.env.IS_OFFLINE ? 'http://localhost:3000' : null,
endpoint: process.env.IS_OFFLINE ? 'http://localhost:3000' : undefined,
})
```

All your lambdas can then be invoked in a handler using

```js
const builderLambdaParameters = {
const lambdaInvokeParameters = {
FunctionName: 'my-service-stage-function',
InvocationType: 'Event',
LogType: 'None',
Payload: JSON.stringify({ data: 'foo' }),
}

lambda.invoke(builderLambdaParameters).send()
lambda.invoke(lambdaInvokeParameters).send()
```

## Token authorizers
Expand Down

0 comments on commit bea8ccd

Please sign in to comment.