5.1 AWS - Basic - All
5.1 AWS - Basic - All
5.1 AWS - Basic - All
Hands-on
Gain Fundamental Gain understanding
creation of a web
IT knowledge of AWS Services
system
Building our Real-world Architecture
Route53
CloudFront
10.0.0.0/16
AZ AZ
EC2 EC2
RDS RDS
Synchronous replication.
Automatic failover.
MySQL DB server
Contents of the course
Section What you will learn in the sections
AWS Global
Understand the global infrastructure configuration of
Infrastructure AWS.
configuration
on- EC2
premise (Server)
Server
What is AWS?
AWS provides instant access to infrastructure such as
servers, storage, and databases
on- EC2
premise (Server)
Server
S3
Storage (Storage)
What is AWS?
A great advantage is that it only takes a few minutes to
set up a server and it's free and ready to use immediately.
on- EC2
premise (Server)
Server
Cloud Space
(Internet)
EC2 RDS
Wide range of services
AWS provides the complete set of services necessary for
system construction and operation
Computing Storage Networking Database Security
Block-
IoT AI Robotics Satellites
chain
Cloud Space
(Internet)
EC2 RDS
What is infrastructure?
The network equipment, servers, and databases that
make up a network are what we call infrastructure.
Data Center
Components of IT (hardware)
The network technologies and computers that make up IT
are our typical hardware.
Components of IT (software)
An operating system is the system software that controls
computer operations.
What is infrastructure?
Infrastructure is composed of both hardware and
software.
What is the cloud?
A system in which infrastructure owned by other
companies is used via the Internet.
Internet (Cloud)
HW owned by
others Temporarily use parts
of their HW
Summary
Cloud
EC2 RDS
Why AWS?
参照: https://japan.zdnet.com/article/35140211/
Why AWS is at the top?
Source: https://spendmenot.com/blog/rd-spenders/
Become a Cloud Leader
By releasing the latest services including AI with
overwhelming investment, it is no longer possible for
latecomers to catch up
Latest technology presentation
参照:https://aws.amazon.com/jp/new/reinvent/
AWS First
infrastructure
Programmer SE IT Consultant
engineers
EC2
(Server)
How AWS works
It’s a system that allows you to combine
infrastructure/system functions online like blocks to create
the configuration you want.
ELB
(Load
balancer)
EC2 EC2
(Server) (Server)
How AWS works
It’s a system that allows you to combine
infrastructure/system functions online like blocks to create
the configuration you want.
ELB
(Load
balancer)
EC2 EC2
(Server) (Server)
RDS
(Database)
How AWS works
It’s a system that allows you to combine
infrastructure/system functions online like blocks to create
the configuration you want.
VPC
(Network)
ELB
(Load
balancer)
EC2 EC2
(Server) (Server)
RDS
(Database)
How AWS works
It’s a system that allows you to combine
infrastructure/system functions online like blocks to create
the configuration you want.
VPC
(Network)
ELB Route53
(Load balancer) (DNS)
Internet
EC2 EC2
(Server) (Server)
RDS
(Database)
How AWS works
It’s a system that allows you to combine
infrastructure/system functions online like blocks to create
the configuration you want.
VPC
(Network)
ELB Route53
(Load balancer) (DNS)
Internet
EC2 EC2
(Server) (Server)
S3 RDS
(Storage) (Database)
Key Infrastructure Services
All the services you need to build an infrastructure are on
offer.
Computing
(Server)
Computing
Related services to launch and run servers and other
computing when building applications.
Computing
(Server)
Storage
Storage
Various types of storage used to store data in AWS
Amazon Simple Storage Object-based storage service for storing large amounts of
Service (S3) frequently used data in the medium to long term.
Amazon Elastic Block Block-type storage dedicated to EC2 instances that can be
Store (EBS) attached to EC2 via the network.
Amazon Elastic File A service that provides an NFS file system that is suitable
System (EFS) for storing file data in a directory structure.
Computing
(Server)
Database Storage
Database
AWS provides various types of database services as
managed services.
Computing
(Server)
Database Storage
Networking and content distribution
Service used to set up network and content distribution
and connection to AWS environment
A service to build a virtual networking environment by
Amazon VPC selecting IP address ranges, creating subnets, and
configuring route tables and network gateways.
A content delivery network (CDN) service that delivers
Amazon CloudFront content worldwide through low-latency, high-speed
transmission.
Computing
(Server)
Network
office
Database Storage
Networking and content distribution
Service used to set up network and content distribution
and connection to AWS environment
Leased line service that establishes a private connection
AWS Direct Connect between AWS and your data center or office
Identity
Network
Computing
(Server)
Network
office
Database Storage
Identity (user management)
Services that contribute to security and compliance in
AWS
AWS Identity & Access A service to create and manage users who use AWS
Management (IAM) services.
AWS Single Sign-On AWS service that provides users with single sign-on access
(SSO) between on-premises and AWS environments.
Identity
Network
Computing
(Server)
Network
office
Database Storage
Security
Security and Compliance
Services that contribute to security and compliance in
AWS
A service to create and manage encryption keys. It can be
AWS KMS
used to control the encryption of a wide range of AWS
(Key Management Service)services and applications.
A service for creating and managing SSL/TLS certificates,
AWS ACM
which encrypts communications by setting up certificates
(Certificate Manager) for CloudFront or ELB.
Network
Computing
(Server)
Network
office
Database Storage
Security
Management and governance (monitoring)
Support tools and services for operation, maintenance,
and support
A monitoring service that can be automatically applied to
Amazon CloudWatch most AWS resources to retrieve metrics values and set
alarms, etc.
AWS Personal Monitoring service that displays the status of AWS services
Health Dashboard as abnormal or normal and healthy.
Computing
(Server)
Network office
Database Storage
Security
AWS Cost Management
Support tools and services for operation, maintenance,
and support
Tools to calculate AWS costs, such as a TCO calculation tool,
Price Calculation Tools and a pricing calculator.
office
Database Storage
Network
Security
Migration service
Services used for infrastructure migration and data
migration to the AWS cloud
A service that collects configuration data and usage data of
AWS Application
servers in on-premise environments to help prepare
Discovery Service migration plans.
AWS Database Migration This service is used to migrate databases to AWS in a short
period of time and safely, and is also used to migrate
Service between AWS databases.
Migration support tool that can migrate virtual server
AWS Server Migration
configurations running thousands of on-premise workloads
Service to AWS.
Applications Development
Data Analysis
combination Support Services
Application Integration
Services used to control communication between
applications, create flows, and link data.
A Pub/Sub type messaging service. It is used for push-type
Amazon SNS message notifications and alert notifications between
components.
Cloud
Virtualized infrastructure
What is virtualization?
Technology to hide the physical infrastructure configuration,
to then divide or intergrate it into virtualized units.
Server
What is virtualization?
Technology to hide the physical infrastructure configuration,
to then divide or intergrate it into virtualized units.
Server
What is virtualization?
Technology to hide the physical infrastructure configuration,
to then divide or intergrate it into virtualized units.
Virtual storage C
Storage A Storage B
Virtualization mechanism
It is possible to set virtualization software in one physical
server, divide that area, and then use it as an individual
server.
Physical server
Virtualization mechanism
It is possible to set virtualization software in one physical
server, divide that area, and then use it as an individual
server.
Physical server
Virtualization mechanism
It is possible to set virtualization software in one physical
server, divide that area, and then use it as an individual
server.
Virtualization software
Physical server
Virtualization type
There are three types of virtualization: division,
aggregation, and imitation
Storage A Storage B
Server Server
Target of virtualization
You can virtualize the following resources
• Improved security
Container
The container is a virtualization method that uses the
kernel of the host machine to isolate processes and users.
EC2 instance EC2 instance Container Container
App App App App
Virtualization software
Docker engine
(Hypervisor, etc.)
Host OS Host OS
SDI
Virtualized infrastructure
SDI
The infrastructure construction method outlines
configuration by the code such as JSON/YAML, and a
virtual infrastructure can be constructed based on this.
AWSTemplateFormatVersion: '2010-09-09’
Description:
Metadata:
Parameters:
Mappings:
Conditions:
Transform:
Resources:
FirstVPC:
Type: AWS::EC2::VPC
Properties:
Builds Virtual
CidrBlock: 10.0.0.0/16
Tags:
infrastructure
- Key: Name
Value: FirstVPC
AttachGateway:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
DependOn:
VpcId: !Ref FirstVPC
InternetGatewayId: !Ref InternetGateway
Outputs:
SDI
Software-Defined Infrastructure (SDI) enhances business
responsiveness
SDI
We can quickly and
flexibly respond to
business changes!
Virtualized infrastructure
summary
✓ Need a database right now, but we don't have time to procure one.
Borrow hardware
through the Internet
(cloud).
Many Servers Temporarily borrow
Owned by
another
hardware etc.
What is the Cloud?
Cloud-based infrastructure services are provided as
services by virtualizing infrastructure.
Virtualization software
Physical Server
What is the Cloud?
Cloud-based infrastructure services are provided as
services by virtualizing infrastructure.
Virtualization software
Physical Server
What is the Cloud?
Cloud-based infrastructure services are provided as
services by virtualizing infrastructure.
Network equipment
• Network line
Five basic features of the cloud
The cloud has five basic features, three services, and
Three provision forms.
5 basic characteristics Overview
✓ Users can install, expand, and configure
servers, networks, and storage as
needed without human intervention
Conventional system
Application Application
To rent
(ERP, etc.)
Middleware SaaS
(File system etc.)
OS PaaS Hardware and
(such as Windows) Middleware OS
Hardware To rent
(Server equipment etc.)
IaaS
Application Cloud operator Cloud provider
Procuring all provides
provided by provides hardware Hardware
resources in-house middleware
cloud operator To rent
to develop Purchase
applications In-house ready In-house middleware/OS in-
to use dedicated to house and develop
applications application application
development
A
A A
Owning system X Division Own cloud External cloud
B B
Owning system Y Division
[Form of ownership] [Form of ownership] [Form of ownership]
Owned Owned Owned by another company
【Feature】 【Feature】 【Feature】
Purchase hardware/software and build Build an in-house cloud platform and share Flexible construction/cancellation by jointly using
system in-house hardware and software between business hardware/software with other companies
units and subsidiaries
Advantages: You can freely control the Advantage: Operation management can be
hardware in-house Advantages: Efficiency of own assets. Free delegated to other companies. Flexible system
control compared to public procurement and construction
Disadvantage: It takes much time to
procure and build. Human resources and Disadvantages: Difficulty in cloud operation Disadvantage: Limited scope of in-house control
costs are required for operation management, reducing the benefits of cloud
management
Flexible use of AWS
No need to purchase physical equipment, so it can be
used quickly and flexibly. Hence, pay-as-you-go and pay
only for what you use.
EC2
Unmanaged Managed
Software configuration Software configuration
Backup Backup
Maintenance Maintenance
OS Settings OS Settings
Unmanaged Managed
[Disadvantage] [Disadvantage]
Cumbersome to manage Limited settings.
Summary
EC2
(server)
How AWS works
You can combine your infrastructure and system functions
with AWS to achieve your desired configuration.
ELB
(Load
balancer-)
EC2 EC2
(server) (server)
How AWS works
You can combine your infrastructure and system functions
with AWS to achieve your desired configuration.
ELB
(Load
balancer-)
EC2 EC2
(server) (server)
RDS
(Database)
How AWS works
You can combine your infrastructure and system functions
with AWS to achieve your desired configuration.
VPC
(network)
ELB
(Load
balancer-)
EC2 EC2
(server) (server)
RDS
(Database)
How AWS works
You can combine your infrastructure and system functions
with AWS to achieve your desired configuration.
VPC
(network)
ELB
Route53
(Load
(DNS)
balancer-)
EC2 EC2
(server) (server)
RDS
(Database)
How AWS works
You can combine your infrastructure and system functions
with AWS to achieve your desired configuration.
VPC
(network)
ELB
Route53
(Load
(DNS)
balancer-)
EC2 EC2
(server) (server)
S3 RDS
(Storage) (Database)
How AWS works
The AWS service has unmanaged type and managed type
【merit】 【merit】
Flexible settings Easy to manage
【Demerit】 【Demerit】
Management is troublesome Limited settings
How AWS works
AWS service has unmanaged type and managed type
EC2 RDS
(server) (DB)
Global infrastructure of AWS
There are there locations on AWS: Regions, Availability
Zones (AZ), and Edge
Region AZ
Edge location
(twenty four) (76)
(Above 205)
As of 2020 As of 2020
Region
“Regions” are geographically isolated AWS locations in a
country or region
Region
Japan has two regions, Tokyo and Osaka
Osaka local
Tokyo region
region
Region
Each region has physically independent infrastructure
locations
Osaka local
Tokyo region
region
Region
However, the adjacent regions are connected by a
broadband network.
Osaka local
Tokyo region
region
Region
Available services and prices vary depending on the
region.
Eastern US
Seoul region
(Northern Virginia)
Tokyo region
AZ
AZ AZ
Tokyo region
AZ
AZ AZ
Availability Zone (AZ)
AZ consists of multiple physical data centers
Tokyo region
AZ AZ
Availability Zone (AZ)
Virtualizing physical infrastructure in AZ to provide users
with infrastructure functions through internet.
AZ
EC2 instance
For Mr .A
AZ
AZ AZ
System using
AWS
infrastructure
Availability Zone (AZ)
Therefore, if the AWS service is used only within one AZ,
your service may stop due to the issues with that data
center.
Northern Virginia
AZ
AZ AZ
System using
AWS
infrastructure
Availability Zone (AZ)
The basic AWS architecture is to divide infrustructure into
multiple AZs to create a highly reliable system configuration.
Northern Virginia
【Recommendation】
Start with two AZs in one region
AZ
AZ AZ
System using
AWS
infrastructure
Availability Zone (AZ)
If you use Multi-AZ, the physical durability will be
improved, but it may limit the linkage and sharing
between systems.
Northern Virginia
AZ
AZ AZ
✓ Some settings are shared only within a
single AZ
✓ Many require settings to link between AZs
Region selection
While considering existing laws and internal regulations,
select a geographically close Region to build an AWS
system
Northern Virginia Region Sydney Region
AZ AZ
AZ AZ AZ AZ
Region selection
Consider the possibility of being affected by the law of the
country in which the region is located
AZ
AZ AZ
AZ AZ AZ AZ
Connection between regions
Dedicated line connection and replica creation are
available between regions
✓CloudFront
✓Lambda Edge
Summary
on-premise server
https://aws.amazon.com/jp/s3/pricing/
Pay-as-you-go
The advantage of cloud computing is that you only pay for
what you use.
EC2
You have to buy from $1,000 (USD) Available even for free!
per unit to over a $100,000. Pay-as-you-go billing
https://aws.amazon.com/jp/s3/pricing/
Cost factors
The advantage of cloud computing is that you only pay for
what you use.
https://aws.amazon.com/jp/s3/pricing/
Volume discount
S3 has a volume discounted price range.
https://aws.amazon.com/jp/s3/pricing/
Charged for the time used
Be aware that some services that charge based on the
time you spend using them and charge as soon as you
launch the service!
https://aws.amazon.com/jp/s3/pricing/
Free tier
Some functions are available free of charge for 12 months
using the free usage quota.
https://aws.amazon.com/jp/free/?all-free-tier.sort-
by=item.additionalFields.SortRank&all-free-tier.sort-order=asc
Free tier
This is applied by selecting and using the functions
covered by the free usage quota.
Summary
Increase
Set up MFA authentication, which is recommended to
Authentication increase AWS security, and change the password policy.
security
AWS Account
An account that serves as the root A user that you can create within
user who enters into a direct your AWS account.
contract with AWS.
(called a root account) IAM users are used for the actual
AWS work.
Information required to register
for an AWS account: You share an AWS account for
-Your email address people you will be working with as
-Password IAM users.
-Contact information
(address and mobile number)
-Credit card information
AWS tools
Use the following three types of AWS operation tools
Operation GUI for Windows servers SSH software for Linux server operation
SSH Software
A communication method and software that executes
internal settings of EC2 instance
Basic operation
The first step is to set up instances in the management
console and manage them with SSH software
User
EC2:○
S3:×
Group EC2
Group
EC2:○
S3:○
S3
What is IAM?
IAM is an authentication / authorization tool performing
AWS operation security.
User
EC2:○
S3:×
Group EC2
Group
EC2:○
S3:○
S3
What is IAM?
IAM is an authentication / authorization tool performing
AWS operation security.
User
EC2:○
S3:×
Group EC2
Group
EC2:○
S3:○
S3
Key Topics
Users, groups, policies, and roles are key elements of IAM
Users Groups
Policies Roles
IAM Policy
A configuration document to grant access rights to users
and groups (JSON format document).
A Policy
EC2: ○
S3: X
Group ⇒ IAM Group EC2
B Policy
EC2: ○
S3: ○.
S3
IAM Policy
IAM policy is set in JSON format
"Allow".
Effect "Deny.
personal
EC2: ○
S3: X
Group ⇒ IAM Group EC2
group
EC2: ○
S3: ○.
S3
IAM User
Users on AWS are set up as authorized entities called IAM
users.
• Power users are IAM users with full access to all AWS
Power user
services except IAM admin rights
(IAM user) • No permission to operate the IAM
IAM Group
A unit of authority that is set up collectively as a group. A
group is usually made up of multiple IAM users.
personal
EC2: ○
S3: X
Group ⇒ IAM Group EC2
group
EC2: ○
S3: ○.
S3
IAM Role
You can grant access rights to AWS resources as a role
A Policy
EC2:○
S3: X
Group ⇒ IAM Group EC2
B Policy
EC2:○
S3: ○.
C Policy
S3
IAM Role EC2: x
S3: ○.
AWS EC2
service Beanstalk
Data Pipeline, etc.
Recording user activity
A variety of tools can be used to obtain activity records
Analyze S3 buckets, IAM roles, etc., shared with external
IAM Access
entities to identify unintentional access to resources and
Analyzer data that are security risks
Access Advisor
It displays the date and time when an IAM entity (user,
Service Last
group, role) last accessed an AWS service
Accessed Data
✓ Lock the access keys of the AWS root user and do not use the root
account unnecessarily.
✓ Create individual IAM users and manage them with IAM users.
✓ Use the IAM group to assign permissions to IAM users.
✓ Set only minimum privileges for IAM users and IAM groups.
✓ Instead of creating a new policy, use AWS management policies.
✓ Use a customer management policy, not an inline policy.
✓ Use access levels to verify IAM permissions
✓ Set a strong password policy for your users.
✓ Enable MFA.
✓ Use IAM roles for applications running on Amazon EC2 instances
✓ Use IAM roles to transfer permissions when granting temporary
authentication to a third party
✓ Don't share the access key
✓ Rotate authentication information on a regular basis.
✓ Remove unnecessary credentials.
✓ Monitor the activity of your AWS account.
Summary
Lambda
API call
RDS
Hands-on content
Subnet mask You will learn the knowledge required to configure VPC
and subnet subnetting.
Communication
You will learn about the protocols used to control
Protocol and OSI network communication.
models
Configure network Configure the network ACL settings that control subnet
ACLs communication.
System configuration
Building our Real-world Architecture
Route53
CloudFront
10.0.0.0/16
AZ AZ
EC2 EC2
RDS RDS
Synchronous replication.
Automatic failover.
MySQL DB server
Building our Real-world Architecture
10.0.0.0/16
AZ AZ
10.0.0.0/16
AZ AZ
OS: Linux
EC2 Server: Apache
10.0.0.0/16
AZ AZ
OS: Linux
EC2 Server: Apache
OS: Linux
EC2 Server: MySQL
Building our Real-world Architecture
10.0.0.0/16
AZ AZ
EC2
MySQL DB server
Route53
10.0.0.0/16
AZ AZ
EC2
MySQL DB server
Route53
10.0.0.0/16
AZ AZ
EC2
RDS
MySQL DB server
Building our Real-world Architecture
Route53
S3
10.0.0.0/16
AZ AZ
EC2
RDS
MySQL DB server
Building our Real-world Architecture
Route53
S3
10.0.0.0/16
AZ AZ
EC2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Building our Real-world Architecture
Route53
10.0.0.0/16
AZ AZ
EC2 EC2
RDS RDS
Synchronous replication.
Automatic failover.
MySQL DB server
Building our Real-world Architecture
Route53
10.0.0.0/16
AZ AZ
EC2 EC2
RDS RDS
Synchronous replication.
Automatic failover.
MySQL DB server
Building our Real-world Architecture
Route53
CloudFront
10.0.0.0/16
AZ AZ
EC2 EC2
RDS RDS
Synchronous replication.
Automatic failover.
MySQL DB server
Network basics
Network for communication
The network enables communication between a client and
a server
Network
⑤ The purchase
completion
screen is
④ The server
returned to the
executes the
client as a server
①Access Amzcon.com URL. purchase
response.
process.
How to send a request
How can you send a request using the Internet to the
server?
request
How to send a request
Your request will not arrive without knowing the server
address.
request
How to send a request
The URL is the address to which the request is delivered
https://www.amazon.com/
request
How to receive the response
The destination is the URL, but what is the address for
returning a response to the client (the sender)?
request
response
How to receive the response
An IP address is used as the address to identify the
sender
IP address is used as a
client side address The address is the URL
172.194.63.15 https://www.amazon.com/
request
response
IP address and URL
The IP address identifies the recipient, and the URL
corresponds to an IP address.
https://www.amazon.com/
134.128.24.16
IP address and URL
The address of the server to which the request is sent
originally uses the IP address.
134.128.24.16
IP address and URL
The address of the server to which the request is sent
originally uses an IP address.
134.128.24.16
https://134.128.24.16
IP address and URL
The address of the server to which the request is sent
originally uses an IP address.
https://134.128.24.16
IP address and URL
URL is used as an address by converting IP into a URL so
that you can easily understand and remember it.
134.128.24.16
https://134.128.24.16
https://www.amazon.com/
Delivery order
Think about what happens when a request is split and
sent several times
request
Delivery order
If you write the rules that order it when sending, your
request will be received In the correct order
① ② ③ ④
I Buy three products Buy three I products
request
Delivery order
If rules are set, you can communicate without problems
even if you send data in pieces
① ② ③ ④
I Buy three products
① ② ③ ④
I Buy three products
10.0.0.0/16
AZ AZ
10.0.0.0/16
AZ AZ
Request
Communication using
TCP/IP protocol
IP address
172.16.0.10
IP address
IP addresses are unique 32-bit data that cannot be
duplicated.
NIC
172.16.0.10
IP address
An IP address consists of a binary 32-bit value, but for
ease of reading, it is written in decimal format.
Decimal 172 16 0 10
notation
Decimal 172 16 0 10
notation
IP address in IPv4
format
134.128.24.16
Lack of IP address
by using IPv6, near unlimited amounts of IP addresses
can be used.
IP address in IPv4
format
134.128.24.16
10.0.0.0 ~ 10.255.255.255
172.16.0.0 ~ 172.32.255.255
192.168.0.0 ~ 192.168.255.255
Global and private IP addresses
Global IP addresses can be used worldwide, while private
IP addresses can be used only within a limited area.
10.0.0.0 ~ 10.255.255.255
172.16.0.0 ~ 172.32.255.255
192.168.0.0 ~ 192.168.255.255
Global IP address
Internet world
Private IP address
Global and private IP addresses
The scope of IP addresses is divided into two main areas
Global IP address
Internet world
Private IP address
Internet world
DHCP
server
Private IP address
Global and private IP addresses
The DHCP server assigns an IP address to the local
terminal and allows you to connect to the network.
Global IP address
Internet world
Internet
Global IP Address
134.128.24.16
IP
masquerade
Internet
Global IP Address
134.128.24.16
IP
masquerade
Global IP Address
134.128.24.16
IP
masquerade
[Notation method]
10.0.1.0/16
Network range
The IP address (10.0.1.0) + subnet mask (/16)
determines the IP range. In other words, it determines
the range in which private IP can be used.
Internet
Global IP Address
134.128.24.16
IP
masquerade
[Notation method]
10.0.1.0/16
IP address + subnet mask = IP range
Network range
An IP address range is assigned to the network, which
determines the network range.
AZ
10.0.1.0/16
EC2 EC2
IP address and subnet mask
An IP address is a combination of four 3-digit numbers (0
to 255), each digit represents a set of eight binary values.
[Notation method]
10.0.0.255
8 digits in binary 8 digits in binary 8 digits in binary
00001010 00000000 111111111
IP address and subnet mask
The subnet mask is set after the IP address notation. It is
written with slashes and numbers.
[Notation method]
10.0.0.255/24
CIDR(Classless Inter-Domain Routing)
CIDR is a setting method that adjusts the usage range of
IP addresses handled as the same network by subnet
mask.
【 Notation method 】
196.51.XXX.XXX/16
Subnet
The 16th digit from the left indicates
the fixed network range.
CIDR(Classless Inter-Domain Routing)
The left binary number specified by the subnet is locked
so that it cannot be used, and the others can be used as
IP addresses.
【 Notation method 】
10.0.0.255/8
00001010
⇒Locked!!!
CIDR(Classless Inter-Domain Routing)
The left binary number specified by the subnet is locked
so that it cannot be used, and the others can be used as
IP addresses.
【 Notation method 】
10.0.0.255/16
00001010 00000000
⇒Locked!!! ⇒Locked!!!
CIDR(Classless Inter-Domain Routing)
The left binary number specified by the subnet is locked
so that it cannot be used, and the others can be used as
IP addresses.
【 Notation method 】
10.0.0.255/24
00001010 00000000 00000000
⇒Locked!!! ⇒Locked!!! ⇒Locked!!!
CIDR(Classless Inter-Domain Routing)
You can utilize the remaining numbers that are not locked
by the subnet as valid IP addresses
【 Notation method 】
10.0.0.255/16
00000000 111111111
Network and host sections
The range fixed by the subnet mask is called the network
part, and the available range is called the host part.
10.0.0.0/16
10 0 0 0
10 0 ~ 255 255
Network coverage
The range fixed by the subnet mask is called the network
part, and the available range is called the host part.
10.0.0.0/16
10 0 0 0
10 0 ~ 255 255
Host section
Network coverage
The range fixed by the subnet mask is called the network
part, and the available range is called the host part.
10.0.0.0/16
10 0 0 0
10 0 ~ 255 255
/16
00001010 00000000 ~ 11111111 11111111
【 Minimum value 】
10.0.0.0
【 Maximum value 】
10.0.255.255
CIDR
Set a range of IP addresses that is not too large, but with
room for future expansion
10.0.0.255/16
/18 16384
/20 4096
/22 1025
/24 256
/26 64
/28 16
Grouping by subnet
It is difficult to find a specific terminal if many devices are
connected to the local network
I want to send the data to 10.0.0.234!
Local Network
I'm here!
10.0.0.234
Grouping by subnet
Group address ranges by subnet mask to make them
easier to find.
I want to send the data to 10.0.0.234 !
It is in the 10.0.0 subnet, so
Deliver to the network range of 10.0.0 !
Local Network
I'm here!
Local Network
Blue subnet Green subnet Red subnet
I'm here!
Local Network
Blue subnet Green subnet Red subnet
I'm here!
AZ
Virtual Private Cloud (VPC)
VPC can include resources in multiple AZs within the
same region
AZ①
AZ (2)
Subnets and VPCs
A combination of VPCs and subnets create a network
space. VPC must be set up with at least one subnet.
AZ
subnet
10.0.1.0/24
EC2
VPC Settings (Default VPC)
When you create an AWS account, a default VPC and
default subnet are automatically generated for each region
Setting traffic
Create a VPC Create a Set internet route permissions to
(CIDR setting) subnet Configure the Gateway. your VPC
(Network ACL)
Subnet
A subnet is a network segment divided by a CIDR range
EC2 EC2
EC2 EC2
EC2 EC2
Subnet
The type of subnet is separated by the presence or
absence of routing to the Internet gateway.
EC2 EC2
10.0.0.0/16
AZ AZ
Internet Gateways
10.0.0.0/16
AZ
Public subnet
10.0.0.0/24
Route
table
Private subnet
10.0.1.0/24
Architecture you will build
Internet Gateways
10.0.0.0/16
AZ AZ
Route Route
table table
Private subnet
10.0.1.0/24
Architecture you will build
Internet Gateways
10.0.0.0/16
AZ AZ
Route Route
table table
Internet Gateways
10.0.0.0/16
AZ AZ
Route Route
table table
Internet Gateways
10.0.0.0/16
AZ AZ
Route Route
table table
Private subnet
10.0.1.0/24
Routing Configuration
An Internet gateway is required to connect to the Internet
from a public subnet.
10.0.1.0/16
AZ AZ
Bastion
Server EC2
NAT Gateway
A Bastion server is needed to connect to instances in the
private subnet. A NAT gateway is required for return
traffic to interact with the outside world.
10.0.0.0/16
AZ AZ
Bastion
Server EC2
NAT
gateway
Architecture you will build
Internet Gateways
10.0.0.0/16
AZ AZ
NAT
Route Route
gateway table table
Sending email.
Browsing a
website.
Communication rules
When you were asked to make mail settings, did you ever
set an IP address for POP and SMTP?
✓ Sender/destination address
✓ Data transmission order
✓ Message id
Session layer
Transport layer
Network layer
Physical layer
OSI reference model
Depending on the content of communication, the network
device carries out communication according to the rules
established in each layer.
Application layer
Presentation layer
Session layer
Transport layer
Network layer
Physical layer
OSI reference model
Depending on the content of communication, the network
device carries out communication according to the rules
established in each layer.
Application layer
Presentation layer
Session layer
Transport layer
Network layer
MAC address
Between nodes by Data link layer
Communication
Physical layer
Application layer
Defines the communication method used for communication
services on the Internet, like e-mail.
Transport layer
Network layer
Physical layer
Presentation layer
It defines the character codes and ciphers used when
sending and receiving characters.
Network layer
Physical layer
Session layer
Specifies the continuation method (a session) of a series
of communication processes on the application.
Transport layer
Go to Find a
Network layer Buy
EC site product
Data link layer
Physical layer
Session layer
Specifies the continuation method (a session) of a series
of communication processes on the application.
Physical layer
Network layer
Physical layer
Data link layer
Defines the method of inter-node communication using
MAC address.
Transport layer
Network layer
Physical layer
Physical layer
Defines the physical data transmission format between
computers in “bits”
Transport layer
Network layer
Sync
Preamble PHY header Physical layer data payload FCS
word
Data link layer
Physical layer
The OSI reference model
It is necessary to comply with the protocol and method of
the appropriate layer according to the specific content.
Session layer
TCP
Transport layer
IP
Network layer
Application layer
Session layer
https://www.mercari.com/jp/
Request
Response
Implementation of network communication
Transport layer
Network layer
Physical layer
Implementation of network communication
Application layer
Network layer
Physical layer
Implementation of network communication
Application layer
Transport layer
Physical layer
Implementation of network communication
Application layer
Transport layer
Network layer
Application layer
Transport layer
Network layer
Application layer
Transport layer
Network layer
✓ HTTP communication: 80
✓ HTTPS communication (encryption): 443
✓ LINE: 5000/5552
✓ SSH communication 22
✓ Email communication (SMTP): 25
✓ Email reception (POP): 110, 143
Summary
■Allow Port 22
SSH Access (SSH)
EC2
Network ACL
Access control for subnets by network ACL
Route
Table
10.0.0.0/16
AZ Network ACL AZ
Public Subnet Private subnet
10.0.5.0/24 10.0.10.0/24
Security Group
Security Group
EC2 EC2
WEB Server DB Server
Differences between network ACLs and SGs
Security groups or network ACLs have different
permission settings
MySQL for
Set up MySQL as the database for WORDPRESS.
WORDPRESS Set up
Server basics
What is a server?
A server is a computer device that acts as a server and
runs a specific kind of server software within.
+
server software
Server software
Server software provides server roles and functionality
Server hardware
Server hardware is typically thought of as huge
computers installed in data centers.
Server hardware
Server software can be installed on a PC to allow function
as a server
Server role
The server handles the request and response processing,
and the server executes the application service.
Amazon.com server
request
response
It is necessary to operate for
24 hours!
Server role
There are various servers kinds with different roles.
✓ WEB server
✓ Application server
✓ Batch server
✓ Database server
✓ API server
✓ DNS server
✓ mail server
WEB server
Web server is a server that supports HTTP and displays
WEB pages
WEB application
Server in a web application
This application uses two servers, WEB server and
database server.
WEB application
database
WEB server
server
Server in a web application
Requesting a database operation to this application from a
local terminal.
WEB application
database
WEB server
server
Local terminal
(PC/smartphone etc.)
Server in a web application
DB processing is requested from the WEB server to the
database server.
WEB application
database
WEB server
server
Local terminal
(PC/smartphone etc.)
Server in a web application
The database server executes the transaction process in
response to the request and returns the execution result
to the WEB server.
WEB application
database
WEB server
server
Local terminal
(PC/smartphone etc.)
Server in a web application
The WEB server returns the processing result of the
application including the data processing result to the
local terminal.
WEB application
database
WEB server
server
Local terminal
(PC/smartphone etc.)
Summary
Cloud
(Internet)
EC2 RDS
EC2 Features
A virtual server available on a pay-as-you-go basis (hours
or seconds base) that can be launched in minutes
AZ
AZ AZ
EC2
instance
Select AMI (OS Settings)
You can select the OS setting through AMI
AMI
(Courtesy
of AWS)
AMI
(3rd party)
Save to S3
EC2
Custom Instance
AMI
(your own)
Select AMI (OS Settings)
You can select the OS setting through AMI
Instance type
t2.nano
Instance capacity
Instance Type
Select the instance type according to the case purpose.
Family: A1, M5, T3, etc.
Provides balanced computing, memory, and network resources for a variety of workloads.
General Purpose This instances that are ideal for applications that use the same percentage of an instance's
resources, such as web servers and code repositories.
Storage Optimization This instances are suitable For workloads that require high sequential read and write
access to large data sets in local storage. Storage optimized instances are ideal for low-
latency random I/O operations with tens of thousands of IOPS
High speed computing High-speed computing instances are ideal for software that uses hardware accelerators
(co-processors) to perform functions such as floating-point computation, graphics
processing, and data pattern matching on the CPU.
Storage choices
There are two types of storage used directly in EC2:
indivisible instance stores and self-configured EBS
10.0.0.0/16
AZ AZ
EC2
EC2
MySQL DB server
Architecture you will build
10.0.0.0/16
AZ AZ
OS: Linux
EC2
Key pair
EC2 instance authentication
This authentication method uses a basic encryption
method called public key authentication.
Key pair
EC2 instance authentication
This authentication method uses a basic encryption
method called public key authentication.
Key pair
A
How Public key authentication works
Give Mr. B the public key and the private file will be locked
Secret file
A B
How Public key authentication works
Only Mr. A has the private key, so he can open this private
file.
Secret file
A B
How Public key authentication works
Even if the public key is released to multiple people, only
Mr. A has the private key, so it can be used many times
for encryption.
Secret file
Secret file
B
A
Secret file
D
EC2 instance authentication
When a public key set is created in the EC2 instance, the
PEM key, (your private key), is necessary to specify and
authenticate that it is yours.
EC2 management method
Similarly, one PEM key can be used as a key for multiple
EC2 instances.
Summary
SSH SSH
Software Server
SSH connection
Implement a secure connection to the EC2 instance using
the SSH protocol.
SSH SSH
Software Server
10.0.0.0/16
AZ AZ
OS: Linux
EC2 Server: Apache
10.0.0.0/16
AZ AZ
OS: Linux
EC2 Server: Apache
OS: Linux
EC2 Server: MySQL
Access from a web server
Access an EC2 instance in a private subnet from a web
server.
10.0.0.0/16
AZ AZ
WEB EC2
Server
Installing NAT gateways
A bastion server is required to connect to instances in the
private subnet. Need a NAT gateway for traffic to the
Internet (e.g. software updates)
10.0.0.0/16
AZ AZ
WEB EC2
Server
NAT
gateway
Hands-on content
AZ AZ AZ
Public subnet Public subnet Public subnet
10.0.0.0/24 10.0.0.0/24 10.0.0.0/24
Apache WEB Server Apache WEB Server Apache WEB Server
EC2 RDS
AZ AZ AZ
Public subnet Public subnet Public subnet
10.0.0.0/24 10.0.0.0/24 10.0.0.0/24
Apache WEB Server Apache WEB Server Apache WEB Server
EC2 RDS
two-tier architecture
Architecture Patterns
Installing WORDPRESS has the following three typical
configuration patterns
AZ AZ AZ
Public subnet Public subnet Public subnet
10.0.0.0/24 10.0.0.0/24 10.0.0.0/24
Apache WEB Server Apache WEB Server Apache WEB Server
EC2 RDS
Unmanaged Managed
Managed by AWS
There are two types of AWS services: unmanaged and
managed.
Unmanaged Managed
Backup Backup
Maintenance Maintenance
OS Settings OS Settings
EC2 RDS
AZ AZ AZ
Public subnet Public subnet Public subnet
10.0.0.0/24 10.0.0.0/24 10.0.0.0/24
Apache WEB Server Apache WEB Server Apache WEB Server
EC2 RDS
AZ
Public subnet • Display WORDPRESS as a
Apache
10.0.0.0/24 web site.
Apache WEB Server
• Programming Language for
EC2 php
operating WORDPRESS
MySQL
• To operate MySQL database
Installation
Private subnet
10.0.1.0/24
• Programming Language for
php
operating WORDPRESS
EC2
MySQL DB • Create a database for
MySQL server in EC2
creation WORDPRESS
Installing Software
The software required for WORDPRESS configuration is as
follows
• Display WORDPRESS as a
Apache
web site.
AZ
Public subnet • Programming Language for
10.0.0.0/24 php
operating WORDPRESS
Apache WEB Server
MySQL
EC2 • To operate MySQL database
Installation
Private subnet
10.0.1.0/24
RDS
MySQL in RDS
Installing Software
The software required for WORDPRESS configuration is as
follows
AZ
Public subnet • Display WORDPRESS as a
Apache
10.0.0.0/24 web site.
Apache WEB Server
• Programming Language for
EC2 php
operating WORDPRESS
MySQL
• To operate MySQL database
Installation
AZ
Public subnet • Display WORDPRESS as a
Apache
10.0.0.0/24 web site.
Apache WEB Server
• Programming Language for
EC2 php
operating WORDPRESS
MySQL
• To operate MySQL database
Installation
cat /var/log/mysqld.log | grep • Get the initial password for logging in from the local
localhost host of the installed MySQL.
create database udemy; • Create a database called Udemy in the MySQL server.
grant all privileges on udemy.* • Grant the newly created user "udemy" all
to udemy@localhost; permissions to use the udemy database.
AZ
Public subnet • Display WORDPRESS as a
Apache
10.0.0.0/24 web site.
Apache WEB Server
• Programming Language for
EC2 php
operating WORDPRESS
MySQL
• To operate MySQL database
Installation
wget
https://wordpress.org/latest.tar • Download the WORDPRESS file.
.gz
tar -xzvf latest.tar.gz • Unzip the WORDPRESS file that you downloaded.
https://134.128.24.16 https://www.mercari.com/jp/
IP address and URL
Domain Name System server manages and translates the
correspondence between URL and IP addresses
https://134.128.24.16 https://www.mercari.com/jp/
Amazon.com server
request
response
IP address and URL
When sending a request, the client terminal confirms the
location of the URL and the IP address within a DNS
server which identifies the destination address.
https://www.amazon.com
https://www.amazon.com
IP address is 134.128.24.16
DNS server
https://134.128.24.16
URL and Domain
One of the elements that make up a URL is a domain
https://www.Amazon.co.jp /blog/index
Domain
URL and Domain
The domain is a set of strings that makes the IP address
easy to understand, and it is specified in a hierarchical
structure.
Second level
domain
https://www.Amazon.co.jp /blog/index
https://www.Amazon.co.jp /blog/index
https://www.Amazon.co.jp /blog/index
https://www.Amazon.co.jp /blog/index
https://www.Amazon.co.jp /blog/index
https://www.Amazon.co.jp /blog/index
root
jp com
co ne facebook
Amazon google
jp com
co ne facebook
Amazon google
jp com
co ne facebook
Amazon google
jp com
Where is “Amazon”?
co ne facebook
Amazon google
ISP
Domain
DNS server
Registration
Network of ISPs around the world
ISPs around the world provide Internet access and
connect the networks through DNS.
ISP ISP
ISP ISP
Hands-on content
root
jp com
co ne facebook
yahoo google
The
mail maps
World
The Role of DNS
The DNS is responsible for translating domain names into
IP addresses, and is composed of name servers and
resolvers.
Amazon.
name-server
Amazon.
WEB Server
DNS Name Resolution
The resolver will query the IP address associated with the
domain to the name server.
Domain Name System Route
(Resolver) name-server
(1) What is the IP address of (2) What is the IP address of
www.amazon.com? www.amazon.com?
Amazon.
name-server
Amazon.
WEB Server
DNS Name Resolution
The resolver will query the IP address associated with the
domain to the name server.
Domain Name System Route
(Resolver) name-server
(1) What is the IP address of (2) What is the IP address of
www.amazon.com? www.amazon.com?
Amazon.
name-server
Amazon.
WEB Server
DNS Name Resolution
The resolver will query the IP address associated with the
domain to the name server.
Domain Name System Route
(Resolver) name-server
(1) What is the IP address of (2) What is the IP address of
www.amazon.com? www.amazon.com?
Amazon.
name-server
Amazon.
WEB Server
DNS Name Resolution
The resolver will query the IP address associated with the
domain to the name server.
Domain Name System Route
(Resolver) name-server
(1) What is the IP address of (2) What is the IP address of
www.amazon.com? www.amazon.com?
Amazon.
name-server
Amazon.
WEB Server
DNS Name Resolution
The resolver will query the IP address associated with the
domain to the name server.
Domain Name System Route
(Resolver) name-server
(1) What is the IP address of (2) What is the IP address of
www.amazon.com? www.amazon.com?
Amazon.
(6) What is the IP address name-server
of www.amazon.com?
Amazon.
WEB Server
DNS Name Resolution
The resolver will query the IP address associated with the
domain to the name server.
Domain Name System Route
(Resolver) name-server
(1) What is the IP address of (2) What is the IP address of
www.amazon.com? www.amazon.com?
Amazon.
(6) What is the IP address name-server
of www.amazon.com?
(7) It is 168.209.56.10.
Amazon.
WEB Server
DNS Name Resolution
The resolver will query the IP address associated with the
domain to the name server.
Domain Name System Route
(Resolver) name-server
(1) What is the IP address of (2) What is the IP address of
www.amazon.com? www.amazon.com?
Amazon.
(6) What is the IP address name-server
of www.amazon.com?
(7) It is 168.209.56.10.
Amazon.
WEB Server
DNS Name Resolution
The resolver will query the IP address associated with the
domain to the name server.
Domain Name System Route
(Resolver) name-server
(1) What is the IP address of (2) What is the IP address of
www.amazon.com? www.amazon.com?
Amazon.
(6) What is the IP address name-server
of www.amazon.com?
(7) It is 168.209.56.10.
Amazon.
WEB Server
DNS Name Resolution
The resolver will query the IP address associated with the
domain to the name server.
Domain Name System Route
(Resolver) name-server
(1) What is the IP address of (2) What is the IP address of
www.amazon.com? www.amazon.com?
Amazon.
(6) What is the IP address name-server
of www.amazon.com?
(7) It is 168.209.56.10.
Amazon.
WEB Server
Summary
DNS
https://www.yahoo.co.jp/ https://196.10.0.1
What is Route 53?
DNS is a mechanism for converting a easy-to-use URL to
an IP address for the system on the Internet
DNS
https://www.yahoo.co.jp/ https://196.10.0.1
What is Route 53?
Route53 is an authoritative DNS server provided by AWS,
called Route53 because it works on port 53
DNS
https://www.yahoo.co.jp/ https://196.10.0.1
Route 53
What is Route 53?
Check the DNS records, a table that links IP addresses to
URLs, and route them.
DNS
https://www.yahoo.co.jp/ https://196.10.0.1
Create the
Set up a
same host Create a Set Routing
domain on
zone as the record Policy
Route 53
domain name
Host zone
A container that holds information about how to route
traffic for a domain (example.com) and its subdomain
(sub.example.com).
Amazon.
(6) What is the IP address name-server
of www.amazon.com?
(7) It is 168.209.56.10.
Amazon.
WEB Server
Hands-on content
Design a performance-rich
architecture. Operational Excellence
Single AZ (single instance) configuration
The single instance configuration has very low availability,
which opposes the principle of reliability.
One region
AZ AZ
Subnet Subnet
10.0.0.0/24 10.0.2.0/24
EC2
Multi-AZ configuration
Designing an architecture with two AZs in one region
improves reliability (especially availability)
One region
AZ AZ
Subnet Subnet
10.0.0.0/24 10.0.2.0/24
EC2 EC2
Multi-AZ configuration
Configure Auto Scaling to further improve availability.
One region
AZ AZ
Subnet Subnet
10.0.0.0/24 10.0.2.0/24
Auto
Scaling
EC2 EC2
Multi-AZ configuration
Separate data layers to make it easier to implement
redundant configurations.
One region
AZ AZ
Subnet Subnet
10.0.0.0/24 10.0.2.0/24
Auto
Scaling
EC2 EC2
DB DB
Multi-AZ configuration
Use a private subnet to improve security.
One region
AZ AZ
public subnet public subnet
10.0.0.0/24 10.0.2.0/24
Auto
Scaling
EC2 EC2
private subnet
private subnet
10.0.3.0/24
10.0.1.0/24
DB DB
Improving delivery performance
Image files are placed in S3 to improve availability and
performance.
One region
S3
AZ AZ
public subnet public subnet
10.0.0.0/24 10.0.2.0/24
Auto
Scaling
EC2 EC2
private subnet
private subnet
10.0.3.0/24
10.0.1.0/24
DB DB
Improving delivery performance
CloudFront can improve contents delivery performance
One region
CloudFront
S3
AZ AZ
public subnet public subnet
10.0.0.0/24 10.0.2.0/24
Auto
Scaling
EC2 EC2
private subnet
private subnet
10.0.3.0/24
10.0.1.0/24
DB DB
Summary
Storage Database
Conduct a COMMIT.
Name data: Update Brian to Mark. Name data: Update Brian to Mark.
Roll Name data
back to Brian
Mr A Mr B
Updating the department Viewing the department
name of Noah name of Noah
Sales -> development
Consistency model
There are models such as “eventual consistency model”,
“strong consistency model”, for maintaining the data
integrity when multiple people access at the same time.
Mr A Mr B
Updating the department Viewing the department
name of Noah name of Noah
Sales -> development
With eventual consistency model, Mr.
B will see the old data (sales) while the
data being changed is not completed.
Consistency model
There are models such as “eventual consistency model”,
“strong consistency model”, for maintaining the data
integrity when multiple people access at the same time.
Mr A Mr B
Updating the department Viewing the department
name of Noah name of Noah
Sales -> development
With strong consistency model, Mr. B cannot refer to
the data until the change is completed while the data
being changed is not completed.
Data models
A data model is a logical representation of data that
determines how data is stored and processed in the
database.
Data model
Data models
There are various data models in the database, and you
need to use different models according to the purpose of
use.
Relational model
Graph model
Key value store
object
document
Wide column
Hierarchical
Summary
Salary table
Relational database (RDB)
A table is represented by rows and columns, and data is
identified by specifying rows and columns.
Column
Row
Relational database (RDB)
RDB is called a row-oriented database because it adds or
updates data in row units.
How RDB works
The mechanism of the RDB consists of a table, a database
engine, and SQL.
Disk
Database
Engine
Software
Database engine type
There are various database engines in RDB. The following
six database engines can be used with AWS RDS.
Oracle Database
SQL Server
DB2
MySQL
MariaDB
PostgreSQL
Summary
Database server
+ Database engine
Artdata database
Users table
ID name age
1 Takahashi 33
RDS
RDS is a fully managed relational database compatible with
various database software.
- MySQL
- ORACLE
- Microsoft SQL Server
- PostgreSQL
- MariaDB
- Amazon Aurora
AWS database construction
There are two ways to build a database on AWS:
- Install database software on EC2
- Use a dedicated DB service.
EC2 RDS
DB DB
AWS database construction
There are two ways to build a database on AWS:
- Install database software on EC2
- Use a dedicated DB service.
EC2 RDS
DB DB
EC2 RDS
DB DB
limitations of RDS
AZ Synchronous replication
AZ
Automatic failover
RDS RDS
master slave
Characteristics of RDS
Up to 5 read replicas (15 for Aurora) can be installed and
DB read processing can be scaled out.
AZ Synchronous replication
AZ
Automatic failover
RDS RDS
master slave
Asynchronous replication
AZ AZ
(Data center) ( Data center )
Synchronous replication
Automatic failover
RDS RDS
Master Slave
AZ AZ
(Data center) ( Data center )
Synchronous replication
Automatic failover
RDS RDS
Master Slave
Read
replica
Characteristics of RDS
Automatically acquires snapshots, and then stores and
manages them to ensure fault tolerance
AZ Synchronous replication
AZ
Automatic failover
RDS RDS
master slave
Asynchronous replication
AZ AZ AZ
Public subnet Public subnet Public subnet
10.0.0.0/24 10.0.0.0/24 10.0.0.0/24
Apache WEB Server Apache WEB Server Apache WEB Server
MySQL server
EC2 RDS
Unmanaged Managed
Architecture Patterns
Change from an EC2 instance-only architecture to a two-
tier architecture with RDS
AZ AZ
Public subnet Public subnet
10.0.0.0/24 10.0.0.0/24
Apache WEB Server Apache WEB Server
EC2 EC2
MySQL server
Private subnet
10.0.1.0/24
RDS
MySQL in RDS
Unmanaged Managed
Managed by AWS
There are two types of AWS services: unmanaged and
managed.
Unmanaged Managed
backup backup
Maintenance Maintenance
OS Settings OS Settings
EC2 RDS
SSH access
Allow port 22
(SSH)
EC2
instance
For a single-tier architecture
Since the web server and DB server are configured on the
same EC2 instance, the security group is not applied.
AZ
Public subnet
10.0.0.0/24
Apache WEB Server
EC2 EC2
MySQL Server
For a two-tier architecture
In the case of two-tier architecture, security groups are
applied to control traffic between instances.
AZ AZ
Public subnet Public subnet
10.0.0.0/24 10.0.0.0/24
Apache WEB Server Apache WEB Server
EC2 EC2
Private subnet
10.0.1.0/24
security
Group
RDS
MySQL in RDS
For a two-tier architecture
Increase security by limiting access to RDS only from the
web server
AZ
Public subnet
10.0.0.0/24
Apache WEB Server
EC2 EC2
security
Group
Private subnet
10.0.1.0/24
security
Group
RDS
MySQL in RDS
For a two-tier architecture
Increase security by limiting access to RDS only from the
web server
AZ
Public subnet
10.0.0.0/24
Apache WEB Server
EC2 EC2
security
Group
Private subnet
10.0.1.0/24
security
Group
RDS
MySQL in RDS
Installing NAT gateways
A Bastion server is required to connect to instances in the
private subnet. We needed a NAT gateway for traffic to
the Internet
10.0.0.0/16
AZ AZ
WEB
WEB EC2
Server
NAT
gateway
Installing NAT gateways
RDS software configuration and other services are
provided on a managed basis, and so NAT gateways are
not required.
10.0.0.0/16
AZ AZ
WEB
RDS
WEB
Server
Setting RDS to
WordPress
Architecture Patterns
Change from an EC2 instance-only architecture to a two-
tier architecture using RDS
AZ AZ
Public subnet Public subnet
10.0.0.0/24 10.0.0.0/24
Apache WEB Server Apache WEB Server
EC2 EC2
MySQL Server
Private subnet
10.0.1.0/24
RDS
MySQL in RDS
Unmanaged Managed
WORDPRESS Settings
When you register a database in the WORDPRESS
configuration screen, a wp-config.php file is created.
WORDPRESS Settings
Change the database destination by deleting the existing
wp-config.php file and setting it up again.
create database udemy; • Create a database called Udemy in the MySQL server.
grant all privileges on udemy.* • Grant the newly created user "udemy" all
to udemy@'%'; permissions to use the udemy database.
Route53
10.0.0.0/16
AZ AZ
EC2
RDS
MySQL DB server
Architecture you will build
Route53
S3
10.0.0.0/16
AZ AZ
EC2
RDS
MySQL DB server
S3 Basics
What is S3?
S3 is a very durable and highly available storage solution
for medium-long term data storage.
②
①
What is S3?
S3 is a very durable and highly available storage solution
for medium-long term data storage.
③
④
S3 use cases
Image data for content delivery are stored in S3 and
distributed using CloudFront.
Client S3
Images
CMS
S3 Storage Features
AWS offers three forms of storage services
Key
The name of an object, and the objects in the bucket to be uniquely
identified
Value
It is the data itself, consisting of byte values
Version ID
ID for version control
Metadata
Information about the attributes associated with the object
Sub-resources
Provides support for storing and managing bucket configuration
information Example: access control list (ACL)
S3 Storage Features
S3 divides storage space into bucket units and stores data
in objects
S3
Bucket Bucket
(contents-buckets) (website-buckets)
Bucket
Bucket is the space in which the object is stored. The name should be global
and unique as it will be located in the region. The data storage capacity is
unlimited and the storage capacity is automatically expanded.
Object.
This is a file format that is stored in S3 and has a URL assigned to the object.
The number of objects that can be stored in the bucket is unlimited.
Route53
S3
10.0.0.0/16
AZ AZ
EC2
RDS
MySQL DB server
Hands-on content
Route53
S3
10.0.0.0/16
AZ AZ
RDS
MySQL DB server
Hands-on content
yum install php-xml -y • Install the libraries necessary to use Offload media.
yum install php-gd -y • Install the libraries required to upload images to S3.
yum install php-devel.x86_64 • Install the libraries required to upload images to S3.
Section Contents
lecture What you will learn in the lecture
Route53
S3
10.0.0.0/16
AZ AZ
EC2
RDS
MySQL DB server
Architecture you will build
Route53
S3
10.0.0.0/16
AZ AZ
EC2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Architecture you will build
Route53
10.0.0.0/16
AZ ELB AZ
EC2 EC2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Architecture you will build
Route53
10.0.0.0/16
AZ ELB AZ
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
DB layer redundancy
Route53
S3
10.0.0.0/16
AZ AZ
EC2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
ELB Basics
What is ELB?
ELB is a service that provides a load balancer that enables
processing by multiple EC2 instances
Distribute traffic to
multiple instances
ELB
EC2 EC2
What is ELB?
You can also check the health of your EC2 instances and
use only normal instances.
Distribute traffic to
multiple instances
EC2 EC2
ELB Features
ELB promotes Scalability through load balancing and high
availability through health checks
ELB ELB
Route53
S3
10.0.0.0/16
AZ AZ
EC2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Architecture you will build
Route53
S3
10.0.0.0/16
AZ AZ
EC2 AMI
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Architecture you will build
Route53
S3
10.0.0.0/16
AZ AZ
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Architecture you will build
Route53
S3
10.0.0.0/16
AZ AZ
EC2 EC2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Architecture you will build
Route53
10.0.0.0/16
AZ ELB AZ
EC2 EC2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Auto-Scaling Basics
What is Auto Scaling?
The ability to add new instances to improve performance
when access to the instance has increased
ELB
EC2 EC2
What is Auto Scaling?
The ability to add new instances to improve performance
when access to the instance has increased
ELB
[Expansion] [Expansion]
Scale-up: adding or increasing Scale-out: Increase the number of
memory and CPU devices/servers to be processed
[Reduction] [Reduction]
Scale-down: Reduce memory and Scale-in: Reduce the number of
CPU and lower performance devices/servers to be processed
The Auto-Scaling configuration process
Auto Scaling configuration requires advance preparation
of the ELB and startup template
(1) Creating an
ELB target group.
Auto Scaling
AZ AZ
Subnet Subnet
10.0.1.0/24 10.0.2.0/24
ELB
Perform dynamic
Set up a Scheduled scaling when the
Scaling schedule is exceeded.
Health check
Use either EC2 status information or ELB health checks to
check the health of EC2 under Auto-Scaling
ELB CloudWatch
Auto-Scaling Auto-Scaling
Summary
10.0.0.0/16
AZ ELB AZ
EC2 EC2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Architecture you will build
Route53
10.0.0.0/16
AZ ELB AZ
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Hands-on content
ACM Certificates
Use ACM to issue SSL/TLS certificates.
setting
10.0.0.0/16
AZ ELB AZ
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Architecture you will build
Route53
CloudFront
10.0.0.0/16
AZ ELB AZ
EC EC
2 2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Architecture you will build
Route53
CloudFront
HTTPS
ACM Certificate
10.0.0.0/16
AZ ELB AZ
EC EC
2 2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Alternative architectural configurations
CloudFront Route53
S3
10.0.0.0/16
AZ ELB AZ
EC EC
2 2
RDS RDS
Synchronous
replication
Automatic failover
Alternative architectural configurations
Internet
HTTPS Route53
S3 CloudFront
10.0.0.0/16 HTTPS
AZ ELB AZ
EC EC
2 2
RDS RDS
Synchronous
replication
Automatic failover
Alternative architectural configurations
Internet
HTTPS Route53
S3 CloudFront
10.0.0.0/16 HTTPS
AZ ELB AZ
RDS RDS
Synchronous
replication
Automatic failover
ACM Certificate settings
AWS Certificate Manager
ACM provides provisioning, management, and
deployment of Secure Sockets Layer/Transport Layer
Security (SSL/TLS) certificates.
https://aws.amazon.com/jp/blogs/security/how-to-help-achieve-mobile-app-transport-
security-compliance-by-using-amazon-cloudfront-and-aws-certificate-manager/
Architecture you will build
Route53
CloudFront
HTTPS
ACM Certificate
10.0.0.0/16
AZ ELB AZ
EC EC
2 2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
CloudFront Basics
What is CloudFront?
CloudFront is a CND service that uses global locations to
efficiently deliver content
CloudFront
EC2
content
server
See: https://aws.amazon.com/jp/cloudfront/features/?nc=sn&loc=2
What is CloudFront?
CloudFront is a CDN (Content Delivery Network) service
provided by AWS
CloudFront
What is CloudFront?
CDN is a service to speed up the process of web content
delivery
America Asia Europe
EC2
Web server
What is CloudFront?
CDN is a service to speed up the process of web content
delivery
America Asia Europe
EC2
Web server
Cache Speeding up
delivery on edge
Cloud Cloud Cloud servers
Front Front Front
CloudFront features
Large-scale accesses to edge locations around the world
allow for the efficient and rapid delivery of content.
Origin
S3 Bucket
(Static Web Hosting)
origin server
CloudFront configuration
Configuration with an EC2 instance of the web application
as the origin server is also a common configuration.
Web application
EC2
Origin Server
Set the Cache Retention Period
After deciding what to cache, it is important to predict the
frequency of cache usage and set the cache retention
period.
Cache Analyze content usage data and set target URLs for the
Target Setting caching of static and dynamic content.
CloudFront
HTTPS
ACM Certificate
10.0.0.0/16
AZ ELB AZ
EC EC
2 2
RDS RDS
Synchronous
replication
MySQL DB server Automatic failover
Hands-on content
AWS Cost
Identify services related to AWS cost
Management
management.
Services
backup backup
Maintenance Maintenance
OS Settings OS Settings
EC2 RDS
AWS Infrastructure
Hardware (esp.
Software Network
computer)
AWS
Network
Migration and
Computing Relocation
(Server)
Office
Database Storage
Network
Security
CloudWatch
A monitoring service for AWS resources and applications
running on AWS monitoring a variety of logs and metrics.
Record components
at a certain point in
A record of changes Record the changing time
when a resource is components of each
created / modified / resource over a Snapshots are
deleted. custom period. created on a regular
basis or triggered by
SNS notifications can History is stored in changes.
be set to alert users S3 bucket
Snapshots are stored
in S3 buckets.
AWS Service Catalog
A support service that creates and manages a catalog of
approved AWS services
For IT operations
For General Users
Administrators
AWS Artifact
AWS Artifact Reports
Agreements
Centralized Trouble
Monitoring
management shooting
Confirmation of
Log analysis Automatic action
operational status
CloudWatch
A monitoring service for AWS resources and applications
running on AWS that can monitor a variety of logs and
metrics.
Stored data
Communication encryption
encryption
CloudHSM
Security threat detection
Increase security by continuously monitoring
https://aws.amazon.com/jp/blogs/news/identify-unintended-resource-access-with-aws-identity-and-access-management-iam-access-
analyzer/
AWS GuardDuty
A service that uses machine learning to automatically
detect security threats to AWS infrastructure and apps
Threat
assessment
VPC Flow
Logs
High
Malicious access
DNS Logs
Medium
Low
CloudTrail
Amazon Inspector
Hosted diagnostic service that checks Amazon EC2 and
diagnoses platform vulnerabilities
- Network Reachability
- CIS (Center for Internet Security)
- Security best practices
- CVE (Common Vulnerabilities & Exposures)
Edge Location
Automatic
DDoS Attack Protection
System
AWS Shield
By using AWS Shield Advanced, it is possible to carry out
strong defense from large-scale attacks in cooperation
with WAF.
Standard Advanced
Region
WEB
Unauthorized access
WAF application
(EC2)
Summary
See: https://calculator.aws/#/
CloudWatch Billing Alarms
CloudWatch's billing feature allows you to set alarms on
billing amounts
AWS Budgets
Custom budgets can be set up and fine-tuned to set
alarms for when costs or usage exceed the budgeted
amount or budgeted amount.
https://aws.amazon.com/jp/aws-cost-management/aws-budgets/
Cost Explorer
Visualize changes in AWS costs and usage over time and
create custom reports to analyze cost and usage data.
AWS Cost and Usage Report
Provides the most comprehensive data on AWS costs and
usage
https://aws.amazon.com/jp/aws-cost-management/aws-cost-and-usage-reporting/
AWS Cost Categories
The ability to categorize costs by your own organization
and project structure
AWS Trusted Advisor
Services that provide advice on cost optimization and
security and improving performance vs.
Summary
Customer
Supported for All plans
Services
Set up a small team of several people. Build a web application using the
basic configuration.
Migrate to AWS
When migrating to AWS from on-premise, it is important
to consider AWS from the perspective of the overall
business and system operation system.
◼ Add AWS experts to the IT team and help your IT personnel learn AWS.
◼ Cost: Calculation and comparison of the cost of AWS with other options
operate AWS.
AWS implementation support
You need to carefully develop a migration plan
Suppor
t
TCO Calculator
TCO Calculator lets you to compare the costs of using
AWS and on-premises environments, etc. . You can now
estimate the cost savings.
See: https://aws.amazon.com/jp/tco-calculator/
AWS Application Discovery Service
A service that provides information necessary for migration,
such as server usage data and dependency mapping
AWS Cloud
CloudFront Route53
Availability Zone Availability Zone
VPC
Public subnet Public subnet
ELB
S3
NAT gateway
Synchronous
replication
Automatic failover
E-Commerce site design (v.2)
AWS Cloud
CloudFront Route53
Availability Zone Availability Zone
VPC
Public subnet Public subnet
ELB
S3
NAT gateway
Synchronous
replication
ElastiCache Automatic failover ElastiCache
(Replica)
Business Application Design
AWS Cloud
AWS Direct Connect
VPC
Private subnet ELB Private subnet
NAT gateway
Synchronous
replication
Master RDS Automatic failover Slave RDS
Serverless Design
AWS Cloud
Image files
S3 AWS Lambda Amazon DynamoDB
IoT Design
AWS Cloud
Reference: https://snapdish.co/
SnapDish
AWS Cloud
CloudFront Route53
Availability Zone Availability Zone
VPC
Public subnet Public subnet
ELB
S3
replication
ElastiCache
ElastiCache
Amazon backup (Replica)
CloudSearch
MongoDB Hidden
Hybrid Cloud
Cloud usage
The use of cloud computing has become commonplace, and
most companies are planning to use multi-cloud computing.
on-premise on-premise
Advantages of Hybrid Cloud
Take advantage of the benefits of the cloud while still using
existing IT assets. Also, enjoy the benefits of multiple clouds
at the same time.
while gaining the agility and availability of the cloud in key areas
Direct Connect
AWS VPN
AWS Storage Gateway
AWS Directory Service
on-premise
Hybrid Cloud in AWS
AWS Outposts can be used to deploy AWS services such as
RDS and EC2 instances to on-premises environments.
AWS Outposts
on-premise
Hybrid Cloud in AWS
On-premise environments and virtual servers can be easily
deployed and migrated to AWS
on-premise
AWS Hybrid Cloud
AWS's main usage is a hybrid cloud with on-premise
environments
on-premise on-premise
Utilize cloud-to-cloud collaboration services
Hybrid cloud combing cloud platforms requires the use of a
third party hybrid tool
Reference: https://www.topgate.co.jp/google-cloud-day-1-anthos
Promote DX by AWS
Response to Technology Evolution
Flexible and rapid service development is required to
respond to modern technology and business evolution
Response to Response to
Technology evolution diverse customer needs
① The speed of technological ① Diversified customer needs
evolution is fast
Experience
“I tried to get a cab in San Francisco, but I
couldn't find one.”
Issues found
“Wouldn't it be convenient if we could arrange
for a cab to be closest to the customer when
they need it?”
723.
UBER Case Study (2/2)
Use GPS data from smartphones and cab driving data to
optimize vehicle dispatch through machine learning.
724-
Design Thinking
In design thinking, a problem is discovered by observing
the user, and the idea is created through a repeating
prototype-test cycle.
Discover insights Breakdown and Create many Prototype the Trial with users, get
from observations, investigate the solutions and get main ideas. feedback, and keep
interviews, and insights to narrow creative with the improving
experiences down to core issues ideas.
- 725 -
Lean Startup
Build a business model from ideas, verify MVP, and repeat.
Learn to refine the business model
idea
Learning Building
Data Products
Testing
Lean Startup
Build a business model by creating a lean campus and
brushing it up each time.
Fixed and variable costs of business, Revenue model, customer lifetime value, etc.
customer acquisition costs such as marketing
and sales, etc.
Agile type Development
Agile development (especially Scrum) enables flexible
acceptance of customer requirements and rapid development
Waterfall Agile
A method in which all requirements are Development method to grow the system
first determined and then the phases are little by little, repeating the iteration for
completed in stages of development about 3 to 4 weeks
Iteration 1
Release
Iteration 2
Release
Iteration 3
Release
DevOps
DevOps is an organizational structure and process that
links Development and Operation.
Traditional development and operation DevOps
Development and operation are in different Share human resources and culture with
teams, with different working culture and development and operations teams, and
way of working. This leads to many use modern tools to facilitate this
conflicts and issues
Operation
Coding
I want to add I want to Dev Release Ops
functions continue stable
immediately! operation!
Test Monitoring
Shared Shared
Culture Tools and Info
Inevitable conflict
Customer-centered Thinking
Utilize design thinking, lean startup, agile
development/DevOps for customer-driven innovation