store-failed-reports

1.0.0 • Public • Published

Store failed reports

This lambda takes the following input and executes an API call to subscriptions to store failures. The template.yaml file in this folder is for independent integration testing purposes only.

{ 
  'options': {    
    'subscriptionsHost': 'string',
    'environment': 'string',
    'timeout': int,
  }
}

Build and Test Locally

Build the lambda function using the sam build command.

$ sam build

The SAM CLI installs dependencies defined in ./package.json, creates a deployment package, and saves it in the ./.aws-sam/build folder.

Test a single function by invoking it directly with a test event. An event is a JSON document that represents the input that the function receives from the event source. Test events are included in the ./events sub folder of this lambda.

Run functions locally and invoke them with the sam local invoke command.

$ sam local invoke StoreFailedReportsFunction --event events/event.json

The SAM CLI can also emulate your application's API. Use the sam local start-api to run the API locally on port 3000.

$ sam local start-api

The SAM CLI reads the application template to determine the API's routes and the functions that they invoke. The Events property on each function's definition includes the route and method for each path.

      Events:
        SetWarehouse:
          Type: Api
          Properties:
            Path: /store-failed-reports
            Method: get

Unit Tests

Tests are defined in the ./tests folder in this project. Use NPM to install the Jest test framework and run unit tests.

$ npm install
$ npm test

Readme

Keywords

none

Package Sidebar

Install

npm i store-failed-reports

Weekly Downloads

0

Version

1.0.0

License

none

Unpacked Size

11.4 kB

Total Files

10

Last publish

Collaborators

  • twigweb