Aws - DB Notes
Aws - DB Notes
Aws - DB Notes
29 | P a g e
Relational Databases
Relational databases are what most of us ar all used to. They have been around since the 70’s.
Think of a traditional spreadsheet;
• Database
• Tables
• Row
• Fields
Eg;
• MS SQL Server
• Oracle
• MySQL Server
• PostgreSQL
• Aurora
• MariaDB
30 | P a g e
Relational Database Services (RDS) Features;
RDS has two key features;
“_id” : “51262c865caasdsadfbe0545435,
“firstname” : ”John”,
“surname” : “Smith”,
“Age” : “23”,
“address” : [
31 | P a g e
The basics of DynamoDB are as follows;
Data Warehousing
Used for business intelligence. Tools like Cognos, Jaspersoft, SQL Server Reporting Services,
Oracle Hyperion, SAP NetWeaver.
Data warehousing databases use different type of architecture both from a database
perspective and infrastructure layer.
Amazon’s Data Warehouse Solution is called Redshift. (Mainly for OLAP)
Used to pull in very large and complex data sets. Usually used by management to do queries on
data (such as current performance vs targets etc)
OLTP vs OLAP
Online Transaction Processing (OLTP) differs from OLAP Online Analytics Processing (OLAP) in
terms of the types of queries you will run.
OLTP Example:
Order number 212002
Pulls up a row of data such as Name, Data, Address to Deliver to, Delivery Status etc.
32 | P a g e
Additional Points;
• RDS runs on virtual machines
• You cannot log in to these operating systems however.
• Patching of the RDS Operating System and DB is Amazon’s responsibility
• RDS is NOT Serverless
• Aurora Serverless IS Serverless
Automated Backups are enabled by default. The backup data is stored in S3 and you get
free storage space equal to the size of your database. So If you have an RDS Instance of
10Gb, you will get 10Gb worth of storage.
Backups are taken within a defined window. During the backup window, storage I/O
may be suspended while your data is being backed up and you may experience elevated
latency.
• Database Snapshots
DB Snapshots are done manually (ie they are user initiated.) They are stored even after
you delete the original RDS instance, unlike automated backups.
Restoring Backups
Whenever you restore either an Automatic Backup or a manual Snapshot, the restored version
of the database will be a new RDS instance with a new DNS endpoint.
33 | P a g e
Encryption At Rest
Encryption at rest is supported for MySQL, Oracle, SQL Server, PostgreSQL, MariaDB & Aurora.
Encryption is done using the AWS Key Management Service (KMS) Service. Once your RDS
instance is encrypted, the data stored at rest in the underlying storage is encrypted, as are tis
automated backups, read replicas, and snapshots.
Multi-AZ
Multi-AZ allows you to have an exact copy of your production database in another Availability
Zone. AWS handles the replication for you, so when your production database is written to, this
write will automatically be synchronized to the stand by database. It is used for DR.
Read Replica
Read replicas allow you to have a read-only copy of your production database. This is achieved
by suing Asynchronous replication from the primary RDS instance to the read replica. You use
read replicas primarily for very read-heavy database workloads.
34 | P a g e
Read Replicas are available for the following databases
• MySQL Server
• PostgreSQL
• MariaDB
• Oracle
• Aurora
Redshift
Amazon Redshift is a fast and powerful, fully managed, petabyte-scale data warehouse service
in the cloud. Customers can start small for just $0.25 per hour with no commitments or upfront
costs and scale to a petabyte or more for $1,000 per terabyte per year, less than a tenth of
most other data warehousing solutions.
35 | P a g e
Redshift is priced as follows;
• Compute Node Hours (Total number of hours you run across all your compute nodes for
the billing period. You are billed for 1 unit per node per hour, so a 3-node data
warehouse cluster running persistently for an entire month would incur 2,160 instance
hours. You will not be charged for leader node hours; only compute nodes will incur
charges.)
• Backup
• Data Transfer (Only within a VPC, not outside it)
Redshift Availability
• Currently only available in 1 AZ
• Can restore snapshots to new AZs in the event of an outage.
AURORA
Amazon Aurora is a MySQL-compatible, relational database engine that combines the speed and
availability of high-end commercial databases with the simplicity and cost-effectiveness of open source
databases. Amazon Aurora provides up to five times better performance than MySQL at a price point
one tenth that of a commercial database while delivering similar performance and availability.
36 | P a g e
• 2 copies of your data is contained in each availability zone, with minimum of 3 availability zones.
6 copies of your data.
Scaling Aurora
• Aurora is designed to transparently handle the loss of up to 2 copies of data without affecting
database write availability and up to three copies without affecting read availability.
• Aurora storage is also self-healing. Data blocks and disks are continuously scanned for errors and
repaired automatically.
37 | P a g e
ElastiCache
ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory
cache in the cloud. The service improves the performance of web applications by allowing you
to retrieve information from fast, managed, in-memory caches, instead of relying entirely on
slower disk-based databases.
38 | P a g e