December 2019
Intermediate to advanced
382 pages
9h 43m
English
Events in the Serverless Framework are what we would expect. Events are anything that can trigger your function so that it's invoked and often includes event data along with it. When we specify an event for a function, the Serverless Framework automatically provisions the infrastructure and wires up the event mapping for us. This is part of what makes the framework awesome—we don't have to spend time building and configuring complex infrastructure; it's all sorted for us at deploy time.
The following snippet expands on our previous example, with an event block being added. This specifies the event that we want to use to trigger the function:
functions: functionName: handler: handler.functionName events: - http: path: hello method: ...