Programming AWS Lambda. Build and Deploy Serverless Applications with Java - Helion
ISBN: 978-14-920-4100-9
stron: 278, Format: ebook
Data wydania: 2020-03-18
Księgarnia: Helion
Cena książki: 194,65 zł (poprzednio: 226,34 zł)
Oszczędzasz: 14% (-31,69 zł)
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. You’ll 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, Amazon’s event-driven, serverless computing platform. You’ll 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 Lambda
- Learn how to deploy working Lambda functions to the cloud
- Program Lambda functions and learn how the Lambda platform integrates with other AWS services
- Build and package Java-based Lambda code and dependencies
- Create serverless applications by building a serverless API and data pipeline
- Test your serverless applications using automated techniques
- Apply advanced techniques to build production-ready applications
- Understand both the gotchas and new opportunities of serverless architecture
Osoby które kupowały "Programming AWS Lambda. Build and Deploy Serverless Applications with Java", wybierały także:
- Metoda dziel i zwyci 89,00 zł, (26,70 zł -70%)
- Język C. Kurs video. Praktyczne wprowadzenie do programowania 99,00 zł, (29,70 zł -70%)
- Wprowadzenie do Javy. Programowanie i struktury danych. Wydanie XII 193,23 zł, (59,90 zł -69%)
- Spring i Spring Boot. Kurs video. Testowanie aplikacji i bezpiecze 125,42 zł, (45,15 zł -64%)
- Maven. Kurs video. Automatyzacja tworzenia aplikacji w Javie 98,98 zł, (39,59 zł -60%)
Spis treści
Programming AWS Lambda. Build and Deploy Serverless Applications with Java eBook -- spis treści
- 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
- OReilly 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
- AWS Command Line Interface
- 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
- Quick Guide to the AWS Console
- 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
- Core Concepts: Runtime Model, Invocation
- 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
- Lambda Event Sources
- 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
- The Test Pyramid
- 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
- CloudWatch Logs
- Metrics
- CloudWatch Metrics
- Lambda Platform Metrics
- Business Metrics
- Alarms
- Distributed Tracing
- Finding Errors
- Summary
- Exercises
- Logging
- 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
- Error Handling
- 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
- At-Least-Once Delivery
- 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
- Serverless Architecture Gotchas
- 10. Conclusion
- Index