praise for the first edition
A comprehensive, clear and very practical guide to making the best use of AWS throughout an applications lifecycle. Highly recommended for anyone wanting to use AWS for real-life applications!
Alain Couniot, Head of Enterprise Architecture, STIB-MIVB, Belgium
Peters tome not only dives deep on Lambda, it also covers all the AWS components your apps will need to run serverless. A soup-to-nuts tour de force. Well done!
Sean Hull, Founder, iHeavy, Inc.
A great introduction for those using AWS, who want to implement a serverless architecture.
John Huffman, Senior Technical Consultant, Summa Technologies
This book is a fantastic introduction to serverless architectures and AWS. I wish every technical book was as well written and easy to read! The book walks you step-by-step through building a video portal, including integrating AWS Lambda, API Gateway, S3, auth0 and Firebase. By the end you feel confident not only that you understand all the pieces and how everything fits together, but also that you are ready to start building your own app.
Kent R. Spillner, Sr. Software Engineer, DRW
Serverless Architectures on AWS, Second Edition
Peter Sbarski, Yan Cui, Ajay Nair
To comment go to liveBook
Manning
Shelter Island
For more information on this and other Manning titles go to
www.manning.com
Copyright
For online information and ordering of these and other Manning books, please visit www.manning.com. The publisher offers discounts on these books when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 761
Shelter Island, NY 11964
Email: orders@manning.com
2022 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps.
Recognizing the importance of preserving what has been written, it is Mannings policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine.
| Manning Publications Co. 20 Baldwin Road Technical PO Box 761 Shelter Island, NY 11964 |
Development editor: | Toni Arritola |
Technical development editor: | Brent Stains |
Review editor: | Aleksandar Dragosavljevi |
Production editor: | Andy Marinkovich |
Copy editor: | Frances Buran |
Proofreader: | Jason Everett |
Technical proofreader: | Niek Palm |
Typesetter: | Gordan Salinovi |
Cover designer: | Marija Tudor |
ISBN: 9781617295423
dedication
To my mum and dad, who always supported and encouraged my passion for computing.
Peter Sbarski
To my wife, who always supports and encourages me, and puts up with all my late-night coding sessions.
Yan Cui
To my wife, my kids, my brother, and my parents, thank you for giving me the purpose and time to do this.
Ajay Nair
front matter
preface
Serverless technologies occupy an exciting space at the moment. Products like AWS Lambda and DynamoDB have been around for a few years, yet they still feel new and thrilling, sometimes mysterious or puzzling. Many folks worldwide discuss, learn, and implement systems with serverless architectures, yet we havent yet seen a mass level of adoption like that of containers. Cloud providers such as AWS continue to grow. However, individuals and organizations still ask questions such as, is serverless right for me, and how do I architect a system correctly from the myriad of available components and options?
Weve written this book to address some of the more interesting questions weve seen across the industry and our technical community. We decided to look at use cases for serverless and explore problems that usually wouldnt seem like a good fit. More importantly, weve tried to convey what it is to have a serverless-first mindset. Our recipe is simple: When you have a problem, offload as much of the undifferentiated heavy lifting onto AWS or another provider and apply the principles of serverless architectures. And, if that doesnt produce a satisfactory answer, only then go and look at other technologies that may help. Its important to reiterate that you should always use the right tool for the right job. However, having a set of principles and practices, like viewing a potential solution through a serverless prism first, gives you a map and helps make better, more robust decisions.
This book shows a few examples of us doing it in practice. We discuss how to approach several problems using serverless architectures, what criteria to consider, and how to deal with architectural trade-offs. We also present three real-world companies that have built interesting systems using serverless architectures. These companies dealt with the same kinds of problems you might be solving right now, so its worth checking out those chapters to see what potential solutions or ideas exist.
If you are entirely new to serverless architectures, do not worry! The first three chapters introduce you to serverless and even get you building a small application. If you are an expert already, you will enjoy the last two chapters that go deeper into AWS Lambda and discuss emerging practices. And, before we let you go, one other thing: the vast majority of this second edition is new. If you read our first edition, we think that you will find this a very different book. We hope you find something interesting and helpful in this book and come with us on this exciting serverless journey.
acknowledgments
The second edition of Serverless Architectures on AWS couldnt have been written without the encouragement and support from my peers, colleagues, family, and friends. I am lucky to be surrounded by passionate technologists who continuously encourage, give feedback, and provide invaluable advice.
First and foremost, I want to say thank you to my two co-authors: Yan Cui and Ajay Nair. I am fortunate to know these two fantastic world-class experts to whom education and community is always foremost. I cannot describe how thankful I am to Yan and Ajay for helping to write this book and making it uniquely special among the technical literature available today. I am forever grateful to both of you for being there through this journey, teaching me, and sharing the benefit of your experience.