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

Testing, monitoring, and debugging

Now, you have a Lambda function deployed and ready to go. Let's test it to see if it works as expected! We're going to touch on the basic concepts of testing and debugging Lambdas and then delve more deeply into this in Chapter 6, Going Deeper with Lambda.

To test a function, we need to come up with an event object to invoke it with. If your function doesn't use anything from the event object, then this can simply be some arbitrary JSON data. If your function is being called by another service, then it's likely to be invoked with an event object of a known structure.

For example, here's a simplified event object from an SQS queue event source:

{    "Records": [        { "messageId": "19dd0b57-b21e-4ac1-bd88-01bbb068cb78", ...
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