Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save humbertodosreis/74502486c5dfd6403a394bd680b0371f to your computer and use it in GitHub Desktop.
Save humbertodosreis/74502486c5dfd6403a394bd680b0371f to your computer and use it in GitHub Desktop.
functions:
hello:
handler: handler.hello
events:
- http:
path: users
method: get
integration: lambda
request:
template:
text/xhtml: '{ "stage" : "$context.stage" }'
application/json: '{ "httpMethod" : "$context.httpMethod" }'
response:
headers:
Access-Control-Allow-Origin: "'*'"
statusCodes:
400:
pattern: '.*wrong.*'
template:
application/json: >
#set ($errorMessageObj = $input.path('$.errorMessage'))
$errorMessageObj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment