Last active
July 7, 2020 02:52
-
-
Save 5t33/3df63e1157c013893e2e7127b2f6be9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
functions: | |
DemoLambda: | |
role: DemoLambdaRole | |
handler: index.handler | |
integration: lambda | |
events: | |
- http: | |
path: /health_check | |
method: get | |
integration: lambda | |
- http: | |
path: /respond_400 | |
method: post | |
integration: lambda | |
response: | |
statusCodes: | |
400: | |
pattern: '.*"statusCode":400,.*' # JSON response | |
template: $input.path("$.errorMessage") # JSON return object | |
- http: | |
path: /throw_error | |
method: get | |
integration: lambda | |
response: | |
statusCodes: | |
500: | |
pattern: '.*"statusCode":500,.*' # JSON response | |
template: $input.path("$.errorMessage") # JSON return object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment