0% found this document useful (0 votes)
17 views

Lesson 6 Databases

db

Uploaded by

shiva.1912
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Lesson 6 Databases

db

Uploaded by

shiva.1912
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

AWS Cloud Fundamentals

Databases
A Day in the Life of a Cloud Consultant

You are working as a cloud consultant for one of the Fortune 500 companies.
One of your clients is looking for a few database solutions as they are planning to
move to the cloud. Their requirements are as follows:

• Ability to support multi-region, multi-primary replication, and full data


oversight with multiple levels of security, including network isolation and end-
to-end encryption
• Achieve high availability, reliability, and security they need for business-
critical, enterprise workloads
• A database system that supports data structures and key-valued cloud
services and allows users the benefit of auto-scaling, in-memory caching,
backup, and restore options
• Provide security, availability, and reliability of commercial databases
• A fully managed, petabyte-scale data warehouse service in the cloud
A Day in the Life of a Cloud Consultant

• An interactive query service that makes it easy to analyze data in Amazon S3


using standard SQL
• Ability to ingest, buffer, and process streaming data in real-time to derive
insights in seconds or minutes instead of hours or days
• A service that can help make it easier to set up, operate, and scale a relational
database in the cloud

You've been given the task of finding relevant solutions to the above
requirements.

To achieve all of the above, along with some additional features, you will be
learning a few concepts in this lesson that will help you find a solution to the
above scenario.
Learning Objectives

By the end of this lesson, you will be able to:

Analyze the different purpose-built databases in AWS

Explore the various database services provided by AWS

Imbibe the core concept of microservice architecture in AWS

Assess the various relational databases in AWS


Purpose-Built Databases
Purpose-Built Databases

As data has experienced rapid growth in volume, variability, complexity, and


interconnectedness, the requirements of databases have evolved.

• Relational databases alone may not adequately


support the performance needs of modern
applications that require social, mobile, IoT, or global
access.

• Purpose-built databases enable the construction of


extensible, robust, and functional backend
infrastructures for your applications.
Purpose-Built Databases in Public Sector

AWS offers a comprehensive and diverse range of databases, supporting various data formats and
empowering users to build data-driven, highly scalable, and distributed applications.

• Users have the freedom to select the most


suitable database to address specific issues,
freeing them from the limitations of commercial
databases.
• It elevates business flexibility, allowing for faster
resource deployment and cost reduction.
AWS Database Services
Introduction to Amazon DynamoDB

DynamoDB is a fully managed NoSQL database service that provides effortless scaling and
offers consistent performance.

• With DynamoDB, users can effortlessly create


database tables capable of storing and retrieving data
in large quantities, all while handling a significant
number of requests.

• Administrative tasks such as setup and configuration,


software patching, hardware provisioning, cluster
stability, and replication are all managed by
DynamoDB.
Introduction to Amazon DynamoDB

• It provides support for encryption at rest, by


streamlining the process of securing sensitive data
without added time and effort.

• It facilitates on-demand backups, empowering users


to create table backups with regulatory
requirements.
Amazon Neptune

Amazon Neptune is a graph database service, that simplifies the creation and deployment of applications
that utilize interconnected datasets.
Amazon Neptune

• It supports graph models such as property graph and


W3C, enabling effortless query creation for efficient
navigation of interconnected datasets.

• Neptune ensures full security with its support for


encryption at rest and HTTPS encrypted client
connections.
Amazon ElastiCache

ElastiCache is a comprehensive, fully managed solution for in-memory caching, that offers seamless
integration with a wide range of customizable and real-time use cases.
Amazon ElastiCache

• ElastiCache serves various purposes, such as


improving application and database speed through
caching, enabling efficient gaming scoreboards, and
facilitating streaming.

• It can function as a primary data store for analytics-


focused use cases that do not demand permanence.

• Both Redis and Memcached are supported by


ElastiCache.
Amazon DocumentDB

Amazon DocumentDB is a fully managed service specifically tailored for efficiently managing critical
MongoDB workloads.

Developers find it convenient to store query data within the database using document databases, as they
adopt the same document-model format as their application code.
Amazon DocumentDB

• Users can leverage document databases to experience


the advantages of versatile indexing, ad hoc searches,
and analytics applied to a collection of documents.

• Its seamless integration with user profiles, catalogs,


and content management systems guarantees a
smooth operation within these domains.
Choose the Right AWS Database Service

Some of the common AWS database service categories and their use cases are:

Relational databases Key-value databases

It offers features such as referential integrity, ACID It provides benefits such as high throughput, low-
transactions, and schema-on-write. latency reads and writes, and limitless scalability.

It is ideal for real-time bidding, shopping carts,


It is suitable for applications involving lift and shift,
social media, product catalogs, and customer
ERP, CRM, and finance.
preference applications.
Choose the Right AWS Database Service

Some of the common AWS database service categories and their use cases are:

Document databases In-memory databases

It stores documents and enables fast querying on


It allows querying by key with microsecond latency.
any attribute.

It is well-suited for applications involving content It is particularly useful for implementing


management, personalization, and mobile leaderboards, real-time analytics, and caching
platforms. functionalities.
Choose the Right AWS Database Service

Some of the common AWS database service categories and their use cases are:

Graph databases Time-series databases

It enables rapid and effortless creation and It efficiently collects, stores, and processes
navigation of relationships between data. chronologically arranged data.

It proves to be valuable in applications like fraud


It is used in applications related to the Internet of
detection, social networking, and recommendation
Things (IoT) and event tracking.
engines.
Relational Database
Database in AWS

• Databases serve as crucial backend systems that store,


manage, update, and analyze data for various
applications.

• Every application necessitates a storage area to handle


data from users, devices, and the application.
Database Categories

The common database categories are:

5
1

Relational Graph

2 4

Key-value Document
3

In-memory
Relational Database

• A relational database consists of data items that are


interconnected through pre-defined relationships.

• Examples of relational databases include Microsoft SQL


Server, Oracle Database, MySQL, and Amazon Aurora.
Use Cases of Relational Database

The real-life use cases of relational databases are:

• Enterprise resource planning (ERP) applications

• Customer relationship management (CRM)


applications

• Finance data

• Data warehousing
AWS Database Service: Relational Databases

The features of Relational databases are:

Relational databases

• Divides data among tables


• Is highly structured
• Maintains data accuracy and consistency
Key-Value Database

• Key-value databases belong to the category of non-


relational databases, that store data through the
straightforward key-value approach.

• Examples of key-value databases include Amazon


DynamoDB, Riak, Redis, and Aerospike.
Use Cases of Key-Value Database

The real-life use cases of key-value databases are:

• Web applications with a high volume of visitors


• E-commerce system

• Gaming applications
AWS Database Service: Key-Value and Document Databases

The features of Key-value and Document databases are:

Key-value and Document databases

• Is resilient to failure
• Provides high throughput, low-latency read, and write
speed
• Offers a consistent performance at scale
In-Memory Database

• In-memory databases are purpose-built databases


that rely mainly on memory for data storage, in
contrast to databases that store data on disk or SSDs.

• Example: Amazon Elasticache for Redis and Amazon


memory DB for Redis
Use Cases of In-Memory Database

The real-life use cases of in-memory databases are:

• High-speed data storage layer that saves only a


portion of the data

• Session management
• Real-time bidding
• Gaming leaderboards
AWS Database Service: In-Memory Databases

The features of in-memory databases are:

In-memory databases

• They offer low-latency and high throughput


capabilities, making them suitable for workloads that
cannot be effectively handled by disk-based data
stores.

• They find application in scenarios such as


leaderboards, session stores, and real-time analytics,
where reaction times are measured in microseconds.
Document Database

• Document databases fall under the category of non-


relational databases, as they store and query data in
JSON-like document formats.

• An example of a document database is Amazon


DynamoDB, which comes with MongoDB
compatibility.
Use Cases of Document Database

The real-life use cases of document databases are:

• Document databases are well-suited for content


management applications, including blogs and
video platforms.

• They offer effective and efficient storage for


catalog information.

• Document databases are also an ideal choice for


managing user profiles.
Graph Database

• Graph databases are used in applications that


require the exploration and querying of millions of
relationships within highly interconnected graph
datasets, on a massive scale with millisecond
latency.

• Amazon Neptune is an example of a graph


database.
Use Cases of Graph Database

The real-life use cases of graph databases are:

• Detection and prevention of sophisticated fraud

• Recommendation engines

• Social networking
AWS Database Service: Graph Databases

The features of Graph databases are:

Graph databases

• It is easier to build and run applications that work with


highly connected data sets, using graph databases.

• They are used in recommendation systems, social


networking, fraud detection, and knowledge graphs.
Amazon Relational Database Service
Amazon Relational Database Service (RDS)

Amazon RDS simplifies the process of setting up, operating, and scaling a
relational database in the cloud.

It offers scalable and cost-effective capacity while automating time-consuming procedures.


Amazon RDS Database Engines

The Amazon RDS is available on several database instance types:


Features of Amazon RDS

• Amazon RDS simplifies the implementation of


replication to improve availability and reliability for
production workloads.

• Users can seamlessly integrate their existing


databases, along with the code, applications, and
tools.
Benefits of Amazon RDS

Cost-effective Available and durable

Fast performing Benefits Highly scalable

Secure Easy to administer


Use Cases of Amazon RDS

E-commerce applications

Web and mobile applications

Mobile and online games


Amazon Aurora

• Is a relational database for the cloud


• Is compatible with MySQL and PostgreSQL
• Merges the speed and availability of standard commercial
databases with the convenience and flexibility of open-source
databases
Amazon Aurora

• Aurora's MySQL demonstrates a significant speed


improvement of 5 times compared to open-source
MySQL, while Aurora's PostgreSQL offers a 3 times
speed boost over open source PostGreSQL.

• A user can seamlessly use Aurora with the same code,


tools, and applications that currently operate with
your existing MySQL and PostgreSQL databases.
Amazon Redshift

Amazon Redshift is a data warehouse service that employs SQL and AWS-designed hardware to analyze
structured and semi-structured data from data warehouses, databases, and data lakes.
Amazon Redshift

• It pertains to fast, easy, and cost-effective data


warehousing.

• By utilizing machine learning, it ensures optimal pricing


performance regardless of the scale.
Amazon Athena

Amazon Athena is a user-friendly interactive query service that allows seamless data evaluation in
Amazon S3 using regular SQL.
Amazon Athena

Amazon Athena operates in a serverless manner, ensuring that a user is charged solely for the
executed queries.

It offers ease of use, making it straightforward to operate.


Amazon Kinesis

Amazon Kinesis is an Amazon Web Service for real-time processing of massive amounts of data.
Amazon Kinesis

• With Amazon Kinesis, users have the ability to ingest


real-time data like audio, video, and application logs
for purposes such as analytics, machine learning, and
other applications.

• Amazon Kinesis eliminates the need to wait for data


collection before processing, by enabling data analysis
and processing immediately upon arrival.
Amazon QuickSight

Amazon QuickSight is a cloud-based business intelligence service that enables users to provide
straightforward and actionable insights to their team members.
Amazon QuickSight

• It allows everyone in the organization to understand


the data by asking questions in natural language or by
using machine learning to seek trends.

• It also includes the tools that are needed to operate


10 to 10,000 clients without deploying or managing
any infrastructure.
Amazon EMR

Amazon EMR is a cloud-based big data platform that facilitates the utilization of open-source analytics
frameworks, such as Apache Hadoop, Apache Hive, and Presto, for processing vast volumes of data on
the AWS infrastructure.
Amazon Simple Notification Service (Amazon SNS)

Amazon Simple Notification Service (Amazon SNS) serves as a messaging platform for both
application-to-application and application-to-person communication.

As a web service, it effectively oversees and orchestrates the delivery of messages to clients or
subscribed endpoints.
Amazon Simple Notification Service (Amazon SNS)

There are two types of clients on Amazon SNS:

Publishers Consumers
Amazon Simple Notification Service (Amazon SNS)

Publishers

They interact with subscribers in an asynchronous manner by generating and dispatching


messages to a topic, which functions as a logical access point and communication
channel.
Amazon Simple Notification Service (Amazon SNS)

Subscribers

They receive the message or notification over one of the supported protocols when they
are subscribed to the topic.
Amazon Simple Queue Service (Amazon SQS)

Amazon Simple Queue Service (SQS) functions as a message queuing service, allowing the
decoupling and scalability of microservices and serverless applications.

• Through Amazon SQS, the application's components


can be isolated, simplifying message management.

• Any component of a distributed application can store


messages in the queue.
Amazon Simple Queue Service (Amazon SQS)

• Using SQS, messages can be transmitted, stored, and


received among software components seamlessly,
regardless of the volume, ensuring no message loss.

• The messages can be in different formats, such as


JSON, XML, and others, and have a maximum size limit
of 256 KB.
Assisted Practice

Relational Database Service (RDS) Duration: 20 Min.

Problem Statement:

You have been assigned a task to demonstrate the process of creating a database using the Amazon
RDS (Relational Database Service) console.
Assisted Practice: Guidelines

Steps to be followed:

1. Create the database in the Amazon RDS console


Data Pipeline
Data Pipeline

It is a web service that facilitates the


seamless processing and transfer of data
between AWS computing, storage
services, and on-premises data sources.

Users have the capability to design data


processing workloads that are fault-
tolerant, repeatable, and highly available.
Example for Data Pipeline

The user uses AWS Data Pipeline to move clickstream data from Amazon S3 to
Amazon Redshift.
Benefits of Amazon Data Pipeline

• Manages the scheduling and execution of user tasks

• Tracks the dependencies between business logic and data


sources efficiently

• Notifies the user of any necessary failure reports promptly

• Handles the creation and control of any compute


resources that the jobs may require
Microservice
Microservice Architecture

Microservices represent an organizational method for software development, where the software
comprises self-contained services that interact through APIs.

Microservices can be written and managed by a small team of developers.


Microservices in Amazon ECS

• Microservices can be developed and deployed on


AWS ECS by leveraging Fargate and employing a
rolling upgrade strategy.

• Deploying a microservice and enabling service


discovery is a simple process.

• A user has the flexibility to safely update and deploy


a service without causing disruptions to other
services.
Microservices in AWS Lambda

• AWS Lambda enhances the agility and efficiency of


microservices development by eliminating the
complexities of server setup and management.

• Users can build applications using independent and


reusable building blocks, leverage multiple services,
and execute functions with various arguments.
Microservice Architecture Functioning

Microservices play a vital role in developing cloud applications.

Client API Gateway Services Remote Service

Each application is composed of a set of services where each service operates its own processes, and
communication occurs through APIs.
Features of Microservices

Loosely coupled

Changes in one module will not affect the entire system because it is loosely linked.

Independently deployable
Services that are independently deployable can be built, debugged, and deployed by
a single development team.

Language neutral
Language Neutral means that one microservice may run faster in one language
while another may run faster in another.
Key Takeaways

Purpose-built databases allow you to build extensible and robust, high-


performance, and functional backend infrastructures for your apps.

DynamoDB is a fully managed NoSQL database service that provides


effortless scaling and offers consistent performance.

Amazon RDS makes it simple to set up, operate, and scale a relational
database in the cloud.

AWS Data Pipeline is a web service that enables you to process and
move data between AWS computing and storage services.
Create a Basic VPC and Deploy a DB Instance

Duration: 30 Minutes.
Project Agenda: To create a VPC with public and private subnets on Amazon
VPC. A web server will be hosted in the public subnet, and a DB instance will
be set up in the private subnet, ensuring secure data exchange without
exposing the DB to public internet access
Description:
This project involves setting up a VPC on AWS with distinct public and private
subnets, placing a web server in the public subnet and a DB instance in the
private subnet, and establishing a secure data exchange process.
Perform the following:
1. Allocate an Elastic IP address
2. Create a VPC
3. Create a public subnet in the VPC
4. Create a private subnet in the VPC
5. Create a VPC security group
6. Create a DB instance in the private subnet
Thank you

You might also like