Praise for Programming AWS Lambda
If youre a Java programmer hoping to unlock the benefits of serverless architectures, you finally have the book youve been looking for!
Dr. Tim Wagner, Vendia CEO and Cofounder
Mike and John have been my go-to people for all things Java and serverless over the past several years. This book very nicely captures many of their core learnings and gotchas in this space. A great addition to my bookshelf . Many thanks to them both!
Daniel Bryant, Java Champion
If youre a Java developer who wants to reap the benefits of serverless computing while avoiding the pitfalls, this is the book youve been looking for.
Brian Gruber, Principal Architect at Meetup
For developers who want to leverage their Java experience while taking advantage of new architectural possibilities offered by AWS Lambda, this book provides a thorough guide to building robust, scalable serverless applications.
Stuart Sierra, Software Architecture Consultant
A clear and comprehensive introduction to programming lambdas in Java. This book goes way beyond hello world to cover how to write, deploy, run, and support Java-based lambdas that take full advantage of serverless architectures rather than just lifting and shifting your application code.
Sarah Wells, Technical Director for Operations & Reliability at Financial Times
Programming AWS Lambda
by John Chapin and Mike Roberts
Copyright 2020 Symphonia LLC. All rights reserved.
Printed in the United States of America.
Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
- Development Editor: Virginia Wilson
- Acquisitions Editor: Kathleen Carr
- Production Editor: Katherine Tozer
- Copyeditor: Kim Wimpsett
- Proofreader: Charles Roumeliotis
- Indexer: Judith McConnville
- Interior Designer: David Futato
- Cover Designer: Karen Montgomery
- Illustrator: Rebecca Demarest
- March 2020: First Edition
Revision History for the First Edition
- 2020-03-18: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781492041054 for release details.
The OReilly logo is a registered trademark of OReilly Media, Inc. Programming AWS Lambda, the cover image, and related trade dress are trademarks of OReilly Media, Inc.
The views expressed in this work are those of the authors, and do not represent the publishers views. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
978-1-492-04105-4
[LSI]
Foreword
AWS Lambdaand both serverless and backend as a service in generalhave had a hugely disruptive effect on the software industry.Theyve greatly improved the productivity of millions of developers by eliminating many of the hassles, costs, and undifferentiated heavy lifting of dealing with servers, from security patching to autoscaler tuning.More importantly, though, serverless has changed the very definition of an application, from a blob of code that we drop onto server farms into a configuration of multi-tenanted cloud services that we orchestrate with code in the sky.Serverless is the next stage of cloud evolutionjust as it once felt impossible to build a company without its own data center, its quickly becoming possible for companies never to own a server.Its a fascinating transformation to watch and be part of!
When I was first coming up with the ideas that eventually became AWS Lambda, I had many discussions with the AWS leadership team about the risks and opportunities.The opportunities were massivethe chance to reimagine how compute and applications were constructed and to change the very nature of software development in the cloud.But the risks were equally great.The innovative spark gap of Lambda was high, and crossing that chasm required a lot of energy: to gain the advantages of serverlesspay per use, per-request scaling, built-in fault tolerance, and so much morewed have to ask developers to give up conventional server- and container-based deployments.Theyd have to approach architecture in a completely different way, one built around doing as little as possible rather than owning as much as possible.Back in 2014 when we unveiled Lambda to the world, this was our biggest fear: would developers make that leap and come on that journey with us?
Fortunately the answer over the last five years has proven to be a resounding yes, and at the heart of that success are books like the one youre reading now.A revolution like serverless requires spreading the message to millions of developersmany of whom will have existing code, in-place processes and tools, and a wealth of language and library knowledge that they need to preserve.Mike and John, the founders of Symphonia and authors of Programming AWS Lambda,bring many years of experience and expertise not just in working with AWS and Lambda but also in working with countless Java developers and mission-critical enterprise Java applications.This insight helps them bridge the new world of serverless and the existing knowledge and practices of enterprise Java developers and their teams.Its this marriage of understandingthe best of old and new togetherthat gives these authors their unique insight and makes this material so essential.
If youre completely new to serverless, this book will help you understand not just what it makes possible but also why and how.If youre getting started or have used services like AWS Lambda in other languages, it will be your trusted companion as you learn the best practices for architecting, developing, deploying, testing, and monitoring serverless Java applications of all typesfrom highly distributed mobile apps to highly scalable data processing pipelines.Regardless of your skill level, this book will help you design and deliver Java applications faster and more reliably.
Welcome to the serverless world, and enjoy your journeyyour expert tour guides await!
Dr. Tim Wagner
Vendia CEO and Cofounder, Original creator of AWS Lambda
Preface
About This Book
Welcome to Programming AWS Lambda. Were glad youre here!
Serverless computing is a revolutionary way of building systems.At its heart, serverless is about performing the minimum technical work necessary to sustainably provide value to our users. A serverless approach does this by making the most of services provided by cloud vendors, like Amazon Web Services (AWS).
In this book, youll learn how to architect, build, and operate serverless applications that use AWS Lambdathe original, and widely adopted, serverless compute platform.AWS Lambda is rarely used by itself, however, and so while reading this book, youll also learn how to successfully integrate Lambda with other serverless AWS services, like S3, DynamoDB, and more.