Skip to content

Instantly share code, notes, and snippets.

@bmccann36
Last active October 12, 2020 11:44
Show Gist options
  • Save bmccann36/1b4ffa48e94f1f8aecae785777a55bb9 to your computer and use it in GitHub Desktop.
Save bmccann36/1b4ffa48e94f1f8aecae785777a55bb9 to your computer and use it in GitHub Desktop.
functions:
create: #defines a function named create
handler: com.notesservice.CreateNote # points to the location of the code to invoke
events: # defines what type of event will trigger the invocation
- http: # creates a REST endpoint for you
path: notes # calling POST - {apiGatewayUrl}/notes will lead to this function's invocation
method: post
get:
handler: com.notesservice.GetNote
events:
- http:
path: notes/{id} # calling GET - {apiGatewayUrl}/notes/{id} will lead to this function's invocation
method: get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment