AWS Database Services Overview
AWS Database Services Overview
in/
Introduction to AWS
Security management in AWS
Object storage options
Amazon EC2
Load blanching , Auto-scaling and route 53
Database service and analytic
Networking and monitoring service
Application service and AWS lambda
Configuration management and automation
AWS Architectural designs -1
Topic
https:/[Link]/
A collection of individual data items which is stored in a highly structured manner is called as database
RDS Dynamo
Elasticache
• Manages relational database • NoSQL database
• In-memory cache
• Handles structured and tabular data • Document and key-value store
• Improve the performance of any web application
• Handles structured data
Redshift
• Data warehouse Aurora
• It is used for data analysis and reporting • MySQL compatible relational database with 5x performance
https:/[Link]/
Amazon RDS is a relational database management service which manage relational database for users
On buying a server you get CPU, Memory, IOPS and storage all packed together, but RDS provides them separately so
that they can be scaled individually
The role of RDS is to look after the software patching , update, backup, recovery and automatic failure detection
You can either manually create a backup via snapshot or can have an automated backup performed
It includes a primary instance and a simultaneous secondary instance in order to provide high availability and avoid
failure
It is mainly used to manage data for e-commerce, gamming, apps, websites and many more
Amazon RDS benefits
https:/[Link]/
Database engine is an
underlying software
component used by a database
to create, read, update and
delete data from it
https:/[Link]/
3. Each DB instance can host multiple user created databases for a single oracle
database with multiple schemas
2. The necessity of DB instance class depends on users processing power and memory requirement
3. Its supports mainly three types of storages : Magnetic, general purpose and provisioned IOPS
Read Replica database is the copy of master database which reflects changes done to the master database instance
The default region can be changed in the console, by setting the EC2
region environment variable
If OS of DB instance is undergoing
A DB instance server
Type is changed
Note : Normal failover times are 60-120 seconds (this may be exceeded in case of heavy recovery process
https:/[Link]/
When a DB instance is deleted the automated backups too get deleted with it but manual snapshots remain the same
Billing of Amazon RDS
https:/[Link]/
Storage (per GB per month) Scaling your provisioned storage capacity within the
month, will be billed pro-rated
6. Enter the endpoint, username, port and password to connect AWS RDS and the WAMP server
Note : The reason why Amazon Aurora runs faster then MySQL is it sends and writes only the log record to storage
node
I/O Traffic In Aurora
https:/[Link]/
• In each of the storage node the record first enters an in-memory queue
• Persisted record is carried to update queue and primary instance is
acknowledged
• The records are organized and sort group identifies gaps in log. Hot log
carries the record that is to be stored
• If log sequence number of the storage node is lost then they are retrieved
from other nodes via gossip protocol
• Log record are coalesced and used to create data page
• The log records are backed up asynchronously to Amazon S3
• Periodically garbage collects old versions and current records are stored in
data books
• When all writers are considered successful an acknowledgement is returned
to client application
https:/[Link]/
AWS Aurora
Traditional database
• As part of disk read, redo of records is done
• Replay logs since the last checkpoint
on-demand
• Generally takes 5 minutes between
• Operations are parallel, distributed,
checkpoints
Asynchronous
• MySQL works with single-thread ; number
• Does not replay on start-up of server
of disk access are very high
https:/[Link]/
Data Model Well-defined schema where data is Schema-less with a primary key and
normalized into tables, row and columns manages structured and semi-
structured data
Data Access SQL (structure query language) AWS management console or AWS
CLI and perform adhoc tasks
Here you can set TTL (Time To Leave) to delete items automatically in the table once they expire
Operations such as create, insert, update, query, scan and delete are performed in table via
appropriate API
For faster performance and data durability the table data is stored in SSD disk and spread across many
Primary key
Attributes
Partition
key
Sort key Schema is different per item
Product The
Type Jane Eyre See Me
ID Notebook
Book ID
1 HP20111
Kamikaze Bloom
Album ID Invasion
2 crg123
Items
of Privacy
Album ID
2 crg999 Sybil Lucy Perfume
Movie ID
3 TRBlkmr
https:/[Link]/
DynamoDB API
DynamoDB API https:/[Link]/
• Create table: Used to create a table which includes table name, primary key, throughput settings
Control plane
• Describe Table: Used to view the details of the table
• Update Table: Used to modify settings of table or index and DynamoDB stream setting for table
• List table: It returns the name of DynamoDB tables for the current AWS account and region
• Describe limits: It return the current read and write capacity limits for the current AWS account
and region
DynamoDB API
https:/[Link]/
• Creating data:
Put Item – to create an item
Batch write item – to create up to 25 items in one or more tables
Data Plane
• Reading data:
Get Item – To read an Item
Batch get Item – To read up to 100 items from one or more tables
• Uploading Data:
Update Item – To update an Item
• Deleting Data:
Delete Item – To delete an item
Batch write Item – delete up to 25 items in one or more tables
DynamoDB API
https:/[Link]/
A DynamoDB streams are used to replicate the data from a table to table in another region
• List stream – Retrieves a list of stream descriptors for the current account and endpoint
DynamoDB
streams • Describe stream – Retrieves detailed information about a given stream. The output
includes a list of shards associate with the stream, including the shards IDs
• Get shard iterator – Retrieves a shared iterator, which describe a location within shard
Example :
A read capacity unit If a table is created with 6 write capacity
On creating a table in
represents one strongly
DynamoDB you are supposed units and 6 read capacity units. Then with
consistent read per seconds,
to specify the capacity
or two eventually consistent these settings, an application could :
requirements for read and
reads per seconds, for an item Perform strongly consistent read of up to
write activity
up to 4 KB in size
24 kb per second ( 4 kb x 6 read capacity
units)
Perform eventually consistent read of up
Throughput capacity limits is One write capacity unit to 48 kb per second ( twice as much read
specified in terms of read represents one write per throughput)
capacity unit and write second for an item up to 1 KB
capacity unit in size Write up to 6 kb per second ( 1 kb x 6
write capacity units)
https:/[Link]/
Store 31 billion items in support of an online site delivering lessons for 80 languages
How DynamoDB work?
https:/[Link]/
2. Click on “Create table” and enter the table name and primary keys
3. Now select Items and click on “ Create item” to insert data into the table
4. If the data is inserted successfully then you can read the inserted data from dashboard
Note : For more detailed steps refer AWS Architect Module 6 demo 2 on LMS
https:/[Link]/
ElastiCache is a cache-in environment used to cache results in order to reduce overhead and latency on database
Redis is an in-memory data structure store, used as database, cache and message broker
When cluster mode is enabled 1 to 15 shards can be used and when it is disabled
you can have only one shard
Note : for more detailed steps refer AWS Architect module – 6 demo 3 on LMS
https:/[Link]/
Storage type Stores variables in memory and Redis is like a database that resides in
retrieves information directly from memory
server instead of DB
Read/Write speed Good to handle high traffic websites Neither can handle high traffic on read
nor heavy writes
Ideal for Caching relatively small and static data, Session cache, full page cache (FPC),
such as HTML code fragments queues, Leader boards/ counting and
more
https:/[Link]/
Data warehouse is a repository where data generated by different sources is collected, transformed and stored for
organizations decision making process
Redshift is fully managed peta-byte scale data warehouse service by AWS used to do analysis on data
2. The total storage capacity of a cluster is determined via node size and number of
nodes
3. Here, in the same availability zone of a region all cluster nodes are created
No Up-front costs
Fully managed
Fault tolerant
Automated backup
Network isolation
AWS Redshift Architecture
https:/[Link]/
• Each compute node has its own CPU, memory and attached storage Client application
• The role of compute note is to execute the compiled code and sends
Compute Compute Compute
the intermediate result to the leader node node 1 node 2 node n
Client application
• Node slice is mainly used for the distribution of data within
the node
Leader Node
• Each slice is allotted a portion of node memory and disk space,
Streaming data is the data which is generated continuously from thousand of sources
Kinesis is an data analysis service by Amazon which provide an easy way to collect process and analyse real-time streaming
data to get one time insights so as to provide quick response to the information
It mainly includes video stream, data stream, data firehose and data analytic
Kinesis video stream is used to capture, process and Analyse video stream for machine
Kinesis data stream is used to build custom application to Analyse data stream using third
kinesis data firehose is used to load data into AWS data stores
Kinesis data analytic is an easy way to process data stream with SQL
Features of Kinesis
https:/[Link]/
Ensure high availability and durability by replicating data into multiple availability zones
Can store and process thousands of terabytes of data per hour from different sources
Reduce latencies
Note: please refer to module 6 demo 4 in demo document for more detailed steps
https:/[Link]/