Amazon Web Services in Action: An in-depth guide to AWS

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Master essential best practices for deploying and managing applications on Amazon Web Services. This revised bestseller is packed with techniques for building highly available and scalable architectures and automating deployment with Infrastructure as Code. • Leverage globally distributed data centers to launch virtual machines with EC2 • Store and archive large volumes of data with EBS, S3, and EFS • Persist and query data with highly available and scalable database systems with RDS and DynamoDB • Enhance performance with caching data in-memory with ElastiCache and MemoryDB • Use Infrastructure as Code to automate your cloud infrastructure • Secure workloads running in the cloud with VPC and IAM • Build fault-tolerant web applications with ALB and SQS • Automate common sysadmin tasks with Lambda, CLI, and SDK • Build cloud-native applications based on containers with AppRunner, ECS, Fargate Thousands of developers have chosen Amazon Web Services in Action: An in-depth guide to AWS to help them succeed with the AWS cloud. Readers love this all-practical handbook for its complete introduction to computing, storage, and networking, along with best practices for all core AWS services. This revised third edition features new chapters on containerization, along with a variety of AWS innovations. You’ll also learn how automating your infrastructure with IAC is a game changer for your cloud deployment, delivering a massive boost to efficiency and quality. About the technology Amazon Web Services, the leading cloud computing platform, offers customers APIs for on-demand access to computing services. Rich in examples and best practices of how to use AWS, this Manning bestseller is now released in its third, revised, and improved edition. About the book In Amazon Web Services in Action, Third Edition: An in-depth guide to AWS, the Wittig brothers give you a comprehensive, practical introduction to deploying and managing applications on the AWS cloud platform. With a sharp focus on the most important AWS tasks and services, they will save you hours of unproductive time. You’ll learn hands-on as you complete real-world projects like hosting a WordPress site, setting up a private cloud, and deploying an app on containers. What's inside • Leverage globally distributed data centers to launch virtual machines • Enhance performance with caching data in-memory • Secure workloads running in the cloud with VPC and IAM • Build fault-tolerant web applications with ALB and SQS About the reader Written for mid-level developers, DevOps or platform engineers, architects, and system administrators. About the author Andreas Wittig and Michael Wittig are software engineers and consultants focused on AWS. Together, they migrated the first bank in Germany to AWS in 2013.

Author(s): Andreas Wittig, Michael Wittig
Edition: 3
Publisher: Manning
Year: 2023

Language: English
Commentary: Publisher's PDF | DDC & UDC are set to values that approximate as much as possible the subject of "cloud computing" but they need adjustments. LCC is accurate and LBC is as good as LCC.
Pages: 552
City: Shelter Island, NY
Tags: Amazon Web Services;Cloud Computing;Command Line;Debugging;Security;Web Applications;Relational Databases;NoSQL;MySQL;Virtualization;Reliability;Monitoring;Scalability;Batch Processing;Fault Tolerance;Deployment;Redis;High Availability;Redundancy;VPN;Load Balancing;AWS Lambda;Infrastructure as Code;Serverless Applications;AWS CloudFormation;AWS Elastic Beanstalk;AWS OpsWorks;AWS Glacier;AWS Elastic Block Store;Amazon ElastiCache;AWS CloudWatch;AWS Elastic Compute Cloud;AWS Simple Storage Service

Amazon Web Services in Action
Praise for the second edition
brief contents
contents
preface
acknowledgments
about this book
About the third edition
Who should read this book
How this book is organized: A road map
AWS costs
About the code
liveBook discussion forum
about the authors
about the cover illustration
Part 1—Getting started
1 What is Amazon Web Services?
1.2 What can you do with AWS?
1.2.1 Hosting a web shop
1.2.2 Running a Java EE application in your private network
1.2.3 Implementing a highly available system
1.2.4 Profiting from low costs for batch processing infrastructure
1.3 How you can benefit from using AWS
1.3.1 Innovative and fast-growing platform
1.3.2 Services solve common problems
1.3.3 Enabling automation
1.3.4 Flexible capacity (scalability)
1.3.5 Built for failure (reliability)
1.3.6 Reducing time to market
1.3.7 Benefiting from economies of scale
1.3.8 Global infrastructure
1.3.9 Professional partner
1.4 How much does it cost?
1.4.1 Free Tier
1.4.2 Billing example
1.4.3 Pay-per-use opportunities
1.5 Comparing alternatives
1.6 Exploring AWS services
1.7 Interacting with AWS
1.7.1 Management Console
1.7.2 Command-line interface
1.7.3 SDKs
1.7.4 Blueprints
1.8 Creating an AWS account
1.8.1 Signing up
1.8.2 Signing in
1.9 Creating a budget alert to keep track of your AWS bill
Summary
2 A simple example: WordPress in 15 minutes
2.1 Creating your infrastructure
2.2 Exploring your infrastructure
2.2.1 Virtual machines
2.2.2 Load balancer
2.2.3 MySQL database
2.2.4 Network filesystem
2.3 How much does it cost?
2.4 Deleting your infrastructure
Summary
Part 2—Building virtual infrastructure consisting of computers and networking
3 Using virtual machines: EC2
3.1 Exploring a virtual machine
3.1.1 Launching a virtual machine
3.1.2 Connecting to your virtual machine
3.1.3 Installing and running software manually
3.2 Monitoring and debugging a virtual machine
3.2.1 Showing logs from a virtual machine
3.2.2 Monitoring the load of a virtual machine
3.3 Shutting down a virtual machine
3.4 Changing the size of a virtual machine
3.5 Starting a virtual machine in another data center
3.6 Allocating a public IP address
3.7 Adding an additional network interface to a virtual machine
3.8 Optimizing costs for virtual machines
3.8.1 Commit to usage, get a discount
3.8.2 Taking advantage of spare compute capacity
Summary
4 Programming your infrastructure: The command line, SDKs, and CloudFormation
4.1 Automation and the DevOps movement
4.1.1 Why should you automate?
4.2 Using the command-line interface
4.2.1 Installing the CLI
4.2.2 Configuring the CLI
4.2.3 Using the CLI
4.2.4 Automating with the CLI
4.3 Programming with the SDK
4.3.1 Controlling virtual machines with SDK: nodecc
4.3.2 How nodecc creates a virtual machine
4.3.3 How nodecc lists virtual machines and shows virtual machine details
4.3.4 How nodecc terminates a virtual machine
4.4 Infrastructure as Code
4.4.1 Inventing an infrastructure language: JIML
4.5 Using AWS CloudFormation to start a virtual machine
4.5.1 Anatomy of a CloudFormation template
4.5.2 Creating your first template
4.5.3 Updating infrastructure using CloudFormation
Summary
5 Securing your system: IAM, security groups, and VPC
5.1 Who’s responsible for security?
5.2 Keeping the operating system up-to-date
5.3 Securing your AWS account
5.3.1 Securing your AWS account’s root user
5.3.2 AWS Identity and Access Management (IAM)
5.3.3 Defining permissions with an IAM identity policy
5.3.4 Users for authentication and groups to organize users
5.3.5 Authenticating AWS resources with roles
5.4 Controlling network traffic to and from your virtual machine
5.4.1 Controlling traffic to virtual machines with security groups
5.4.2 Allowing ICMP traffic
5.4.3 Allowing HTTP traffic
5.4.4 Allowing HTTP traffic from a specific source IP address
5.4.5 Allowing HTTP traffic from a source security group
5.5 Creating a private network in the cloud: Amazon Virtual Private Cloud (VPC)
5.5.1 Creating the VPC and an internet gateway (IGW)
5.5.2 Defining the public proxy subnet
5.5.3 Adding the private backend subnet
5.5.4 Launching virtual machines in the subnets
5.5.5 Accessing the internet from private subnets via a NAT gateway
Summary
6 Automating operational tasks with Lambda
6.1 Executing your code with AWS Lambda
6.1.1 What is serverless?
6.1.2 Running your code on AWS Lambda
6.1.3 Comparing AWS Lambda with virtual machines (Amazon EC2)
6.2 Building a website health check with AWS Lambda
6.2.1 Creating a Lambda function
6.2.2 Use CloudWatch to search through your Lambda function’s logs
6.2.3 Monitoring a Lambda function with CloudWatch metrics and alarms
6.2.4 Accessing endpoints within a VPC
6.3 Adding a tag containing the owner of an EC2 instance automatically
6.3.1 Event-driven: Subscribing to EventBridge events
6.3.2 Implementing the Lambda function in Python
6.3.3 Setting up a Lambda function with the Serverless Application Model (SAM)
6.3.4 Authorizing a Lambda function to use other AWS services with an IAM role
6.3.5 Deploying a Lambda function with SAM
6.4 What else can you do with AWS Lambda?
6.4.1 What are the limitations of AWS Lambda?
6.4.2 Effects of the serverless pricing model
6.4.3 Use case: Web application
6.4.4 Use case: Data processing
6.4.5 Use case: IoT backend
Summary
Part 3—Storing data in the cloud
7 Storing your objects: S3
7.1 What is an object store?
7.2 Amazon S3
7.3 Backing up your data on S3 with AWS CLI
7.4 Archiving objects to optimize costs
7.5 Storing objects programmatically
7.5.1 Setting up an S3 bucket
7.5.2 Installing a web application that uses S3
7.5.3 Reviewing code access S3 with SDK
7.6 Using S3 for static web hosting
7.6.1 Creating a bucket and uploading a static website
7.6.2 Configuring a bucket for static web hosting
7.6.3 Accessing a website hosted on S3
7.7 Protecting data from unauthorized access
7.8 Optimizing performance
Summary
8 Storing data on hard drives: EBS and instance store
8.1 Elastic Block Store (EBS): Persistent block-level storage attached over the network
8.1.1 Creating an EBS volume and attaching it to your EC2 instance
8.1.2 Using EBS
8.1.3 Tweaking performance
8.1.4 Backing up your data with EBS snapshots
8.2 Instance store: Temporary block-level storage
8.2.1 Using an instance store
8.2.2 Testing performance
8.2.3 Backing up your data
Summary
9 Sharing data volumes between machines: EFS
9.1 Creating a filesystem
9.1.1 Using CloudFormation to describe a filesystem
9.1.2 Pricing
9.2 Creating a mount target
9.3 Mounting the EFS filesystem on EC2 instances
9.4 Sharing files between EC2 instances
9.5 Tweaking performance
9.5.1 Performance mode
9.5.2 Throughput mode
9.5.3 Storage class affects performance
9.6 Backing up your data
Summary
10 Using a relational database service: RDS
10.1 Starting a MySQL database
10.1.1 Launching a WordPress platform with an RDS database
10.1.2 Exploring an RDS database instance with a MySQL engine
10.1.3 Pricing for Amazon RDS
10.2 Importing data into a database
10.3 Backing up and restoring your database
10.3.1 Configuring automated snapshots
10.3.2 Creating snapshots manually
10.3.3 Restoring a database
10.3.4 Copying a database to another region
10.3.5 Calculating the cost of snapshots
10.4 Controlling access to a database
10.4.1 Controlling access to the configuration of an RDS database
10.4.2 Controlling network access to an RDS database
10.4.3 Controlling data access
10.5 Building on a highly available database
10.5.1 Enabling high-availability deployment for an RDS database
10.6 Tweaking database performance
10.6.1 Increasing database resources
10.6.2 Using read replication to increase read performance
10.7 Monitoring a database
Summary
11 Caching data in memory: Amazon ElastiCache and MemoryDB
11.1 Creating a cache cluster
11.1.1 Minimal CloudFormation template
11.1.2 Test the Redis cluster
11.2 Cache deployment options
11.2.1 Memcached: Cluster
11.2.2 Redis: Single-node cluster
11.2.3 Redis: Cluster with cluster mode disabled
11.2.4 Redis: Cluster with cluster mode enabled
11.2.5 MemoryDB: Redis with persistence
11.3 Controlling cache access
11.3.1 Controlling access to the configuration
11.3.2 Controlling network access
11.3.3 Controlling cluster and data access
11.4 Installing the sample application Discourse with CloudFormation
11.4.1 VPC: Network configuration
11.4.2 Cache: Security group, subnet group, cache cluster
11.4.3 Database: Security group, subnet group, database instance
11.4.4 Virtual machine: Security group, EC2 instance
11.4.5 Testing the CloudFormation template for Discourse
11.5 Monitoring a cache
11.5.1 Monitoring host-level metrics
11.5.2 Is my memory sufficient?
11.5.3 Is my Redis replication up-to-date?
11.6 Tweaking cache performance
11.6.1 Selecting the right cache node type
11.6.2 Selecting the right deployment option
11.6.3 Compressing your data
Summary
12 Programming for the NoSQL database service: DynamoDB
12.1 Programming a to-do application
12.2 Creating tables
12.2.1 Users are identified by a partition key
12.2.2 Tasks are identified by a partition key and sort key
12.3 Adding data
12.3.1 Adding a user
12.3.2 Adding a task
12.4 Retrieving data
12.4.1 Getting an item by key
12.4.2 Querying items by key and filter
12.4.3 Using global secondary indexes for more flexible queries
12.4.4 Creating and querying a global secondary index
12.4.5 Scanning and filtering all of your table’s data
12.4.6 Eventually consistent data retrieval
12.5 Removing data
12.6 Modifying data
12.7 Recap primary key
12.7.1 Partition key
12.7.2 Partition key and sort key
12.8 SQL-like queries with PartiQL
12.9 DynamoDB Local
12.10 Operating DynamoDB
12.11 Scaling capacity and pricing
12.11.1 Capacity units
12.12 Networking
12.13 Comparing DynamoDB to RDS
12.14 NoSQL alternatives
Summary
Part 4—Architecting on AWS
13 Achieving high availability: Availability zones, autoscaling, and CloudWatch
13.1 Recovering from EC2 instance failure with CloudWatch
13.1.1 How does a CloudWatch alarm recover an EC2 instance?
13.2 Recovering from a data center outage with an Auto Scaling group
13.2.1 Availability zones: Groups of isolated data centers
13.2.2 Recovering a failed virtual machine to another availability zone with the help of autoscaling
13.2.3 Pitfall: Recovering network-attached storage
13.2.4 Pitfall: Network interface recovery
13.2.5 Insights into availability zones
13.3 Architecting for high availability
13.3.1 RTO and RPO comparison for a single EC2 instance
13.3.2 AWS services come with different high availability guarantees
Summary
14 Decoupling your infrastructure: Elastic Load Balancing and Simple Queue Service
14.1 Synchronous decoupling with load balancers
14.1.1 Setting up a load balancer with virtual machines
14.2 Asynchronous decoupling with message queues
14.2.1 Turning a synchronous process into an asynchronous one
14.2.2 Architecture of the URL2PNG application
14.2.3 Setting up a message queue
14.2.4 Producing messages programmatically
14.2.5 Consuming messages programmatically
14.2.6 Limitations of messaging with SQS
Summary
15 Automating deployment: CodeDeploy, CloudFormation, and Packer
15.1 In-place deployment with AWS CodeDeploy
15.2 Rolling update with AWS CloudFormation and user data
15.3 Deploying customized AMIs created by Packer
15.3.1 Tips and tricks for Packer and CloudFormation
15.4 Comparing approaches
Summary
16 Designing for fault tolerance
16.1 Using redundant EC2 instances to increase availability
16.1.1 Redundancy can remove a single point of failure
16.1.2 Redundancy requires decoupling
16.2 Considerations for making your code fault tolerant
16.2.1 Let it crash, but also retry
16.2.2 Idempotent retry makes fault tolerance possible
16.3 Building a fault-tolerant web application: Imagery
16.3.1 The idempotent state machine
16.3.2 Implementing a fault-tolerant web service
16.3.3 Implementing a fault-tolerant worker to consume SQS messages
16.3.4 Deploying the application
Summary
17 Scaling up and down: Autoscaling and CloudWatch
17.1 Managing a dynamic EC2 instance pool
17.2 Using metrics or schedules to trigger scaling
17.2.1 Scaling based on a schedule
17.2.2 Scaling based on CloudWatch metrics
17.3 Decoupling your dynamic EC2 instance pool
17.3.1 Scaling a dynamic EC2 instance pool synchronously decoupled by a load balancer
17.3.2 Scaling a dynamic EC2 instances pool asynchronously decoupled by a queue
Summary
18 Building modern architectures for the cloud: ECS, Fargate, and App Runner
18.1 Why should you consider containers instead of virtual machines?
18.2 Comparing different options to run containers on AWS
18.3 The ECS basics: Cluster, service, task, and task definition
18.4 AWS Fargate: Running containers without managing a cluster of virtual machines
18.5 Walking through a cloud-native architecture: ECS, Fargate, and S3
Summary
index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z