Skip to content

Instantly share code, notes, and snippets.

@lakshmantgld
Created October 27, 2017 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lakshmantgld/1e6f0df31f77595e561ee3cdc949f06f to your computer and use it in GitHub Desktop.
Save lakshmantgld/1e6f0df31f77595e561ee3cdc949f06f 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