AcademyCloudFoundations Module 08
AcademyCloudFoundations Module 08
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Module overview
Topics Lab
• Amazon Relational Database • Lab 5: Build Your DB Server and
Service (Amazon RDS) Interact with Your DB Using an
• Amazon DynamoDB App
Demos
• Amazon RDS console
• Amazon DynamoDB console
Knowledge check
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2
Module objectives
After completing this module, you should be able to:
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 3
Section 1: Amazon Relational
Database Service
Module 8: Databases
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserve
Amazon Relational Database Service
Amazon Relational
Database Service
(Amazon RDS)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 5
Unmanaged versus managed services
Unmanaged Managed:
:
Scaling, fault tolerance, Scaling, fault tolerance,
and availability are and availability are
managed by you. typically built into the
service.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 6
Challenges of relational databases
• Server maintenance and energy footprint
• Software installation and patches
• Database backups and high availability
• Limits on scalability
• Data security
• Operating system (OS) installation and patches
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 7
Amazon RDS
AWS Cloud
Users Application
Servers Amazon RDS
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 8
From on-premises databases to Amazon RDS
Database in Amazon
Database in Amazon
On-premises Elastic Compute Cloud
RDS or Amazon Aurora
database (Amazon EC2)
AWS manages:
• OS installation and patches
• Database software installation and patches
• Database backups
• High availability
• Scaling Amazon RDS
• Power and racking and stacking servers
• Server maintenance
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 10
Amazon RDS DB instances
Amazon
=
RDS MySQL
M • Network performance
PostgreSQL
Amazon RDS DB DB Instance Storage
main instance • Magnetic MariaDB
• General Purpose (solid state drive, or SSD)
• Provisioned IOPS Oracle
DB engines
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 11
Amazon RDS in a virtual private cloud (VPC)
AWS Cloud
Availability Zone
VPC
Public subnet
Internet
Users gateway Amazon EC2
Private subnet
Amazon RDS
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 12
High availability with Multi-AZ deployment (1 of 2)
AWS Cloud
Availability Zone 1 Availability Zone 2
VPC
Public subnet
M Synchronous S
Amazon RDS
RDS Standby
instance
instance
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 13
High availability with Multi-AZ deployment (2 of 2)
AWS Cloud
Availability Zone 1 Availability Zone 2
VPC
Public subnet
M Synchronous S
Amazon RDS
RDS Standby
instance
instance
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 14
Amazon RDS read replicas
Features AWS Cloud
Availability Zone
• Offers asynchronous
VPC
replication Public subnet
Private subnet
Functionality
P R
• Use for read-heavy database Amazon RDS Read replica
workloads primary instance
instance
• Offload read queries
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 15
Use cases
High throughput
Web and mobile Massive storage
applications scalability
High availability
Low-cost database
Ecommerce applications Data security
Fully managed solution
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 17
Amazon RDS: Clock-hour billing and database
characteristics
Clock-hour billing –
• Resources incur charges when running
Database characteristics –
• Physical capacity of database:
• Engine
• Size
• Memory class
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 18
Amazon RDS: DB purchase type and multiple DB instances
DB purchase type –
• On-Demand Instances
• Compute capacity by the hour
• Reserved Instances
• Low, one-time, upfront payment for database instances that are
reserved with a 1-year or 3-year term
Number of DB instances –
• Provision multiple DB instances to handle peak loads
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 19
Amazon RDS: Storage
Provisioned storage –
• No charge
• Backup storage of up to 100 percent of database storage for an
active database
• Charge (GB/month)
• Backup storage for terminated DB instances
Additional storage –
• Charge (GB/month)
• Backup storage in addition to provisioned storage
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 20
Amazon RDS: Deployment type and data transfer
Requests –
• The number of input and output requests that are made to the
database
Data transfer –
• No charge for inbound data transfer
• Tiered charges for outbound data transfer
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 21
Recorded demo:
Amazon RDS
console
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 22
Build Your DB
Server and
Interact with
Your DB Using
an App
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 23
Lab 5: Scenario
This lab is designed to show you how to use an AWS managed
database instance to solve a need for a relational database.
AWS Cloud
Availability Zone A Availability Zone B
VPC: 10.0.0.0/16
Public subnet 1: Public subnet 2:
10.0.0.0/24 10.0.2.0/24
Internet Security group
Internet NAT Web
gateway gateway Server
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 24
Lab 5: Tasks
Security group
Create a VPC security group.
Private subnet
Create a DB subnet group.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 25
Lab 5: Final product
AWS Cloud
Availability Zone A Availability Zone B
VPC: 10.0.0.0/16
Public subnet 1: Public subnet 2:
10.0.1.0/24 10.0.2.0/24
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 26
~ 30 minutes
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 27
Lab debrief:
key takeaways
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 28
Section 1 key • With Amazon RDS, you can set up,
operate, and scale relational
takeaways databases in the cloud.
• Features –
• Managed service
• Accessible via the console, AWS Command Line
Interface (AWS CLI), or application programming
interface (API) calls
• Scalable (compute and storage)
• Automated redundancy and backup are available
• Supported database engines:
• Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle,
Microsoft SQL Server
29
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Section 2: Amazon
DynamoDB
Module 8: Databases
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserve
Relational versus non-relational databases
Relational (SQL) Non-Relational
Data
Rows and columns Key-value, document, graph
Storage
Schemas Fixed Dynamic
Focuses on collection of
Querying Uses SQL
documents
Scalability Vertical Horizontal
Autho {
ISBN Title Format
r
ISBN: 3111111223439,
311111122343 Witherin Jackson Title: “Withering Depths”,
Paperback
9 g Depths , Mateo Author: ”Jackson, Mateo”,
Example Format: “Paperback”
312222222343 Wily Wang,
9 Willy Xiulan
Ebook }
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 31
What is Amazon DynamoDB?
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 33
Partitioning
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 34
Items in a table must have a key
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 35
Section 2 key Amazon DynamoDB:
takeaways • Runs exclusively on SSDs.
• Supports document and key-value store
models.
• Replicates your tables automatically across
your choice of AWS Regions.
• Works well for mobile, web, gaming, adtech,
and Internet of Things (IoT) applications.
• Is accessible via the console, the AWS CLI,
and API calls.
• Provides consistent, single-digit millisecond
latency at any scale.
• Has no limits on table size or throughput.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 36
Recorded demo:
Amazon
DynamoDB
console
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 37
Amazon DynamoDB demonstration
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 38
Section 3: Amazon Redshift
Module 8: Databases
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserve
Amazon Redshift
Amazon Redshift
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 40
Introduction to Amazon Redshift
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 41
Parallel processing architecture
Amazon Redshift
Leader node
Dense compute
node Dense compute
• nodes
Virtual Core
• RAM
• Local disk Amazon DynamoDB
Amazon S3
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 42
Automation and scaling
Manage
Monitor
Scale
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 43
Compatibility
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 44
Amazon Redshift use cases (1 of 2)
• Enterprise data warehouse (EDW)
• Migrate at a pace that customers are comfortable with
• Experiment without large upfront cost or commitment
• Respond faster to business needs
• Big data
• Low price point for small customers
• Managed service for ease of deployment and maintenance
• Focus more on data and less on database management
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 45
Amazon Redshift use cases (2 of 2)
• Software as a service (SaaS)
• Scale the data warehouse capacity as demand grows
• Add analytic functionality to applications
• Reduce hardware and software costs
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 46
Section 3 key Amazon Redshift features:
takeaways • Fast, fully managed data warehouse
service
• Easily scale with no downtime
• Columnar storage and parallel
processing architectures
• Automatically and continuously
monitors cluster
• Encryption is built in
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 47
Section 4: Amazon Aurora
Module 8: Databases
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserve
Amazon Aurora
• Enterprise-class relational
database
PostgreSQL
Amazon Aurora
• Automate time-consuming tasks
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 50
High availability
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 51
Resilient design
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 52
Section 4 key Amazon Aurora features:
takeaways • High performance and scalability
• High availability and durability
• Multiple levels of security
• Compatible with MySQL and
PostgreSQL
• Fully managed
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 53
The right tool for the right job
AWS Cloud
??? Metadata
??? database
Configuratio
Corporate n
data database
center
Amazon EC2 Amazon Simple Amazon Simple
Storage Service Storage Service
(Amazon S3) Glacier
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 55
Database case study activity (2 of 3)
Case 2: A commercial shipping company that uses an on-premises legacy data management
system. They must migrate to a serverless ecosystem while they continue to use their existing
database system, which is based on Oracle. They are also in the process of decomposing their
highly structured relational data into semistructured data. The following diagram illustrates their
architecture.
Database
???
AWS AppSync
AWS Lambda AWS Lambda
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 56
Database case study activity 3
Case 3: An online payment processing company that processes over1 million transactions per day.
They must provide services to ecommerce customers who offer flash sales (sales that offer greatly
reduced prices for a limited time), where demand can increase by 30 times in a short time period.
They use IAM and AWS KMS to authenticate transactions with financial institutions. They need high
throughput for these peak loads. The following diagram illustrates their architecture.
AWS Cloud
Database
??? AWS Identity and
Access Management
Elastic Load (IAM)
Internet Balancing
Banks
AWS SDK
AWS Key
Read replicas Management
Amazon EC2
Service (AWS KMS)
instances
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 57
Module wrap-up
Module 8: Databases
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserve
Module summary
In summary, in this module, you learned how to:
• Explain Amazon Relational Database Service (Amazon RDS)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 59
Complete the knowledge check
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 60
Sample exam question
Which of the following is a fully-managed NoSQL database service?
Choice Response
B Amazon DynamoDB
C Amazon Aurora
D Amazon Redshift
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 61
Sample exam question answer
Which of the following is a fully-managed NoSQL database service?
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 62
Additional resources
• AWS Database page:
https://aws.amazon.com/products/databases/
• Amazon RDS page: https://aws.amazon.com/rds/
• Overview of Amazon database services:
https://docs.aws.amazon.com/whitepapers/latest/aws-overvie
w/database.html
• Getting started with AWS databases:
https://aws.amazon.com/products/databases/learn/
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 63
Thank you
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 64