My Account Log in

3 options

Building serverless web applications : build scalable web apps using Serverless Framework on AWS / Diego Zanon.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central College Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Zanon, Diego, author.
Language:
English
Subjects (All):
Amazon Web Services (Firm).
Application software--Development.
Application software.
Web applications--Development.
Web applications.
Physical Description:
1 online resource (330 pages) : illustrations
Edition:
1st edition
Other Title:
Build scalable web apps using Serverless Framework on AWS
Place of Publication:
Birmingham, England : Packt, 2017.
System Details:
text file
Summary:
Build scalable, efficient, and highly available web apps using AWS About This Book Get an in-depth understanding of the serverless model Build a complete serverless web application end to end Learn how to use the Serverless Framework to improve your productivity Who This Book Is For If you're looking to learn more about scalable and cost-efficient architectures, this book is for you. Basic knowledge of Node.js skills or familiarity with cloud services is required. For other topics, we cover the basics. What You Will Learn Get a grasp of the pros and cons of going serverless and its use cases Discover how you can use the building blocks of AWS to your advantage Set up the environment and create a basic app with the Serverless Framework Host static files on S3 and CloudFront with HTTPS support Build a sample application with a frontend using React as an SPA Develop the Node.js backend to handle requests and connect to a SimpleDB database Secure your applications with authentication and authorization Implement the publish-subscribe pattern to handle notifications in a serverless application Create tests, define the workflow for deployment, and monitor your app In Detail This book will equip you with the knowledge needed to build your own serverless apps by showing you how to set up different services while making your application scalable, highly available, and efficient. We begin by giving you an idea of what it means to go serverless, exploring the pros and cons of the serverless model and its use cases. Next, you will be introduced to the AWS services that will be used throughout the book, how to estimate costs, and how to set up and use the Serverless Framework. From here, you will start to build an entire serverless project of an online store, beginning with a React SPA frontend hosted on AWS followed by a serverless backend with API Gateway and Lambda functions. You will also learn to access data from a SimpleDB database, secure the application with authentication and authorization, and implement serverless notifications for browsers using AWS IoT. This book will describe how to monitor the performance, efficiency, and errors of your apps and conclude by teaching you how to test and deploy your applications. Style and approach This book takes a step-by-step approach on how to use the Serverless Framework and AWS services to build Serverless Applications. It will give you a hands-on feeling, allowing you to practice while reading. It provide...
Contents:
Intro
Copyright
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Table of Contents
Preface
Chapter 1: Understanding the Serverless Model
Introducing serverless
Thinking serverless
Serverless and PaaS
IaaS and On-Premises
The main goals of serverless
Scalability
Availability
Cost efficiency
The pros and cons of serverless
Pros
Reduced operational costs
Focus on business
System security
Continuous delivery
Microservices friendly
Cost model
Cons
Higher latency
Constraints
Hidden inefficiencies
Vendor dependency
Debugging difficulties
Atomic deploys
Uncertainties
Use cases
Static websites
Lean websites
Small e-commerce websites
Temporary websites
Triggered processing
Chatbots
IoT backends
Scheduled events
Big Data
What you should avoid
Summary
Chapter 2: Getting Started with AWS
Amazon Web Services
Handling user accounts and security
AWS IAM
Creating users and groups
Sign in with a non-root user account
Amazon Cognito
Managing AWS resources
AWS Management Console
AWS SDKs
AWS CLI
AWS CloudFormation
Amazon CloudWatch
Frontend services
Amazon S3
Using S3 with the CLI
Amazon Route 53
Amazon CloudFront
AWS Certificate Manager
Messaging and notifications
Amazon SNS
AWS IoT
Backend services
AWS Lambda
Creating a Lambda function
Amazon API Gateway
Expose your Lambda function using API Gateway
Database services
Amazon SimpleDB
Amazon DynamoDB
The serverless architecture of our online store
Estimating costs
Assumptions
Route 53 pricing
S3 pricing
CloudFront pricing
Certificate Manager pricing
IAM pricing
Cognito pricing
IoT pricing
SNS pricing
CloudWatch pricing.
API Gateway pricing
Lambda pricing
SimpleDB pricing
DynamoDB
Total pricing
Chapter 3: Using the Serverless Framework
Serverless Framework
Understanding the Serverless Framework
Other frameworks
Installing the framework
Configuring the framework
Managing permissions in a team
Creating a new project
The handler.js file
The serverless.yml file
Configuring the Lambda limits
Deploying a service
Invoking a function
Retrieving logs
Adding endpoints
Cross-Origin Resource Sharing
Removing a service
Going beyond the basics
Using npm packages
Accessing other AWS resources
Events
The S3 event
Schedule events
Serving HTML pages with Lambda
Using configuration variables
Plugins
Showing deployment information
Scaffolding
Chapter 4: Hosting the Website
Serving static files with Amazon S3
Creating a bucket
Enabling web hosting
Handling errors
Using redirection rules
Using an error document
Delegating to CloudFront
Prerendering pages
Supporting www anchors
Uploading static files
Automating website publishing
Serving gzip files
Setting up Route 53
Creating a hosted zone
Creating record sets
Setting up CloudFront
Creating a distribution
Handling CloudFront caching
Invalidating server-side cache
Invalidating client-side cache
Updating Route 53 to use CloudFront
Supporting HTTPS
Creating a mail exchange record
Requesting free certificates with AWS Certificate Manager
Configuring CloudFront to support HTTPS connections
Chapter 5: Building the Frontend
Getting started with React
React principles
The Flux pattern
React hello-world
Building a shopping cart
Preparing the development environment
Organizing the solution
Composing components.
Implementing a component
The App component
The Product List component
The Product component
The Shopping Cart component
The Cart Item component
Publishing our demo
Making Ajax requests
Retrieving data from the server
Sending data to the server
Handling the page routes
Linking pages
Using the query parameters
Single-Page Applications
Pros and cons of Single-Page Applications
Considerations
Using PhantomJS
Using the Lambda functions for prerendering
Rendering on the fly
Building an online store
The Navbar component
The Home page
The product details page
The Shopping Cart page
The Login and Signup pages
The error pages
Chapter 6: Developing the Backend
Defining the project architecture
Monolith versus Microservices
Nanoservices
Microservices
Monolith
Graph
Naming differences
Developing the backend
Defining the functionalities
Organizing the code
Referencing Lambda functions in other folders
Using multiple services
Setting the endpoints
RESTful APIs
Routing the HTTP verbs
Handling HTTP responses
Implementing the Lambda functions
Retrieving all products
Saving the Shopping Cart
Checking out
Chapter 7: Managing a Serverless Database
Modeling the database
Handling one-to-many relations
Handling numbers
Handling Booleans
Handling dates
Creating a domain
Limits
Inserting and querying data
Performance and concurrency
Managing the database
Backing up and restoring data
Controlling user access
Creating a table
Inserting data
The Document Client API
Querying data
The scan method
The query method.
Performance and concurrency
Provisioned throughput
Auto scaling
Improving the serverless store
Retrieving the user's shopping cart
Saving the user's shopping cart
Processing the checkout
Amazon S3 (for media files)
Uploading and downloading files
Enabling CORS
Using S3 versioning
Chapter 8: Securing the Serverless Application
Security basics
Information security
Authentication
Authorization
Confidentiality
Integrity
Non-repudiation
Security on AWS
Shared responsibility model
The Trusted Advisor tool
Pen testing
AWS CloudTrail
MFA
Handling authentication and authorization
Creating a user pool
Creating an identity pool
Using Cognito in our serverless store
The Signup page
The Login page
Persisting the user token
Logging out
Handling authentication in Lambda functions
Chapter 9: Handling Serverless Notifications
Protocols
Finding the IoT endpoint
AWS IoT SDK
Implementing serverless notifications
Public notifications
Adding a comment box
Updating the list of comments
Creating a new instance of the IoT SDK
Sending and receiving new comments
Triggering a Lambda function with IoT
Private notifications
Using credentials of an authenticated user
Updating the logout feature
Creating an IoT policy
Attaching an IoT policy and connecting
Passing the Cognito Identity to the Lambda function
Sending IoT messages with Lambda
Chapter 10: Testing, Deploying, and Monitoring
Testing your solution
Unit testing Lambda functions
Mocking external services
Using Sinon.JS for mocking.
Testing the frontend
Simulating AWS services locally
Deploying your application
Development workflow
Blue-green deployment
Deploying new versions with a different database model
Creating a new table or column
Renaming a table or column
Dropping a table or column
Rollback a deployment
Creating staging environments
Being careful with the production environment
Test data
Keeping your functions warm
Monitoring the operation
Monitoring costs
Monitoring errors
Retrieving metrics with the Serverless Framework
Streaming Lambda logs
Monitoring performance
Monitoring efficiency
Index.
Notes:
Includes index.
Description based on online resource; title from PDF title page (ebrary, viewed August 25, 2017).
OCLC:
1001253545

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Library Catalog Using Articles+ Library Account