Programming AWS Lambda

Build and Deploy Serverless Applications with Java
 
 
O'Reilly (Verlag)
  • erschienen am 18. März 2020
  • |
  • 278 Seiten
 
E-Book | ePUB mit Adobe-DRM | Systemvoraussetzungen
978-1-4920-4100-9 (ISBN)
 
Serverless revolutionizes the way organizations build and deploy software. With this hands-on guide, Java engineers will learn how to use their experience in the new world of serverless computing. Youll discover how this cloud computing execution model can drastically decrease the complexity in developing and operating applications while reducing costs and time to market.Engineering leaders John Chapin and Mike Roberts guide you through the process of developing these applications using AWS Lambda, Amazons event-driven, serverless computing platform. Youll learn how to prepare the development environment, program Lambda functions, and deploy and operate your serverless software. The chapters include exercises to help you through each aspect of the process.Get an introduction to serverless, functions as a service, and AWS LambdaLearn how to deploy working Lambda functions to the cloudProgram Lambda functions and learn how the Lambda platform integrates with other AWS servicesBuild and package Java-based Lambda code and dependenciesCreate serverless applications by building a serverless API and data pipelineTest your serverless applications using automated techniquesApply advanced techniques to build production-ready applicationsUnderstand both the gotchas and new opportunities of serverless architecture
  • Englisch
  • Sebastopol
  • |
  • USA
  • 8,65 MB
978-1-4920-4100-9 (9781492041009)
weitere Ausgaben werden ermittelt
  • Intro
  • Foreword
  • Preface
  • About This Book
  • Why We Wrote This Book
  • Who This Book Is For
  • Why You Need This Book
  • Using the End-of-Chapter Exercises
  • Conventions Used in This Book
  • Using Code Examples
  • O'Reilly Online Learning
  • How to Contact Us
  • Acknowledgments
  • 1. Introduction to Serverless, Amazon Web Services, and AWS Lambda
  • A Quick History Lesson
  • The Cloud Grows
  • Enter Serverless
  • Backend as a Service
  • Functions as a Service
  • Differentiating Serverless
  • What Is AWS?
  • Types of Service
  • Capacity
  • Who Uses AWS?
  • How Do You Use AWS?
  • What Is AWS Lambda?
  • Functions as a Service
  • FaaS as Implemented by Lambda
  • Why Lambda?
  • What Does a Lambda Application Look Like?
  • Web API
  • File processing
  • Other examples of Lambda applications
  • AWS Lambda in the Java World
  • Summary
  • Exercises
  • 2. Getting Started with AWS Lambda
  • Quick Guide to the AWS Console
  • Regions
  • Identity and Access Management
  • Lambda Hello World (as Quickly as Possible)
  • Setting Up Your Development Environment
  • AWS Command Line Interface
  • Installing the AWS CLI
  • Acquiring credentials for the AWS CLI
  • Configuring the AWS CLI
  • Java Setup
  • AWS SAM CLI Installation
  • Lambda Hello World (the Proper Way)
  • Creating Your First Java Lambda Project
  • Building Hello World
  • Creating the Lambda Function
  • Running the Lambda function
  • Summary
  • Exercises
  • 3. Programming AWS Lambda Functions
  • Core Concepts: Runtime Model, Invocation
  • The Lambda Execution Environment
  • Invocation Types
  • Introduction to Logging
  • Input, Output
  • Lambda Function Method Signatures
  • Configuring the Handler Function in the SAM Template
  • Basic Types
  • Lists and Maps
  • POJOs and Ecosystem Types
  • Streams
  • Context
  • Timeout
  • Memory and CPU
  • Environment Variables
  • Summary
  • Exercises
  • 4. Operating AWS Lambda Functions
  • Build and Package
  • Uberjars
  • Assembling a ZIP File
  • Reproducible Builds
  • Deploy
  • Infrastructure as Code
  • CloudFormation and the Serverless Application Model
  • Security
  • The Principle of Least Privilege
  • Identity and Access Management
  • Roles and policies
  • Lambda resource policies
  • SAM IAM
  • Autogenerated execution roles and resource policies
  • Common policy templates
  • Summary
  • Exercises
  • 5. Building Serverless Applications
  • Lambda Event Sources
  • Writing Code to Work with Input and Output for Event Sources
  • Configuring a Lambda Event Source
  • Understanding Different Event Source Semantics
  • Example: Building a Serverless API
  • Behavior
  • Architecture
  • Lambda Code
  • Uploading weather data with WeatherEventLambda
  • Reading weather data with WeatherQueryLambda
  • Build and Package Using the AWS SDK BOM
  • Infrastructure
  • Deployment
  • Example: Building a Serverless Data Pipeline
  • Behavior
  • Architecture
  • S3
  • Lambda functions
  • SNS
  • Lambda Code
  • Processing the batch with BulkEventsLambda
  • Processing an individual weather event with SingleEventLambda
  • Build and Package Using Multiple Modules and Isolated Artifacts
  • The top-level project
  • The modules
  • Infrastructure
  • Deployment
  • Summary
  • Exercises
  • 6. Testing
  • The Test Pyramid
  • Unit Tests
  • Functional Tests
  • End-to-End Tests
  • Refactoring for Testing
  • Revisiting BulkEventsLambda
  • Refactoring BulkEventsLambda
  • Add Constructors
  • Isolate Side Effects
  • Split Methods
  • Testing BulkEventsLambda
  • Unit Testing
  • Functional Testing
  • End-to-End Testing
  • Local Cloud Testing
  • Cloud Test Environments
  • Summary
  • Exercise
  • 7. Logging, Metrics, and Tracing
  • Logging
  • CloudWatch Logs
  • Lambda and CloudWatch Logs
  • LambdaLogger
  • Java Logging Frameworks
  • Structured Logging
  • Structured Logging in Java
  • CloudWatch Logs Insights
  • Metrics
  • CloudWatch Metrics
  • Lambda Platform Metrics
  • Business Metrics
  • Alarms
  • Distributed Tracing
  • Finding Errors
  • Summary
  • Exercises
  • 8. Advanced AWS Lambda
  • Error Handling
  • Classes of Error
  • The Various Behaviors of Lambda Error Processing
  • Synchronous event sources
  • Asynchronous event sources
  • Stream/queue event sources
  • Deep Dive into Asynchronous Event Source Errors
  • Retries
  • Dead letter queues
  • Destinations
  • Handling Kinesis and DynamoDB Stream Errors
  • Tracing Errors with X-Ray
  • Error Handling Strategies
  • Scaling
  • Observing Lambda Scaling
  • Scaling Limits and Throttling
  • Burst limits
  • Reserved concurrency
  • Thread Safety
  • Vertical Scaling
  • Versions and Aliases, Traffic Shifting
  • Lambda Versions
  • Lambda Aliases
  • Traffic Shifting
  • When (Not) to Use Versions and Aliases
  • Cold Starts
  • What Is a Cold Start?
  • When Does a Cold Start Occur?
  • Identifying Cold Starts
  • Impact of Cold Starts
  • Mitigating Cold Starts
  • Reduce artifact size
  • Use a more load-speed-efficient packaging format
  • Reduce startup logic
  • Language choice
  • Memory and CPU
  • Provisioned Concurrency
  • Cold Start Summary
  • State
  • Persistent Application State
  • Caching
  • Lambda and Java Application Frameworks
  • Virtual Private Clouds
  • Architectural Concerns of Using Lambda with a VPCs
  • Configuring Lambda to Use a VPC
  • Alternatives
  • Layers and Runtimes
  • What Are Layers?
  • When to Use, and Not Use, Layers
  • Custom Runtimes
  • Summary
  • Exercises
  • 9. Advanced Serverless Architecture
  • Serverless Architecture "Gotchas"
  • At-Least-Once Delivery
  • Example: Lambda "cron jobs"
  • Solution: Build an idempotent system
  • Solution: Accept duplicates, and perhaps deal with problems if/when they come up
  • Solution: Check for previous processing
  • Impacts of Lambda Scaling on Downstream Systems
  • Solution: Use like-scaling infrastructure
  • Solution: Manage scaling upstream
  • Solution: Manage scaling with reserved concurrency
  • Solution: Architect deliberately hybrid solutions
  • The "Fine Print" of Lambda Event Sources
  • New Patterns of Architecture Enabled by Serverless Thinking
  • Published Components with the Serverless Application Repository
  • Globally Distributed Applications
  • Global deployment
  • Localized connectivity, with failover
  • Global state
  • Pay-per-use
  • Edge computing/"regionless"
  • Summary
  • Exercises
  • 10. Conclusion
  • Index

Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

48,99 €
inkl. 5% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen