0%

Book Description

Build, deploy, test, and run cloud-native serverless applications using AWS Lambda and other popular AWS services

Key Features

  • Learn how to write, run, and deploy serverless applications in Amazon Web Services
  • Make the most of AWS Lambda functions to build scalable and cost-efficient systems
  • Build and deploy serverless applications with Amazon API Gateway and AWS Lambda functions

Book Description

Serverless computing is a way to run your code without having to provision or manage servers. Amazon Web Services provides serverless services that you can use to build and deploy cloud-native applications. Starting with the basics of AWS Lambda, this book takes you through combining Lambda with other services from AWS, such as Amazon API Gateway, Amazon DynamoDB, and Amazon Step Functions.

You'll learn how to write, run, and test Lambda functions using examples in Node.js, Java, Python, and C# before you move on to developing and deploying serverless APIs efficiently using the Serverless Framework. In the concluding chapters, you'll discover tips and best practices for leveraging Serverless Framework to increase your development productivity.

By the end of this book, you'll have become well-versed in building, securing, and running serverless applications using Amazon API Gateway and AWS Lambda without having to manage any servers.

What you will learn

  • Understand the core concepts of serverless computing in AWS
  • Create your own AWS Lambda functions and build serverless APIs using Amazon API Gateway
  • Explore best practices for developing serverless applications at scale using Serverless Framework
  • Discover the DevOps patterns in a modern CI/CD pipeline with AWS CodePipeline
  • Build serverless data processing jobs to extract, transform, and load data
  • Enforce resource tagging policies with continuous compliance and AWS Config
  • Create chatbots with natural language understanding to perform automated tasks

Who this book is for

This AWS book is for cloud architects and developers who want to build and deploy serverless applications using AWS Lambda. A basic understanding of AWS is required to get the most out of this book.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Learn AWS Serverless Computing
  3. About Packt
    1. Why subscribe?
  4. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the color images
      2. Conventions used
    4. Get in touch
      1. Reviews
  6. Section 1: Why We're Here
  7. The Evolution of Compute
    1. Understanding enterprise data centers
      1. The physical data center
      2. Colocating our gear
      3. Cloud born
    2. Exploring the units of compute
      1. Physical servers – scale at the physical server layer
      2. Virtual machines – density efficiencies achieved by virtualizing the hardware
      3. Containers – better density with faster start times
      4. Functions – best density by abstracting the runtime
    3. Understanding software architectures
      1. Monolith – single code base
      2. N-tier – achieve individual scale
      3. Microservices – do one thing and do it well
      4. Nanoservices with serverless
    4. Predicting what comes next
    5. Summary
    6. Questions
    7. Further reading
  8. Event-Driven Applications
    1. Understanding modern applications
      1. Event-command
      2. Event-driven or event-first
    2. Evolution of integration patterns
      1. Enterprise Application Integration
      2. ESB
      3. Serverless integration
    3. Automation with serverless
      1. Scripts on a server
      2. Configuration management
      3. Automation as a Service
    4. Summary
    5. Questions
    6. Further reading
  9. Section 2: Getting Started with AWS Lambda Functions
  10. The Foundations of a Function in AWS
    1. Technical requirements
    2. Learning about AWS Lambda
      1. Fundamentals of a function
        1. Invoking a function
        2. Pricing model
        3. Ephemeral state
        4. High availability
        5. Service limits
      2. Use cases
    3. Setting up security
      1. Execution policies
      2. Function policies
    4. Invoking Lambda functions
      1. Invocation types
      2. Event sources
      3. Execution environment
      4. Environment variables
    5. Anatomy of a Lambda function
      1. Handler function
      2. Event, content, and context objects
    6. The programming model
      1. Runtimes
      2. Writing, building, and packaging
      3. Deployment
      4. Testing, monitoring, and debugging
    7. Writing your first Lambda function
      1. Hello, world! in the console
      2. Hello, world! using the command line
    8. Summary
    9. Questions
    10. Further reading
  11. Adding Amazon API Gateway
    1. Technical requirements
    2. Introducing Amazon API Gateway
      1. Serverless APIs
      2. Deployment options
      3. WebSockets
      4. Use cases
    3. Securing an API
      1. IAM permissions and policies
      2. Authentication with Cognito
      3. Lambda authorizers
      4. Certificates
    4. Building, deploying, and managing APIs
      1. Building APIs
      2. Deploying APIs
      3. Throttling and quota management
      4. Monitoring and logging
    5. Building a Lambda-backed API
      1. Hello world using the console
      2. Hello world via the CLI
    6. Summary
    7. Questions
    8. Further reading
  12. Leveraging AWS Services
    1. Technical requirements
    2. Using Amazon S3 with Lambda
      1. Revision
      2. S3 as an event source
      3. Interacting using the SDK
    3. Using Amazon DynamoDB with Lambda
      1. The basics
      2. Triggering a Lambda function
      3. Interacting using the SDK
    4. Using AWS Step Functions as an Orchestrator
      1. State machines with Lambda
      2. Integrating with other services
      3. Step Functions Local
    5. Summary
    6. Questions
    7. Further reading
  13. Going Deeper with Lambda
    1. Technical requirements
    2. Bringing your own runtime to Lambda
      1. Runtime API and bootstrapping
      2. Putting it all together
    3. Enabling code reuse through layers
      1. Understanding Lambda layers
      2. Using a Lambda layer
      3. Sharing a Lambda layer across multiple AWS accounts
      4. Use cases for Lambda layers
    4. Operationalizing
      1. Using environment variables
      2. Secrets management
      3. Concurrency and error handling
      4. Observability
    5. Development practices
      1. Structuring a function
        1. Handler function
        2. Controller
        3. Service
      2. Reuse and optimization
      3. Using the ecosystem
    6. Summary
    7. Questions
    8. Further reading
  14. Section 3: Development Patterns
  15. Serverless Framework
    1. Technical requirements
    2. Understanding the need for a framework
      1. Developer focus
      2. Managing a serverless project
    3. Exploring the core concepts of the Serverless Framework
      1. Services
      2. Functions
      3. Events
      4. Resources and plugins
      5. Layers
    4. Deploying your first service
      1. Installation and the CLI
      2. Hello World API in 5 minutes
      3. Understanding the deployment
      4. The dashboard
      5. Serverless offline (run it locally)
    5. Testing and debugging
      1. Unit testing lambda functions
      2. Integration testing
      3. Logging and monitoring
    6. Summary
    7. Questions
    8. Further reading
  16. CI/CD with the Serverless Framework
    1. Technical requirements
    2. Using serverless development pipelines
      1. Patterns
        1. Continuous integration
        2. Continuous delivery
        3. Continuous deployment
      2. Using serverless stages
    3. Understanding deployment patterns
      1. Deploying all at once
      2. Blue/green environment switching
      3. Canary or traffic shifting
    4. Introducing AWS services
      1. AWS CodePipeline
      2. AWS CodeBuild
      3. AWS CodeCommit
    5. Building a pipeline
      1. Creating the pipeline in production
      2. A pipeline that deploys itself
    6. Summary
    7. Questions
    8. Further reading
  17. Section 4: Architectures and Use Cases
  18. Data Processing
    1. Technical requirements
    2. Getting across the processing types
      1. Batch
      2. Micro-batch
      3. Streaming
    3. Building a batch data processing workload
      1. Where do I start?
      2. The ETL blueprint
      3. Data storage using S3
      4. Data cataloging – Glue
        1. Custom classifiers
        2. Databases
        3. Crawlers
      5. Data transformation – Glue
        1. Creating a Glue job
        2. Running a Glue job
    4. Data analytics and transformation
      1. Querying data in S3 with Athena
    5. Summary
    6. Questions
    7. Further reading
  19. AWS Automation
    1. Technical requirements
    2. Embedded security
      1. Enforcement via tagging
      2. Automatic detection and remediation with AWS Config
      3. Implementing continuous compliance
    3. Running scheduled tasks
      1. Replacing server-based local schedulers
      2. Auditing and reporting
    4. Summary
    5. Questions
    6. Further reading
  20. Creating Chatbots
    1. Technical requirements
    2. Building a chatbot with Amazon Lex
      1. Understanding the language model
        1. Intents
        2. Utterances
        3. Slots
        4. Prompts
        5. Fulfillment
      2. Building and testing your bot
    3. Building a Slackbot using Serverless Framework
      1. Understanding the architecture
      2. Deploying a Slackbot
        1. Registering a new Slack app
        2. Crafting the bot's brain
        3. Connecting our bot to Slack
    4. Summary
    5. Questions
    6. Further reading
  21. Hosting Single-Page Web Applications
    1. Technical requirements
    2. Understanding serverless SPAs on AWS
      1. The architecture
      2. The components
        1. Amazon S3
        2. Amazon CloudFront
        3. Backend services
    3. Building SPAs with Serverless Framework
    4. Summary
    5. Questions
    6. Further reading
  22. GraphQL APIs
    1. Technical requirements
    2. Introduction to GraphQL
      1. Core concepts
    3. Building GraphQL APIs
      1. Lambda-backed endpoint
      2. Using an AWS-managed service
    4. Summary
    5. Questions
    6. Further reading
  23. Assessment
    1. Chapter 1: The Evolution of Compute
    2. Chapter 2: Event-Driven Applications
    3. Chapter 3: The Foundations of a Function in AWS
    4. Chapter 4: Adding Amazon API Gateway
    5. Chapter 5: Leveraging AWS Services
    6. Chapter 6: Going Deeper with Lambda
    7. Chapter 7: Serverless Framework
    8. Chapter 8: CI/CD with the Serverless Framework
    9. Chapter 9: Data Processing
    10. Chapter 10: AWS Automation
    11. Chapter 11: Creating Chatbots
    12. Chapter 12: Hosting Single-Page Web Applications
    13. Chapter 13: GraphQL APIs
  24. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
3.17.76.175