Amazon Web Services(AWS) is one of the most comprehensive and widely used cloud platforms worldwide. In today’s age of digital transformations, cloud computing is playing a significant role in the implementation of business goals in real-time. As the need for cloud surges year by year and industry by industry, enterprises are turning their heads towards cloud services, and AWS is the leader of cloud computing. Now it’s quite evident that AWS became a go-to platform. Because there are so many services and so many options to do the same thing, it became really challenging for newcomers and even too few experienced folks to decide which services to choose in particular.
If you are looking to start or just started with AWS with specific demands but don’t know which service can cater to your needs, then this is the post for you. In this post, I will explain the essential AWS core services in the best possible way with the help of a hypothetical example. The motive behind this is to make you introduce to the different services of AWS.
Lets, get started.
If you prefer to watch a video instead of reading a post, check out my video below on this topic.
Hypothetical example
To define the core AWS services briefly, lets consider a hypothetical example where I’m making a web page that requires APIs, a database and analytical tools. In front of all that, I want to set up a static website that hosts a React web application.
During this process, there are different phases of building the base infrastructure, which include Hosting, Domain Routing, API management, Databases, Analytics, Security, Application Orchestration, Monitoring, and AI & ML capabilities. I will explain to you phase by phase the whole architecture and the relevant AWS services simultaneously.
Hosting
The first thing that we have here is the interaction of users with browser to hit the static website, so to make it accessible primarily I need to host the static content of the web app such as to host our javascript files, to host CSS & HTML files, to host SVG files, and to host images all that kind of similar stuff. For this, I need a specific AWS service that can host and store some raw objects of varying sizes.
The best solution from AWS to cater to the above goal is Amazon S3.
Amazon S3
Amazon Simple Storage Service (Amazon S3) is one of the oldest AWS services, and it is an object-level storage service that offers scalability, availability, and security for the content. Can store different objects of different sizes in dedicated storage buckets named S3 bucket. With the help of this, one can easily manage, scale, and access data globally. It is used in use cases, such as data lakes, websites, mobile applications, backup and restore, archive, enterprise applications, IoT, and big data analytics.
Now, after I successfully host and store my static content on Amazon S3, the next objective is to ensure that my users are going to get optimal performance. At the same time, they access it from anywhere in the world, and to do this, I am using the caching layer service called AWS CloudFront.
If you want to learn more about Amazon S3 in depth check out this video.
Amazon Cloudfront
CloudFront is a fast and scalable content delivery network that securely delivers your content to users across the globe with low latency and high transfer speeds. This service co-reside near to the edge caching networking locations of the users. Technically nodes are distributed worldwide via the AWS network to enhance the speed of the content delivery mechanism.
In our case, I am using cloud front in conjunction with S3 to optimize the latency for accessing my web application.
After this, the next immediate step is to manage my Domain Name System (DNS) to point my registered domain to the cloud servers and configure my API routes. To make this happen, the AWS service ‘Amazon Route 53’ comes into the picture.
Amazon Route 53
Route 53 is a highly available cloud Domain Name System (DNS) designed to give developers and businesses a pathway to route users’ interaction to web applications by connecting their registered domains names with IP addresses of cloud servers. It connects user requests with your cloud infrastructures running in AWS environment such as S3 buckets, Amazon EC2, and it is also capable of connecting infrastructure underlying outside of AWS as well.
Till now, everything is smooth and steady. Further from here, I need to host some APIs to call from our website for various use-cases that might be requesting from cloud servers.
Thankfully there are multiple options available to accomplish the same things on AWS but in a whole different way based on my objectives. I am listing few options below.
API Hosting
Amazon API Gateway
It is a fully managed service to create, publish, maintain, monitor, and secure APIs. Using this one can create RESTful APIs or use WebSocket to enable real-time two-way communications. API Gateway handles all the requests involved in accepting and processing up to thousands of API calls to access data, code logic, or functionality from your back-end services.
You may enjoy my article on Web Hosting Options on AWS.
Amazon Lambda
Lambda is a server-less environment on AWS cloud that lets users run their code without the need of provisioning or managing machines to handle workloads. AWS Lambda will scale up or down by provisioning machines on behalf of the user spin up your application ‘just in time’ to serve incoming traffic.
To create a lambda function, I simply build my code and upload it to the AWS Lambda service after creating a Function. After combining this with the API gateway, I can define my own rest endpoints, and with this, I can forward those requests from the API gateway to the lambada functions to create a REST API.
To know more about Amazon Lambda please watch this video.
Application load balancer
ALBs are used to distribute incoming traffic across multiple targets such as EC2 instances, containers, and IP addresses, in one or more Available Zones. It is elastic in nature and can add or remove machines according to the spike in the incoming traffic. This increases the availability of your web application.
Amazon EC2
EC2 is one of the oldest services offered by AWS cloud and is known as Elastic Compute Cloud. Basically one can rent virtual machines from AWS that can spin up or down with a set of resources at any time. It provides instance types to fit any kind of workload. Amazon EC2 comes under infrastructure as service (IaaS), and with this, I can configure my CPU, memory, storage, and networking capacity for my instances.
By using Amazon EC2, I can run my virtual computers to run my code to call API’s, and by combining it with Application Load Balancer, I can delegate all my incoming traffic to my available resources that are in my cluster in order to make my web application available on all kinds traffic loads.
As docker being very popular right now, let’s also look at the ways of hosting your docker images with ECS and its combination with the application load balancer. I already gave information on the Application Load Balancer, so lets jump right into the Amazon ECS.
Amazon ECS
Amazon Elastic Container Service (ECS) is a container orchestration that helps deploy, manage and monitor applications. It is serverless technology from AWS Fargate to make users free from worrying about the management of add-ons and nodes. Amazon ECS also enables businesses to build applications rapidly.
With ECS, I create my docker images, and I upload them to the elastic cloud repository to store my images. I can always ask my ECS to manage my clusters, something like ‘hey! I always want you to make sure five compute nodes of my docker are up’ and ECS will make sure they are up for me. Also, it makes sure to monitor the health checks of my clusters periodically and triggers alarms against them.
I think so far, everything is making sense from the compute perspective, but now we want to add our database layer. Again, we have to make a key decision between two different options: SQL and NoSQL, so lets briefly touch on both of them.
If you’re still struggling to understand the differences between EC2, ECS, and Lambda, check out my video below comparing the three technologies.
Databases
SQL
SQL based databases are typically selected if the end user requires heavily relational style queries. Our data models are represented as a database schema that has a strict type format. SQL databases are still enormously popular, and AWS has a dedicated service to help you build and managed your SQL instances.
Amazon RDS
Amazon Relational Database Service (RDS) is used to set up, scale, operate relational databases in the cloud. It automates administration tasks such as hardware provisioning, database setup, patching, and backups to focus on their application.
I can host my SQL databases like Microsoft SQL Server, PostgreSQL, Oracle Database, and all kinds of standard sql engines.
Amazon Aurora
It is a fully managed relational database service that is compatible with MySQL and PostgreSQL. It is a one-click solution where everything is managed for me, and it ensures that it’s passing health checks regularly to monitor cluster’s health, and it takes backups for me.
Aurora also provides better performance than typical MySQL and Postgres databases, at just a minor cost increase. A whole bunch of benefits come with using Aurora that reduce headaches when compared with a normal database instance that you manage.
Take it from me, if you’re going relational, go with Aurora.
Amazon Redshift
It is a fully managed, petabyte-scale data warehouse service in the cloud that offers business intelligence-based insights to your business and customers. Amazon Redshift is also a SQL database, and it can handle very large queries ranging from gigabytes to petabytes of volume. It performs heavy-duty BI and analytical style queries where one can apply functions like joins or time series analysis.
NoSQL
NoSQL stands for “Not Only SQL,” It is a database management approach that can possess a wide variety of data models, including key-value, document, columnar, graphs, and maps. NoSQL database is generally a non-relational database model that is distributed, flexible, and can scale horizontally.
NoSQL is the opposite of SQL – it emphasizes performance at scale over supporting relational access patterns.
Ther