Introduction to AWS: Databases and other important services
Tags: aws, cloud, beginners
Published: 2021-08-30 00:00:00

---
title: "Introduction to AWS: Databases and other important services"
date: "2021-08-30"
categories: 
  - "aws"
tags:
  - "aws"
  - "cloud"
  - "beginners"
series: [Introduction to AWS]
---

### This is the last blog post about services in AWS  — but definitely not the least!

![cupofcode_blog_main_picture](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_introtoaws5-768x431.png)

Welcome to the fifth(!) blog post in the AWS series. I know, we’ve learned so much by now, it’s exhausting! But don’t worry — as I mentioned in the subtitle, this is the last blog post about the various services! The next one is going to be about _billing and pricing_, and the last one is about _best practices in the cloud_.

We can do it! Don’t give up hope!

![cupofcode_blog_meme_beyonce](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_meme_beyonce.jpeg)

Today I’m going to introduce you to a bunch of services you need to know, at a basic level, in order to pass the [AWS Certified Cloud Practitioner](https://aws.amazon.com/certification/certified-cloud-practitioner/) exam. Here is what we will talk about:

- **Networking:** _Route53, Global Accelerator,_ _VPC,_ and _Direct Connect_
- **Databases:** _RDS, DynamoDB, RedShift,_ and _Elasticache_.
- **Management:** _Cloudwatch, CloudFormation, Systems Manager, Service Health Dashboard,_ and _Personal Health Dashboard_.
- **AI Services in AWS:** Lex, Polly, Transcribe, and Rekognition.
- **Compute:** _Elastic Beanstalk_ and _Lambda_!

Shall we begin?

![cupofcode_blog_learn](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_learn-768x694.jpg)

* * *

## Networking: Route53, Global Accelerator, VPC, Direct Connect

### Amazon Route 53

![cupofcode_blog_1Route53](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_1Route53-768x432.png)

Route53 is Amazon’s DNS. **What is DNS?** Domain Name Server. Here is a cute explanation from [AWS’s website](https://aws.amazon.com/route53/what-is-dns/):

> _All computers on the Internet find and communicate with one another by using numbers. These numbers are known as **IP addresses**. When you open a web browser and go to a website, you don’t have to remember and enter a long number. Instead, you can enter a domain name like cupofcode.blog and still end up in the right place._

> _DNS servers translate requests for names into IP addresses, **controlling which server an end user will reach** when they type a domain name into their web browser._

So, whenever you want to go to a website you give the address and get transferred to the right place. 

![cupofcode_blog_meme_dns](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_meme_dns.jpg)

Fun fact: Why is it called route 53? Because [Route 66](https://en.wikipedia.org/wiki/U.S._Route_66) is the first interstate highway across the US and DNS works on port 53.

Route 53 is a global service, just like IAM and S3. You can use route 53 to direct traffic from all around the world and also use it to register a domain name.

Route 53 is using S3 and therefore is serverless. Because it’s using S3, you should make sure there is an S3 bucket available with the same name you want to use as the domain name. (including the “_.com”_)

* * *

### AWS Global Accelerator

![cupofcode_blog_2GlobalAccelerator](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_2GlobalAccelerator-768x432.png)

_AWS Global Accelerator_ is a service in which you **create accelerators** to improve the availability and performance of your applications for local and global users. You can also **direct traffic** to the optimal endpoint over the AWS global network.

**How Does It Work?** Global Accelerator sends your user’s traffic through AWS’s global network infrastructure, improving your internet user performance by up to 60%. When the internet is congested, Global Accelerators’s automatic routing optimizations will help keep your packet loss, jitter, and latency consistency low.

* * *

### Amazon VPC and AWS Direct Connect

![cupofcode_blog_3VPC_and_directConnect](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_3VPC_and_directConnect-768x432.png)

**_AWS Direct Connect_**‘s purpose is pretty obvious from its name. It is a cloud service solution that makes it easy to establish a **dedicated** network connection from your premises to AWS. AWS Direct Connect is compatible with all AWS services accessible over the internet. This can increase bandwidth throughput and provide a more consistent network experience than internet-based connections.

**_Amazon VPC_** is a Virtual Private Cloud, and it lets you provision a logically isolated section of the AWS cloud where you can launch AWS resources in a virtual network you define: selection of your own IP address range, creation of subnets, and more. It is like a virtual data center in the cloud.

In your VPC you can create, for example, a **public-facing network zone** for your web servers that have access to the internet and place your backend systems (such as databases or application servers) in a **private network zone** with no internet access, which makes them more secure.

#### Connecting On-Premise to Your VPC

There are two ways to do so: VPN and Direct Connect

- **Connect using a VPN:** You can create a **hardware virtual private network (VPN)** connection between your corporate data center and your VPC, leveraging the AWS cloud as an **extension of your corporate data center.**
- **Connect using Direct Connect:** Using AWS Direct Connect, you can establish private connectivity between AWS and your data center, office, or colocation environment, which (in many cases) can reduce your network costs, increase bandwidth throughput and provide a more consistent network experience than internet-based connections.
- **Connect using VPN _over_ Direct Connect:** For the ultimate security, you can use a VPN over Direct Connect. This means that not only do you have a **dedicated line** into AWS but also that all your traffic to and from AWS is **encrypted** over the Direct Connect connection using a VPN.

* * *

We finished the networking section! We deserve a meme break!

![cupofcode_blog_meme_VPN](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_meme_VPN-768x575.png)

* * *

## Databases in AWS

A database is an organized collection of structured information. There are two types of DBs, relational and non-relational, and AWS covers both: The relational DB is called **_RDS_** (Relational Database Service)**_,_** and the non-relational DB is called **_DynamoDB_**.

### Amazon RDS

![cupofcode_blog_4RDS](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_4RDS-768x432.png)

Let’s start by talking about Relational DBs. Visually, they look similar to excel sheets: tables, rows, columns, fields. You interact with your DB using SQL = **Structured Query Language.**

In relational DB, when you add columns it would affect the rest of the rows. For example, if we have a class of students and we keep their details in a DB table, we will have columns like _First name_, _Last name,_ and _Phone number_. **If one day we get a new student in class with a middle name and decide to add a column for that, this field will appear for all kids.** 

Before adding the student:
```
FIRST_NAME | LAST_NAME | NUMBER |
Gal        | Gadot     | +353.. |
```
After adding the student:
```
FIRST_NAME | MIDDLE_NAME | LAST_NAME | NUMBER |
Gal        | N/A         | Gadot     | +353.. |
Taylor     | Alison      | Swift     | +353.. |
```
You can see more examples [here](https://www.w3schools.com/sql/sql_alter.asp).

![cupofcode_blog_taylor](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_taylor.jpeg)

Now, back to RDS:

- Using RDS, you can choose between 6 different DB services: SQL Server by Microsoft, Oracle, MySQL server, PostgreSQL, Amazon Aurora, and MariaDB.
- RDS has 2 key features: Multi-AZ and Read replicas.

#### Multi-AZ for disaster recovery

An EC2 instance connects through a [connection string](https://en.wikipedia.org/wiki/Connection_string) to our RDS DB and Amazon automatically points this connection string to your primary DB. In the event that you will lose your primary DB, Amazon will automatically fail the connection over to your secondary DB in another AZ. To clarify, you don’t need to go and change anything —  it detects the event and changes automatically.

#### Read replicas for high performance

Having read replicas means that your EC2 instance is writing to your primary DB and those entries are replicated to the secondary DBs. You can have up to 5 copies of your primary DB!

Don’t get confused. If you were to lose your primary DB, **there is no automatic failover to your read replica**. Your system is just going to go down because your EC2 instances won’t be able to write to your primary DB.

So what are read replicas useful for? You can set it up so that your EC2 instances do all their writes to your primary DB and then do all their reads from their read replicas. This increases performance because you now got all your EC2 instances doing all their reads from 5 different copies of the DB.

* * *

### Amazon DynamoDB

![cupofcode_blog_5DynamoDB](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_5DynamoDB-768x432.png)

Let’s start by explaining what is a non-relational DB. Non-relational DB is breaking the structure a bit. In this case, we have:

- Collection — which is similar to a table
- Document — which is similar to a row (=entry)
- Key-value pairs — which is similar to fields

How does it look? With the students' example from before, it will look something like this:

```
{
  FIRST_NAME: Gal,
  LAST_NAME: Gadot,
  NUMBER: +353..
},
{
  FIRST_NAME: Taylor, 
  MIDDLE_NAME: Alison,
  LAST_NAME: Swift,
  NUMBER: +353..
}
```

The difference is that here we use _JSON/NoSQL_. That means that:

- The columns in the table can vary
- This will not affect other rows in the DB

So, now that we covered that — Let’s look at the definition of the service from [the official AWS website](https://aws.amazon.com/dynamodb/?trk=ps_a134p000006gADLAA2&trkCampaign=acq_paid_search_brand&sc_channel=PS&sc_campaign=acquisition_IE&sc_publisher=Google&sc_category=Database&sc_country=IE&sc_geo=EMEA&sc_outcome=acq&sc_detail=aws%20dynamodb&sc_content=DynamoDB_e&sc_matchtype=e&sc_segment=536324223042&sc_medium=ACQ-P|PS-GO|Brand|Desktop|SU|Database|DynamoDB|IE|EN|Text&s_kwcid=AL!4422!3!536324223042!e!!g!!aws%20dynamodb&ef_id=CjwKCAjw64eJBhAGEiwABr9o2MzC42pKEqK5--Uq179sqtCZgcrUYVEH2mre8tKAXFqFufMZv7X2IhoCCxQQAvD_BwE:G:s&s_kwcid=AL!4422!3!536324223042!e!!g!!aws%20dynamodb):

> _Amazon DynamoDB is a **key-value** and **document** database that delivers single-digit millisecond performance at any scale. It’s a fully managed, multi-region, multi-active, durable database with built-in security, backup and restore, and in-memory caching for internet-scale applications. DynamoDB can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second._

* * *

### Amazon Redshift

![cupofcode_blog_6RedShift](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_6RedShift-768x432.png)

When I create the image above, I thought to myself: _“Wait a minute… RedShift is under Analytics, what does it do in the DB section?”_. Apparently, Redshift is **Amazon’s analytics database.** RedShift is designed to crunch large amounts of data as a data warehouse.

**Database vs Data Warehouse:** A **database** is a collection of related data that represents some elements of the real world whereas a **Data warehouse** is an information system that stores historical and commutative data from single or multiple sources. The database is designed to record data whereas the Data warehouse is designed to analyze data.

Now, I don’t know if the next part is necessary for the exam, but better safe than sorry: **OLTP vs OLAP**. They differ in terms of the types of queries you will run. OLTP (**O**n**L**ine **T**ransaction **P**rocessing) pulls the entire row as RDS does, and OLAP (**O**n**L**ine **A**nalytic **P**rocessing) pulls in large numbers of records as RedShift does.

### Amazon Elasticache

![cupofcode_blog_7Elasticache](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_7Elasticache-768x432.png)

**_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 DBs.

Elasticache supports two open-source in-memory caching engines: _Memcached_ and _Redis_.

* * *

### To Summarize

- RDS (SQL/OLTP): 6 options for engines, Multi-AZ and Read replicas.
- DynamoDB(NoSQL): a key-value and document database.
- RedShift (OLAP): Used for business intelligence or Data Warehousing.
- Elasticache: Uses _Memcached_ and _Redis_ to speed up the performance of existing DBs (frequent identical queries).

Finished with DBs! It’s time for our meme:

![cupofcode_blog_meme_DBs](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_meme_DBs.png)

* * *

## Management: CloudWatch, CloudFormation, Systems Manager, Health dashboards

### Amazon CloudWatch

![cupofcode_blog_8CloudWatch](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_8CloudWatch-768x432.png)

**_Amazon CloudWatch_** is a service that monitors your AWS resources, as well as the apps that you run on AWS. By _monitoring_ I mean you can see metrics, dashboards, log streams, and alarms.  
CloudWatch will monitor events every 5 min by default, but you can have 1-minute intervals by turning on **_detailed monitoring._**

CloudWatch can monitor things like:

- **Compute**: EC2 instances, ASGs, ELBs, and Route 53 health checks.
- **Storage and content delivery**: EBS volumes, AWS Storage Gateway, and CloudFront.
- **Underlying physical host:** Host level metrics consist of: CPU, Network, Disk, Status check.

A tip for the exam: **_“Billing alarm!”_** is the answer to the question _“how can you get an automatic notification if your account goes over 1000 dollars?”._ The billing alarm lets you set a threshold you are willing to pay and AWS will alarm you when you exceed that amount for the month. You can find it in `AWS console -> CloudWatch -> Billing -> Create Alarm`.

* * *

### CloudFormation

![cupofcode_blog_9CloudFormation](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_9CloudFormation-768x432.png)

**_AWS CloudFormation_** turns infrastructure into code. It is a service that helps you model and set up your AWS resources so that you can spend less time **managing** those resources and more time focusing on your apps that run in AWS.

How does this magic happen? You create a template that describes all the AWS resources that you want (EC2 instances, RDS instances), and CloudFormation takes care of provisioning and configuring those resources for you.

You don’t need to individually create and configure AWS resources and figure out what’s dependent on what; CloudFormation handles all of that.

* * *

### AWS Systems Manager

![cupofcode_blog_10SystemManager](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_10SystemManager-768x432.png)

_AWS Systems Manager_ allows you to **manage** your resources at scale. What does it mean? Let’s say you have an EC2 [fleet](https://www.google.com/search?q=fleet+meaning&rlz=1C1GCEA_enIE926IE926&oq=fleet&aqs=chrome.1.69i59j0i67j46i67i199i291j0i67l2j69i60l3.3742j0j7&sourceid=chrome&ie=UTF-8), and you want to modify something. Should you update 30 instances manually? Ew, of course not. You can run a command to all of them at the same time.

With AWS Systems Manager, you can manage servers running on AWS and in your on-premises data center through a single interface. You can also automate operational tasks for Amazon EC2 instances or Amazon RDS instances.

How does it work? A piece of software is installed on each VM. Here is a diagram from the official AWS website: 

![cupofcode_blog_11SystemManager2](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_11SystemManager2-768x256.png)

* * *

### Health Dashboards: Service vs Personal

![cupofcode_blog_12HealthDashboards](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_12HealthDashboards-768x432.png)

**Service Health Dashboard:** 

A **public** website ([https://status.aws.amazon.com/](https://status.aws.amazon.com/)) that gives you an overview of all regions: This shows all regions and the health of all AWS services in those regions. You can also review all historical information for each AWS service on a per-day basis.

Lastly, it wouldn’t be a proper dashboard without notifications, right? Service Health Dashboard provides [RSS feeds](https://www.google.com/search?q=rss+feed&sxsrf=ALeKk02_BVYwgv8m7Pch6FVDUcJqWm5S6Q%3A1629668673448&source=hp&ei=QcUiYe3mGNWp8gLbjLCoAQ&iflsig=AINFCbYAAAAAYSLTUVHHt03jRz7kH21pA8qeiZexCJPm&oq=rss+feed&gs_lcp=Cgdnd3Mtd2l6EAMyBAgjECcyBAgAEEMyBAgAEEMyBAgAEEMyBAgAEEMyBAgAEEMyBAgAEEMyBQgAEIAEMgUIABCABDIFCAAQgAQ6CAgAEIAEELEDOgcIABCxAxBDUJ0PWNUXYMAYaABwAHgAgAF0iAHWBZIBAzYuMpgBAKABAQ&sclient=gws-wiz&ved=0ahUKEwiti4XzzMXyAhXVlFwKHVsGDBUQ4dUDCAc&uact=5), which you can subscribe to and get immediate notifications if a specific service in a particular region goes down.

**Personal Health Dashboard:**

_AWS Personal Health Dashboard_ provides alerts and remediation guidance when AWS is experiencing events that may impact you. You can also set up alerts for events that might affect your AWS infrastructure.

![cupofcode_blog_13HealthDashboards2](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_13HealthDashboards2-768x432.png)

**What is the difference?**

While the Service Health Dashboard displays the general status of AWS services, Personal Health Dashboard gives you a personalized view into the performance and availability of the AWS services underlying your AWS resources.

* * *

Now that we finished the management section, it’s time for a meme break!

![cupofcode_blog_meme_monitoring](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_meme_monitoring.jpg)

* * *

## AI Services — Lex, Polly, Transcribe and Rekognition

There are more, but according to my research, we only need to know these 4.

![cupofcode_blog_14AiServices](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_14AiServices-768x432.png)

**Amazon Lex** — The power behind Amazon’s Alexa.  
This is a service that allows you to build conversational **chatbots**. These can be powered either via voice or text.

**Amazon Polly** — Converts text to a life-like voice.  
You can choose between different languages, male or female voices, and even the accent you would like the voice to be rendered in.

**Amazon Transcribe** — Converts speech into text.  
Great for generating subtitles or for getting transcripts of interviews, speeches, etc.

- Notice that **_Polly_** and **_Transcribe_** are providing _opposite_ services.

**Amazon Rekognition** — Provides a way of converting images into tags/text.  
You upload a picture and Rekognition tells you what it thinks the image is with a certain degree of confidence.

- Notice that **_Transcribe_** and **_Rekognition_** provide _complementing_ services.

![cupofcode_blog_meme_alexa](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_meme_alexa-768x761.jpg)

* * *

## Compute: Elastic Beanstalk and Lambda

### AWS Lambda

![cupofcode_blog_15Lambda](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_15Lambda-768x432.png)

**_AWS Lambda_** is a compute service where you can upload your code and create a Lambda function. Lambda is **serverless** and **scales out (not up!) automatically**. Also, you can have multiple versions of your code inside Lambda.

Lambda is an **event-driven** compute service that can run your code in response to events. Lambda functions are independent (1 event = 1 function). These events could be changes to data in an S3 bucket or a DynamoDB table.

**Supported languages:** Node.js, Java, Python, C#, Go, PowerShell

#### How is Lambda priced?

1. The number of requests: First 1 million requests (per month) are free and 0.20$ per 1 million requests thereafter.
2. Duration: **Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded up to the nearest 100ms.** The price depends on the amount of memory you allocate to your function. You are charged $0.00001667 for every GB-second used.

**Version control:** You can use version control with Lambda to have multiple versions of your code. You can also roll back your code at any time, restoring previous versions.

**The Shared Responsibility Model:** _You are responsible for_ your code and what version of the programming language is running.  
_Amazon is responsible for_ all hardware, operating systems, and security patching of the entire software stack as well as antivirus.

**To conclude,** Lambda is serverless, event-driven, has automatic continuous scaling and is super cheap. It has version control and a shared responsibility model.

Just for fun, here are examples for AWS Services that we learned in the series and invoke Lambda functions synchronously:

- Elastic Load Balancer
- Amazon Lex
- Amazon CloudFront

* * *

### AWS Elastic Beanstalk

![cupofcode_blog_16ElasticBeanstalk](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_16ElasticBeanstalk-768x432.png)

**_AWS Elastic Beanstalk_** is an easy-to-use service for deploying and scaling web applications and services. It’s called like that because a beanstalk grows quickly.

With Elastic Beanstalk you can provision your EC2 instances, your SGs, your ALBs, and other resources, with the click of a button. It automates everything for you, which leaves you only taking care of the code.

To clarify, that means you can quickly deploy and manage applications in the AWS cloud without worrying about the infrastructure that runs those apps. You simply upload your app, and Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and app health monitoring. Pretty cool, ah?

### Elastic Beanstalk vs CloudFormation

- Elastic Beanstalk and CloudFormation are both FREE services but the resources they provide, such as EC2 instances, aren’t free.
- Elastic Beanstalk is a way to deploy AWS resources. Cloudformation will take us one step further. Elastic beanstalk is limited in what it can provide and is not programmable. CloudFormation can provision almost any AWS service and is completely programmable.

* * *

### That’s it for today!

![cupofcode_blog_meme_simple](https://cupofcode.blog/wp-content/uploads/2021/08/cupofcode_blog_meme_simple.png)

Do you know how many services we learned today? 19! Let’s play a game, I’ll tell you how many were in every category, and you check if you remember the names:

- **Networking:** 4, and that section ended with the Homer Simpson meme, remember?
- **Databases:** 4, and here is a hint: relational/non-relational DB, and two more ;)
- **Management:** 5, and technically one of them is a public website, not a service in AWS console.
- **AI Services in AWS:** 4, and that’s a tough one because this section was short and sweet, not very memorable.
- **Compute:** 2, and those are the last ones you saw, they should be fresh in your memory!

* * *

If you read this, you’ve reached the end of the blog post, and I would love to hear your thoughts! Was I helpful? Do you also use AWS at work? Here are the ways to contact me:  
Facebook: [https://www.facebook.com/cupofcode.blog/](https://www.facebook.com/cupofcode.blog/)  
Instagram: [https://www.instagram.com/cupofcode.blog/](https://www.instagram.com/cupofcode.blog/)  
Email: cupofcode.blog@gmail.com

![[https://cupofcode.blog/](https://cupofcode.blog/)](https://cdn-images-1.medium.com/max/3170/0*vLdjjgtBfeBxj_f8.png)