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

Event, content, and context objects

In this section, we'll look at objects that get passed to the handler on initialization. First off is the event object. This is a really useful piece of data and is necessary if you want to access the external inputs that the function was called with. This data is input to the handler function on initialization and provides information about the originating request. Additionally, the context object provides extra information about this, as well as methods that are supplied by AWS, that can help introspect the environment and other things.

If you're invoking a function through the API or SDKs, you can include some arbitrary JSON data along with it. This data is accessible during runtime through the event ...

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