NPM module - izara-middleware
Overview
Code that is shared by all services, including middleware code that executes at the beginning and end of each Lambda function and supporting code.
Middleware
The middleware that executes at the beginning and end of Lambda functions uses the Middy middleware module.
Middleware components
The below components are used:
Correlation ids
..
Middleware: Sample Debugging
...
Middleware: Stop Infinite Loops
...
Middleware: Log Timeout
...
Middleware: Http Header Normalizer
...
Middleware: Json Parse Body
...
Middleware: Url Encode Body Parser
...
Middleware: Validator
...
Middleware: Flatten Request
...
Middleware: Debug Message
All services will have an SNS queue deployed named MsgOut, this middleware adds a message to this queue when the middleware's LOG_LEVEL is set to DEBUG at the start of the request with the functions received request properties and at the end of the function with the final response formatted in a standard way for Integration Testing to process.
Service requests
The middleware module includes wrapped objects that manage requests sent to other AWS services, this allows the middleware to add or adjust the request in a standard way, passing on values across the lifetime of a multi-resource action.
Services
The following services are supported:
DynamoDB
..
Firehose
..
Http (API Gateway)
..
Kinesis
..
Lambda
..
SNS
..
SQS
..
Step Functions
..