0% found this document useful (0 votes)
4 views80 pages

Module 06 SAA

Module 6 of the AWS Academy Cloud Architecting course focuses on adding a database layer, covering architectural needs, database considerations, and specific AWS database services like Amazon RDS and Aurora. It includes objectives such as comparing database types, understanding managed versus unmanaged services, and deploying a database server. The module also emphasizes the advantages of managed services, scalability, and security controls for databases.

Uploaded by

Lê Tuấn
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views80 pages

Module 06 SAA

Module 6 of the AWS Academy Cloud Architecting course focuses on adding a database layer, covering architectural needs, database considerations, and specific AWS database services like Amazon RDS and Aurora. It includes objectives such as comparing database types, understanding managed versus unmanaged services, and deploying a database server. The module also emphasizes the advantages of managed services, scalability, and security controls for databases.

Uploaded by

Lê Tuấn
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AWS Academy Cloud Architecting

Module 6: Adding a Database Layer

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Module overview

Sections Demonstration
1. Architectural need • Amazon RDS Automated Backup
and Read Replicas
2. Database layer considerations
3. Amazon RDS Labs
4. Amazon Aurora • Guided Lab: Creating an Amazon
RDS Database
5. RDS Proxy
• Challenge Lab: Migrating a Database
6. RDS Security to Amazon RDS
7. ElastiCache
Knowledge check
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights
2
reserved.
Module objectives

At the end of this module, you should be able to:


• Compare database types
• Differentiate between managed versus unmanaged services
• Explain when to use Amazon Relational Database Service (Amazon RDS)
• Describe available database security controls
• Describe how to migrate data into Amazon Web Services (AWS) databases
• Deploy a database server

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


3
reserved.
M odu l e 6: Addi n g a Database Lay er

Section 1: Architectural need

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


reserved.
Databases as part of a larger architecture
Region VPC
Public Private subnet Private subnet
subnet

Availability
Zone 2
Amazon
CloudFront
NAT gateway EC2 instances ElastiCache Amazon RDS Amazon
for standby EFS mount
v Internet Memcache instance target
gatewa d
y Application Amazon EC2 Amazon
Load Auto Scaling EFS
v Amazon
Balancer
Route 53 Public Private subnet Private subnet
subnet
Availability
Zone 1

NAT gateway EC2 instance ElastiCache Amazon RDS Amazon


Users Static for primary EFS mount
website Memcache instance target
on S3 d
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights
5
reserved.
Café business requirement

The café needs a database solution that is easier to maintain, and that
provides essential features such as durability, scalability, and high
performance.

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


6
reserved.
M odu l e 6: Addi n g a Database Lay er

Section 2: Database layer considerations

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


reserved.
Database considerations: Scalability

Scalability How much throughput is needed?

Will the chosen solution be able to scale


up later, if needed?
Total storage requirements

Object size and type

Durability

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


8
reserved.
Database considerations: Storage
requirements

Scalability
How large does the database need to be?

Will it need to store GB, TB, or petabytes


Total storage requirements of data?

Object size and type

Durability

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


9
reserved.
Database considerations: Object size and
type

Scalability
Do you need to store simple data
structures, large data objects, or both?

Total storage requirements

Object size and type

Durability

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


10
reserved.
Database considerations: Durability

Scalability
What level of data durability, data
availability, and recoverability is required?

Total storage requirements Do regulatory obligations apply?

Object size and type

Durability

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


11
reserved.
Database types

Now that you reviewed key considerations, consider the


two categories of database options available:

Relational Non-Relational
Traditional examples: Traditional examples:

Microsoft SQL Server MongoDB


Oracle Database Cassandra
MySQL Redis

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


12
reserved.
Relational database type

Benefits: Relational is ideal when you:


• Ease of use • Need strict schema rules, ACID compliance, and
• Data integrity data quality enforcement

• Reduced data storage • Do not need extreme read/write capacity

• Common language (structured query • Do not need extreme performance


language, or SQL) • An RDBMS can be the best, lowest-effort
solution

SQL query

Response
Application User
server
Relational database management system (RDBMS)
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights
13
reserved.
Relational database type

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


14
reserved.
Non-relational database type

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


15
reserved.
Amazon database options

More database options exist—these options are common examples

Relational databases Non-relational databases

Amazon Amazon Amazon Amazon Amazon Amazon


RDS Redshift Aurora DynamoDB ElastiCache Neptune

Focus in this module

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


16
reserved.
• When you choose a database, consider
Section 2 key scalability, storage requirements, the
takeaways type and size of objects to be stored,
and durability requirements
• Relational databases have strict
schema rules, provide data integrity,
and support SQL
• Non-relational databases scale
horizontally, provide higher scalability
and flexibility, and work well for
semistructured and unstructured data

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


17
reserved.
M odu l e 6: Addi n g a Database Lay er

Section 3: Amazon RDS

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


reserved.
Amazon RDS

Relational Amazon RDS is a fully managed


relational database service.

Amazon
RDS

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


19
reserved.
Amazon RDS: Uses and database types

Works well for applications that:


• Have more complex data
• Need to combine and join datasets
• Need enforced syntax rules
Amazon
RDS Six database types supported:
• Microsoft SQL Server • PostgreSQL
• Oracle • Aurora
• MySQL • MariaDB

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


20
reserved.
Advantage of managed AWS database
services
You
App optimization App optimization manage
App optimization
Scaling Scaling Scaling
High availability High availability High availability
You
Database backups Database backups Database backups
manage
DB s/w patches DB s/w patches DB s/w patches
You DB s/w installs DB s/w installs DB s/w installs
manage AWS
OS patches OS patches manages OS patches
OS installation OS installation OS installation
Server maintenance AWS Server maintenance Server maintenance
Rack and stack manages Rack and stack
Rack and stack
Power, HVAC, net Power, HVAC, net Power, HVAC, net

Host database Host database in Host database in


on-premises Amazon EC2 a managed AWS
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights
reserved.
database service 21
Advantage of managed AWS database
services

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


22
reserved.
Amazon RDS characteristics

Access pattern Data size Performance Business use cases


Transactional Low-TB range Mid to high throughput Transactional
Light analytics Low latency OLAP

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 23
Advantage of managed AWS database
services

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


24
reserved.
Read replicas for performance
Region

Availability Zone 1

Public subnet

Application

Private subnet Read/


write

RDS
Read
replica Read

Asynchronous replication
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 25
RDS Read Replica

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


26
reserved.
RDS Read Replica

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


27
reserved.
RDS Read Replica

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


28
reserved.
Multi-AZ deployment for high
availability
Region

Availability Zone 1 Availability Zone 2


Routes traffic to
the applications

Auto Scaling group


Application instances
Amazon Route 53
Primary Secondary

Synchronous
replication

EBS volume EBS volume

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 29
RDS Multi-AZ

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


30
reserved.
RDS Multi-AZ

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


31
reserved.
Amazon RDS custom

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 32
Amazon RDS backup solution
Region Region

Availability Zone 1 Availability Zone 2

Public Public
subnet 1 subnet 2

Application

Private Primary Private Secondary


subnet 1 subnet 2
Synchronous
replication Snapshots

Copy
Transaction logs
S3 bucket snapshots
S3 bucket
controlled controlled
by Amazon by Amazon
EBS volume EBS volume
RDS RDS
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 33
Database instance sizing
T family M family R family
Burstable General-purpose Memory-optimized
Type instances instances instances
Sizing 1 vCPU/1 GB RAM 2 vCPU/8 GB RAM 2 vCPU/16 GB RAM
to 8 vCPU 32 GB RAM to 96 vCPU 384 GB RAM to 96 vCPU 768 GB RAM
Networking Moderate performance High performance High performance

Ideal Query-intensive, high


Smaller or variable CPU-intensive
Workload connection counts

T3 can burst above M5 offers up to 96 R5 offers up to


Highlights baseline for extra vCPU 96 vCPU 768 GiB RAM
charge

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 34
Amazon RDS: Example use case

Analytics

New data

Data

Data
Users Data store
transformation
(for example, for an
analytics tool to access)

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


35
reserved.
Module 6 - Guided
Lab: Creating an
Amazon RDS
Database

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


36
reserved.
Guided lab: Tasks

1. Creating an Amazon RDS Lab VPC


database
Availability Zone
2. Configuring web application Public subnet 1 Private subnet
communication with a [Link]/24 1
[Link]/23
database instance
Application server Amazon RDS
on EC2 instance database instance

Availability Zone
Public subnet 2 Private subnet
2

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


37
reserved.
~ 20 minutes

Begin Module 6 –
Guided Lab:
Creating an Amazon
RDS Database

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


38
reserved.
Guided lab
debrief:
Key takeaways

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


39
reserved.
M odu l e 6: Addi n g a Database Lay er

Section 3: Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


41
reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


42
reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


43
reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


44
reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


45
reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


46
reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


47
reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


48
reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


49
reserved.
Amazon Aurora

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


50
reserved.
• Managed AWS database services handle
Section 3 key administration tasks so you can focus on your
applications
takeaways • Amazon RDS supports Microsoft SQL Server,
Oracle, MySQL, PostgreSQL, Aurora, and
MariaDB
• Amazon RDS Multi-AZ deployments provide
high availability with automatic failover
• You can have up to 15 read replicas per
primary database to improve Amazon RDS
performance
• Amazon Aurora is a fully managed, MySQL-
and PostgreSQL-compatible, relational
database engine

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


51
reserved.
M odu l e 6: Addi n g a Database Lay er

Section 4: RDS & Aurora Backup and Monitoring

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


reserved.
RDS Backups

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


53
reserved.
Aurora Backups

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


54
reserved.
RDS & Aurora Restore options

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


55
reserved.
Aurora Cloning

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


56
reserved.
M odu l e 6: Addi n g a Database Lay er

Section 5: Database security

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


reserved.
Securing Amazon RDS databases

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


58
reserved.
M odu l e 6: Addi n g a Database Lay er

Section 6: RDS Proxy

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


reserved.
RDS Proxy

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


60
reserved.
M odu l e 6: Addi n g a Database Lay er

Section 7: ElastiCache

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


reserved.
ElastiCache

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


62
reserved.
ElastiCache

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


63
reserved.
ElastiCache

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


64
reserved.
ElastiCache

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


65
reserved.
ElastiCache

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


66
reserved.
ElastiCache

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


67
reserved.
ElastiCache

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


68
reserved.
Module 6 - Challenge
Lab:
Migrating a Database to
Amazon RDS

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


69
reserved.
The business need: A managed database

The database that runs on the EC2


instance is becoming difficult for
Sofía and Nikhil to maintain.

When Olivia visited the café recently, she


told them about the features of Amazon
RDS.
Sofía and Nikhil decided to migrate the
café's database to Amazon RDS.
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 70
Challenge lab: Tasks

1. Creating an RDS instance


2. Analyzing the existing café application deployment
3. Working with the database on the EC2 instance
4. Working with the RDS database
5. Importing the data into the RDS database instance
6. Connecting the café application to the new database

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


71
reserved.
Challenge lab: Final product
AWS Cloud
Region
Availability Zone 1 Availability Zone 2
VPC
Public Subnet Private Subnet 1 Private Subnet 2

EC2 instance TCP port


Amazon Linux 2 3306
Apache web server
MariaDB RDS
PHP MariaDB
Café application instance

IAM Systems Manager


Role Session Manager –
Systems Manager Parameter Store –
stores database connection terminal in browser access
parameters To EC2 instance
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights
72
reserved.
~ 80 minutes

Begin Module 6 –
Challenge Lab:
Migrating a
Database to Amazon
RDS

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


73
reserved.
Challenge lab
debrief:
Key takeaways

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


74
reserved.
Module 6: Adding a Database Layer

Module wrap-up

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


reserved.
Module summary

In summary, in this module, you learned how to:


• Compare database types
• Differentiate between managed versus unmanaged services
• Explain when to use Amazon Relational Database Service (Amazon RDS)
• Describe available database security controls
• Deploy a database server

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


76
reserved.
Complete the knowledge check

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


77
reserved.
Sample exam question

An application requires a highly available relational database with an initial


storage capacity of 8 TB. The database will grow by 8 GB every day. To support
expected traffic, at least eight read replicas will be required to handle database
reads.
Which option will meet these requirements?

A. DynamoDB
B. Amazon S3
C. Amazon Aurora
D. Amazon Redshift
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 78
Additional resources

• AWS Databases – Resource page


• Amazon RDS Getting Started Guide
• Best Practices for Amazon RDS
• Amazon RDS FAQs
• Amazon DynamoDB Developer Guide
• Amazon DynamoDB FAQs

© 2020, Amazon Web Services, Inc. or its Affiliates. All rights


79
reserved.
Thank you

© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved. This work may not be reproduced or redistributed, in whole or in part, without prior written
permission from Amazon Web Services, Inc. Commercial copying, lending, or selling is prohibited. Corrections or feedback on the course, please email us at: aws-course-
feedback@[Link]. For all other questions, contact us at: [Link] All trademarks are the property of their owners.

You might also like