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

Integration testing

Now, let's move on to integration testing. This is an important step in the process that allows us to confirm that our code can work when it's deployed into an environment that is connected to all of the supporting infrastructure that the stack needs. This could be the API Gateway, IAM permissions, storage policies, other messaging systems, and databases. We need to make sure our lambda works as expected for our use case.

One way to integration test a Lambda function is to capture the invoking event by deploying the function and writing the event to the logs. You can then find the output in CloudWatch logs and save that to a JSON file. Use this file to invoke your integrated local function using serverless-offline. You ...

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