Running Serverless: Introduction to AWS Lambda and the Serverless Application Model
Book information
Description
This book will help you get started with AWS Lambda and the Serverless Application Model (SAM). Lambda is Amazon's engine for running event-driven functions, and SAM is an open-source toolkit that greatly simplifies configuring and deploying Lambda services. Together, they make it easy to create auto-scaling APIs and cloud services designed for serverless deployments. You'll learn how to: Design applications that get the most out of serverless architecture Create auto-scaling web APIs Handle background tasks and messaging workflows Set up a deployment pipeline for effective team collaboration Test and troubleshoot code designed for AWS Lambda Inspect and monitor serverless applications Running Serverless is a technical tutorial book. It will be useful for two groups of software developers and architects: people who have no previous experience working with serverless applications and are interested in learning about emerging cloud architectural patterns, and people who already work with Lambda using other deployment frameworks and want to learn about AWS SAM, the Serverless Application Model. The contents of this book are based on author's experiences with MindMup, a collaborative mind-mapping system that was one of the early adopters of AWS Lambda. MindMup moved to a serverless model from an application hosting service throughout 2016, in order to benefit from on-demand scaling. We reduced operational costs by about two-thirds while significantly increasing application capacity, speeding up development and reducing time to market for new features. This book is structured as a walk-through for building a practical application. We start from a simple static API and gradually grow it into an online image-resizing service, ready for millions of users, with all the supporting operational and infrastructural capabilities. The application closely resembles real-world systems that many of you will develop in your jobs. This will give you a good structure for your own work, and you will be able to almost copy parts to get a head start. As you discover how to create and deploy different parts of the application, you will also learn about key aspects of Lambda and related services, important tips, techniques and tools for running serverless. The tutorial evolved from dozens of conference workshops and code camps. Gojko and his colleagues have used the exercises from this book to teach hundreds of developers about serverless architectures, improving the examples through feedback into a great way to gradually introduce important concepts. Copyright Thanks to everyone who helped About the author Learn about updates Introduction Serverless in five minutes The serverless pricing model Important AWS Lambda technical constraints When to use Lambda I Basic development tasks Set up tools for local development Setting up prerequisites Installing JavaScript tools Installing the SAM command line tools Configuring access credentials Running with restricted user accounts Using a profile Create a web service Infrastructure as code The Lambda programming model Deploying SAM applications Inspecting a stack Development and troubleshooting Retrieving execution logs Simulating Lambda locally Debugging functions Validating templates Working in a team Setting up a deployment pipeline Safe deployments Function configurations Versions and aliases Gradual deployments II Working with AWS services Handling HTTP requests API Gateway events Customising responses Troubleshooting Gateway integrations Processing request parameters Using global settings to configure the implicit API Creating parameterised CloudFormation stacks Using external storage Cloud storage options Lambda access rights Generating unique references Using AWS resources from Lambda functions Authorising access with IAM policies Dealing with network timeouts Cheaper, faster, serverless Signing requests Protecting S3 files Handling platform events Generating test events Working with files Working with asynchronous events Avoiding circular references Handling asynchronous errors with dead letters Conditional resources III Designing serverless applications Using application components The AWS Serverless Application Repository Lambda layers Publishing to SAR Managing sessions and user workflows Moving session state out of Lambda functions Moving static assets out of Lambda functions Using S3 as a web server Uploading files to S3 Using custom resources to extend CloudFormation Designing robust applications API endpoints with path parameters Designing with Ports and Adapters Protecting against abuse Deployment options Think about jobs, not functions One Lambda or many? Sharing behaviour Sharing configuration Where next? Index
Similar books
Impact Mapping: Making a Big Impact with Software Products and Projects
2012 · EPUB
Specyfikacja na przykładach. Poznaj zwinne metody pracy i dostarczaj właściwe oprogramowanie
2014 · PDF
Fifty quick ideas to improve your user stories
2014 · EPUB
Specification by Example How Successful Teams Deliver the Right Software
2011 · PDF
Specification by Example: How Successful Teams Deliver the Right Software
2011 · PDF
Fifty Quick Ideas To Improve Your Tests
2015 · EPUB
Test Driven .NET Development with FitNesse
2008 · PDF
Specification by Example: How Successful Teams Deliver the Right Software
2011 · PDF