Programming AWS Lambda: Build and Deploy Serverless Applications with Java
Авторы: John Chapin, Mike Roberts (2020)
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, you’ll learn how to architect, build, and operate serverless applications that use AWS Lambda—the original, and widely adopted, serverless compute platform. AWS Lambda is rarely used by itself, however, and so while reading this book, you’ll also learn how to successfully integrate Lambda with other serverless AWS services, like S3, DynamoDB, and more.
We initially had two concerns about Lambda—that it wouldn’t support the programming knowledge and software inventory that we’d built over the years in Java and that it would be far too expensive to run at scale.
What we found instead surprised us.
Lambda’s support for Java was not merely an “add on.” In fact, Java is a first-class runtime within the Lambda platform. Building Lambda applications in Java freed us to get back to the essence of programming, letting us use our skills and existing code.
Further, Lambda turned out to be less, not more, expensive to run than equivalent, traditionally built systems. The efficiency of Lambda’s “pay-per-use” model, to sub-second precision, allowed us to create systems that processed hundreds of millions of events per day and yet were cheaper than their predecessors.
This combination of speed of development, embrace of existing languages, and cost effectiveness led us to believe that serverless compute platforms, with Lambda at their forefront, were the start of something special in our industry. In 2016 we started our business, Symphonia, with the mission to help companies make the leap to this new way of building systems.
We assume that you already know or can learn the basics of the Java programming language. You don’t need to have knowledge of, or experience with, any Java application frameworks (like Spring) or libraries (like Guava). We do not assume that you have any prior knowledge of Amazon Web Services.
Over the last few years we’ve come to understand how to successfully build systems with Lambda. This book will give you a jump-start into learning these same lessons.
From getting started techniques to advanced architecture, from programming and testing to deployment and monitoring, we cover the lifecycle of what you need to understand to build production-quality systems with Lambda at scale.
What makes this book unique is we do all of this in the context of the Java programming language. We’ve both been Java programmers for more than two decades each, so in this book we help you use your existing Java skills in a whole new way.
So strap in, and welcome to the age of serverless!
Авторы: John Chapin, Mike Roberts (2020)
About This Book
Welcome to Programming AWS Lambda. We’re glad you’re 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, you’ll learn how to architect, build, and operate serverless applications that use AWS Lambda—the original, and widely adopted, serverless compute platform. AWS Lambda is rarely used by itself, however, and so while reading this book, you’ll also learn how to successfully integrate Lambda with other serverless AWS services, like S3, DynamoDB, and more.
Why We Wrote This Book
We have been using Lambda since 2015, ever since Lambda’s support for Java was first announced. Within just a few weeks we saw the amazing ability that Lambda had to let teams build new features far faster than we’d ever seen before. By removing a lot of low-level aspects of developing and running systems, and instead focusing on a clean, event-driven approach, we realized that many of the complexities that got in the way of our teams no longer applied when using Lambda. Lambda also let us amplify our use of the rest of the AWS platform—it had a multiplicative impact on our effectiveness.We initially had two concerns about Lambda—that it wouldn’t support the programming knowledge and software inventory that we’d built over the years in Java and that it would be far too expensive to run at scale.
What we found instead surprised us.
Lambda’s support for Java was not merely an “add on.” In fact, Java is a first-class runtime within the Lambda platform. Building Lambda applications in Java freed us to get back to the essence of programming, letting us use our skills and existing code.
Further, Lambda turned out to be less, not more, expensive to run than equivalent, traditionally built systems. The efficiency of Lambda’s “pay-per-use” model, to sub-second precision, allowed us to create systems that processed hundreds of millions of events per day and yet were cheaper than their predecessors.
This combination of speed of development, embrace of existing languages, and cost effectiveness led us to believe that serverless compute platforms, with Lambda at their forefront, were the start of something special in our industry. In 2016 we started our business, Symphonia, with the mission to help companies make the leap to this new way of building systems.
Who This Book Is For
This book is intended primarily for software developers and software architects, but it will be useful to anyone involved in the technical aspects of building software applications in the cloud.We assume that you already know or can learn the basics of the Java programming language. You don’t need to have knowledge of, or experience with, any Java application frameworks (like Spring) or libraries (like Guava). We do not assume that you have any prior knowledge of Amazon Web Services.
Why You Need This Book
In many ways serverless, and Lambda with it, is one of the most significant changes to building server-side software in decades. While our code may look similar line by line, and perhaps even class by class, to how it was written before, the architectural constraints and capabilities of Lambda drive designs that have a very different shape than what you’ve seen in the past.Over the last few years we’ve come to understand how to successfully build systems with Lambda. This book will give you a jump-start into learning these same lessons.
From getting started techniques to advanced architecture, from programming and testing to deployment and monitoring, we cover the lifecycle of what you need to understand to build production-quality systems with Lambda at scale.
What makes this book unique is we do all of this in the context of the Java programming language. We’ve both been Java programmers for more than two decades each, so in this book we help you use your existing Java skills in a whole new way.
So strap in, and welcome to the age of serverless!