https://www.npmjs.com/package/aws-sdk-mock
Test:
First start from Test in resource. Will find:
- Http request method, headers, body before transformation etc.
- Endpoint of back-end service
- Endpoint request headers, body after transformation
- Call result before / after transformation
CloudWatch:
Common errors & symptom
- Without authorization to call back-end service: 500, "API Configuration Error" (if response is set), "Execution failed due to configuration error: Invalid permissions on Lambda function" in Test logs. Check Lambda side, there is no event configured. No authorization. In SAM template, the 'AWS::Serverless::Function' resource should have "Events" provided even the API side's swagger document has integration.