Skip to Content
Learn AWS Serverless Computing
book

Learn AWS Serverless Computing

by Scott Patterson
December 2019
Intermediate to advanced
382 pages
9h 43m
English
Packt Publishing
Content preview from Learn AWS Serverless Computing

Events

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: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Sunil Gulabani

Publisher Resources

ISBN: 9781789958355