万本电子书0元读

万本电子书0元读

顶部广告

Serverless Programming Cookbook电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Heartin Kanikathottu

出  版  社:Packt Publishing

出版时间:2019-01-31

字       数:49.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Build, secure, and deploy real-world serverless applications in AWS and peek into the serverless cloud offerings from Azure, Google Cloud, and IBM Cloud Key Features * Build serverless applications with AWS Lambda, AWS CloudFormation and AWS CloudWatch * Perform data analytics and natural language processing(NLP)on the AWS serverless platform * Explore various design patterns and best practices involved in serverless computing Book Description Managing physical servers will be a thing of the past once you’re able to harness the power of serverless computing. If you’re already prepped with the basics of serverless computing, Serverless Programming Cookbook will help you take the next step ahead. This recipe-based guide provides solutions to problems you might face while building serverless applications. You'll begin by setting up Amazon Web Services (AWS), the primary cloud provider used for most recipes. The next set of recipes will cover various components to build a Serverless application including REST APIs, database, user management, authentication, web hosting, domain registration, DNS management, CDN, messaging, notifications and monitoring. The book also introduces you to the latest technology trends such as Data Streams, Machine Learning and NLP. You will also see patterns and practices for using various services in a real world application. Finally, to broaden your understanding of Serverless computing, you'll also cover getting started guides for other cloud providers such as Azure, Google Cloud Platform and IBM cloud. By the end of this book, you’ll have acquired the skills you need to build serverless applications efficiently using various cloud offerings. What you will learn * Serverless computing in AWS and explore services with other clouds * Develop full-stack apps with API Gateway, Cognito, Lambda and DynamoDB * Web hosting with S3, CloudFront, Route 53 and AWS Certificate Manager * SQS and SNS for effective communication between microservices * Monitoring and troubleshooting with CloudWatch logs and metrics * Explore Kinesis Streams, Amazon ML models and Alexa Skills Kit Who this book is for For developers looking for practical solutions to common problems while building a serverless application, this book provides helpful recipes. To get started with this intermediate-level book, knowledge of basic programming is a must.
目录展开

Title Page

Copyright and Credits

Serverless Programming Cookbook

Dedication

About Packt

Why subscribe?

Packt.com

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Conventions used

Get in touch

Reviews

Getting Started with Serverless Computing on AWS

Introduction

Getting started with the AWS platform

Getting ready

How to do it...

How it works...

AWS Identity and Access Management (IAM)

Amazon CloudWatch

Multi-Factor Authentication (MFA)

There's more...

See also

Your first AWS Lambda

Getting ready

Code repository usage guidelines

How to do it...

How it works...

About the parent POM

Lambda roles

Lambda runtimes

Extra dependencies

There's more...

Other ways to create Lambda functions from the management console

Other ways to deploy code in a Lambda function

Passing JSON to and from Lambda handler

See also

Your first Lambda with AWS CLI

Getting ready

Configuring AWS CLI

Creating S3 bucket

Note for Windows users

How to do it...

How it works...

Creating a role and attaching a policy

Lambda memory-size and timeout

S3 Bucket and Key

Cleaning up

There's more...

See also

Your first Lambda with Amazon CloudFormation

Getting ready

Set up the project and S3 bucket

Understanding YAML and JSON

How to do it...

Cleaning up roles, policy, and Lambda

How it works...

There's more...

CloudFormation Template Components

Resource component

Intrinsic functions

CloudFormation Designer

Additional benefits of CloudFormation

Cloud Formation alternatives

See also

Using AWS SDK, Amazon CloudFormation, and AWS CLI with Lambda

Getting ready

How to do it...

Creating the POJOs for requests and response.

How it works...

There's more...

Pseudo-parameters

See also

Dev Practices – dependency injection and unit testing

Getting ready

Code refactoring

How to do it...

How it works...

There's more...

See also

Your first Lambda with serverless framework

Getting ready

How to do it...

How it works...

There's more...

See also

Building Serverless REST APIs with API Gateway

Introduction

Building your first API using the AWS CLI

Getting ready

How to do it...

How it works...

HTTP essentials

REST essentials

Parts of a URL

There's more...

See also

Building your first API using Amazon CloudFormation

Getting ready

How to do it...

How it works...

There's more...

See also

Building your first API with Lambda integration

Getting ready

How to do it...

Creating the Lambda

Creating a REST API with AWS CLI commands

Creating a REST API with a CloudFormation template

How it works...

CLI commands

CloudFormation template components

There's more...

See also

Building and testing your first POST API method

Getting ready

How to do it...

Creating the API with CLI commands

Creating the API with a CloudFormation template

Testing with Postman

How it works...

Passthrough behavior

There's more...

See also

Mapping requests and responses with mapping templates

Getting ready

How to do it...

Mapping requests

Mapping responses

Creating the API using CLI commands

Creating the API with a CloudFormation template

Testing the API

How it works...

Mapping templates and variables

Using #set

There's more...

The Apache Velocity Language

JSONPath expressions

See also

Validating request payloads with models

Getting ready

How to do it...

The request data format

Creating the API with CLI commands

The CloudFormation template

Testing the API

How it works...

There's more...

See also

Lambda and API with proxy integration

Getting ready

How to do it...

Creating a Lambda function for proxy integration

Deploying the Lambda

Creating the Proxy API with CLI commands

Creating the API using CloudFormation templates

How it works...

The greedy path, the ANY HTTP method, and proxy integration

RequestStreamHandler versus RequestHandler

The input and output format of a Lambda function for proxy integration

There's more...

See also

Data Storage with Amazon DynamoDB

Introduction

Your first DynamoDB table

Getting ready

How to do it...

Creating a table using CLI commands

Creating a table using a CloudFormation template

How it works...

DynamoDB data model

Data model limits

DynamoDB keys and partitions

Read and write capacity units

Waiting for asynchronous operations

Other ways to create tables

There's more...

DynamoDB features

DynamoDB general limitations

Local and global secondary indexes

See also

Throughput provisioning examples

Getting ready

How to do it...

Scenario 1

Scenario 2

Scenario 3

How it works...

Strongly consistent reads versus eventually consistent reads

Limits on throughput updates within a day

There's more...

See also

Working with data from the CLI

Getting ready

How to do it...

Adding items

Reading items

Updating items

Deleting items

How it works...

Add, update, and delete operations

Reading data from DynamoDB

return-consumed-capacity

There's more...

See also

Using the DynamoDB SDK from Lambda

Getting ready

How to do it...

How it works...

AmazonDynamoDB client versus DynamoDB wrapper client

IAM policy and actions

Single Lambda versus multiple Lambdas

There's more...

See also

Creating tables from Lambda

Getting ready

How to do it...

How it works...

There's more...

See also

Adding data items from Lambda

Getting ready

How to do it...

How it works...

There's more...

See also

Reading data from Lambda

Getting ready

How to do it...

How it works...

There's more...

See also

Application Security with Amazon Cognito

Introduction

Creating a Cognito user pool

Getting ready

How to do it...

Creating Cognito user pool with AWS CLI

Creating Cognito user pool with CloudFormation template

How it works...

Generating and using JSON templates with CLI commands

AliasAttributes versus UsernameAttributes

There's more...

See also

Server-side authentication flow

Getting ready

How to do it...

Creating Cognito user pool client

Creating a Cognito user pool client with AWS CLI

Creating a Cognito user pool client with CloudFormation template

Server-side authentication flow

How it works...

Server-side, client-side, and custom authentication flows

Secure Remote Password protocol

The access token, refresh token, and ID token

ADMIN_NO_SRP_AUTH versus USER_PASSWORD_AUTH

There's more...

See also

Client-side authentication flow

Getting ready

How to do it...

Creating a Cognito user pool client

Creating a Cognito user pool client with AWS CLI

Creating a Cognito user pool client with CloudFormation template

Client-side authentication flow

How it works...

There's more...

See also

User sign-up flow with Cognito

Getting ready

How to do it...

User sign-up with self-confirmation

User sign-up with admin confirmation

How it works...

There's more...

See also

Working with groups

Getting ready

How to do it...

How it works...

There's more...

See also

Integrating Cognito with the API gateway

Getting ready

How to do it...

The AWS CLI

The CloudFormation template

How it works...

Claim-based identity

There's more...

See also

User sign-up with SMS verification and MFA

Getting ready

How to do it...

Creating the user pool

Creating a Cognito user pool client with AWS CLI

Creating a Cognito user pool client with CloudFormation template

User sign-up with SMS and MFA verification

How it works...

There's more...

See also

Web Hosting with S3, Route53, and CloudFront

Introduction

Setting up an S3 static website

Getting ready

How to do it...

AWS CLI commands

The CloudFormation template

How it works...

There's more...

See also

Setting up CloudFront for an S3 website

Getting ready

How to do it...

AWS CLI commands

Understanding the DistributionConfig defaults in the response

The CloudFormation template

How it works...

There's more...

See also

Registering a domain name with Route 53

Getting ready

How to do it...

Registering a domain with AWS CLI commands

How it works...

Hosted zones

There's more...

Registering a domain from AWS Management Console

See also

Using domains registered with other registrars

Getting ready

How to do it...

AWS CLI commands

The CloudFormation template

How it works...

DNS propagation

There's more...

Steps for configuring DNS from the AWS Management Console

See also

Using custom domains with S3 static websites

Getting ready

How to do it...

AWS CLI commands

The CloudFormation template

How it works...

There's more...

See also

Using custom domain names with CloudFront

Getting ready

How to do it...

AWS CLI commands

The CloudFormation template

The CloudFront distribution stack

The RecordSet stack

How it works...

There's more...

Using HTTPS to secure your domain URL

Disabling and deleting a CloudFront distribution

See also

Using HTTPS with a CloudFront domain

Getting ready

How to do it...

Associating a certificate with a domain using AWS CLI commands

Associating a certificate with a domain using CloudFormation template

How it works...

Server Name Identification (SNI)

There's more...

See also

Messaging and Notifications with SQS and SNS

Introduction

Your first SQS queue (AWS CLI + CloudFormation)

Getting ready

How to do it...

Creating an SQS queue

AWS CLI commands

The CloudFormation template

Sending and receiving data (AWS CLI)

How it works...

There's more...

See also

Creating an SQS queue and sending messages with SDK (Java)

Getting ready

How to do it...

Lambda project code (Java)

Provisioning and testing the Lambda (AWS CLI)

How it works...

There's more...

See also

Receiving and sending SQS messages in batches with SDK (Java)

Getting ready

How to do it...

Lambda project code (Java)

Setting up queues and data

Provisioning and testing the Lambda (AWS CLI)

How it works...

There's more...

See also

Invoking the Lambda with an SQS event (Java)

Getting ready

How to do it...

Lambda project code (Java)

Setting up queues and data

Provisioning the Lambda (AWS CLI)

Testing the Lambda (AWS CLI)

How it works...

There's more...

See also

Your first SNS topic for email and SMS (AWS CLI + CloudFormation)

Getting ready

How to do it...

Creating an SNS topic

AWS CLI

The CloudFormation template

Creating email and SMS subscriptions (AWS CLI)

SMS subscription

Email subscription

Publishing a message

How it works...

There's more...

See also

Publishing to an SNS topic with SDK (Java)

Getting ready

How to do it...

Lambda project code (Java)

Provisioning and testing the Lambda (AWS CLI)

How it works...

There's more...

See also

Invoking a Lambda with SNS events (Java)

Getting ready

How to do it...

Lambda project code (Java)

Provisioning the Lambda (AWS CLI)

Testing the Lambda (AWS CLI)

How it works...

There's more...

See also

Redshift, Amazon ML, and Alexa Skills

Introduction

Your first Kinesis data stream (AWS CLI)

Getting ready

How to do it...

Step 1 - Creating a Kinesis data stream

Using AWS CLI

Using the CloudFormation template

Step 2 - Adding and retrieving data

How it works...

Kinesis shard iterator types

There's more...

See also

Writing data into Kinesis Stream with SDK (Java)

Getting ready

How to do it...

Step 1 - Creating the Lambda project (Java)

Step 2 - Provisioning and testing Lambda (AWS CLI)

How it works...

There's more...

See also

Invoking Lambda with Kinesis events (Java)

Getting ready

How to do it...

Step 1 - Creating a Lambda project (Java)

Step 2 - Provisioning and testing Lambda (AWS CLI)

How it works...

There's more...

See also

Using Amazon ML for binary classification (AWS CLI)

Getting ready

How to do it...

How it works...

Types of models

DataSource object

Receiver Operating Characteristic and Area Under the ROC

There's more...

See also

Building and testing an Alexa skill (Java for Lambda, CLI for Alexa skill)

Getting ready

Installing and configuring the ASK CLI

Configuring ask-cli for the first time

How to do it...

Step 1 - Creating the Lambda project (Java)

Step 2 - Provisioning Lambda (AWS CLI)

Step 3 - Building an Alexa skill with ASK CLI

How it works...

Alexa skill invocation basics

Explaining the Lambda project (Java)

Explaining the ASK CLI steps

There's more...

Voice app platforms

See also

Monitoring and Alerting with Amazon CloudWatch

Introduction

Checking logs, insights, and metrics (Console)

Getting ready

How to do it...

Step 1: Logging in to the CloudWatch dashboard

Logs

Log insights

Metrics

How it works...

Log groups

Log streams

Log insights

Metrics

There's more...

See also

Your first custom metric (AWS CLI)

Getting ready

How to do it...

Step 1–Create a simple metric without dimensions

Step 2—Add dimensions to metric data

How it works...

There's more...

See also

Setting up CloudWatch alarms (AWS CLI)

Getting ready

How to do it...

How it works...

There's more...

See also

CloudWatch alarms with dimensions (AWS CLI)

Getting ready

How to do it...

How it works...

There's more...

See also

Using CloudWatch metric log filters

Getting ready

How to do it...

Creating metric filters from AWS CLI

Creating metric filters from the console

How it works...

There's more...

See also

Serverless Programming Practices and Patterns

Introduction

Enabling CORS for the API and testing with CodePen

Getting ready

Getting familiar with CodePen

How to do it...

How it works...

There's more...

See also

Implementing and testing Cognito operations with the JavaScript SDK

Getting ready

Download the amazon-cognito-identity.min.js file

Create an S3 bucket and upload the amazon-cognito-identity.min.js file

Creating a Cognito user pool and client

How to do it...

How it works...

There's more...

See also

Federated identity with Amazon Cognito

Getting ready

How to do it...

Step 1 - Configuring Google Plus

Step 2 - Creating and Configuring an Identity Pool

Step 3 - Preparing and uploading code files

Preparing the index.html file

Deploying and testing the index.html file

How it works...

There's more...

See also

Creating SSL/TLS certificate with ACM

Getting ready

How to do it...

AWS CLI Commands

CloudFormation Template

How it works...

There's more...

See also

Fan-in and fan-out architectural patterns with AWS

Getting ready

How to do it...

Scenario 1 - Pub-Sub with multiple producers and consumers

Scenario 2 - Parallel processing without duplicates

Scenario 3 - Streaming real-time data for processing

Scenario 4 - Streaming real-time data for storing

How it works...

Real-world example scenarios

Scenario 1 - Pub-Sub scenario with multiple producers and consumers

Scenario 2 - Parallel processing

Scenario 3 - Streaming real-time data for processing

Scenario 4 - Streaming real-time data for storage

There's more...

Building a full stack web application on AWS

See also

Other Cloud Providers

Introduction

Your first Serverless application in Azure

Getting ready

How to do it...

Deploying the function to Azure

Getting function info from UI and verifying the deployment

How It works...

There's more...

See also

Your first serverless application on Google Cloud Platform

Getting ready

How to do it...

How it works...

There's more...

See also

Your first Serverless application on IBM cloud

Getting ready

How to do it...

How It works...

There's more...

See also

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部