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.
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.
The best solution from AWS to cater to the above goal is 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.
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.
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.
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.
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 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.
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 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.
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.
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 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.
There are few popular NoSQL databases available in AWS services such as Amazon DynamoDB, Amazon Elastic Cache, Amazon Neptune. However, DynamoDB is by far the most popular.
It is a fully managed NoSQL database service that provides speed and secure performance with seamless scalability. One can easily offload the administrative functions of operating and scaling a distributed database using DynamoDB; since it is fully managed, there is no need to worry about hardware provisioning, setup, configuration, replication, software patching, or cluster scaling.
Nowadays, many businesses are going with DynamoDB for their NoSQL database operations due to its ease of use and its wide applications. Infinite scalability is another attractive feature of DynamoDB especially for companies operating at very high scale.
To know more about Amazon DynamoDB please watch this video
It is a NoSQL-based web service that makes it easy to set up, manage, and scale a distributed in-memory data store or cache environment in the cloud. Amazon ElastiCache works with both the Redis and Memcached engines to perform the key value-based lookup.
Amazon Neptune is a graph-based database service offered by AWS to build and run applications that work with highly connected datasets. Using this, one can build applications such as Knowledge graphs, Identity graphs, fraud detection, recommendation engines, social networking, and where it needs to create relationships between data and quickly query these relationships. It uses graphical structures such as nodes, edges, and properties to operate and store data.
The next phase of our hypothetical ecosystem is Application Orchestration.
Application Orchestration is a broad term that refers to building applications that consist of small components that perform some larger operation as a whole.
As an example of application orchestration, think about a credit card application that needs to process multiple workflow steps: authorizing the transaction, performing the transaction, and confirming the transaction was successful.
Amazon web services two main services for application orchestration, namely Amazon SNS and Amazon SQS
Amazon SNS and SQS
Amazon Simple Queue Service (SQS) and Amazon Simple Notification Service (SNS) are both messaging services within AWS that communicate asynchronously to maintain coordination between different application services.
When thinking of SNS and SQS, think PubSub. SNS is the Pub, and SQS is the sub.
To learn more about Amazon SNS VS SQS please watch this video
AWS Step Functions
AWS Step Functions is a low-code serverless visual workflow service used to orchestrate AWS services. It also lets us combine AWS Lambda functions and other AWS services with building business-critical applications, business processes in a sequential manner, and one can define their workflows using Step Functions’ graphical console in the form of series of event-driven steps.
For example, suppose my web application is an E-commerce store, then using AWS Step Functions. In that case, I can define my workflow in event-driven steps such as placing an order, ensuring the validity of credit cards for payments, and then processing and finalizing the shipments.
Analytics, Big Data & ML
It is a serverless interactive query service used to analyze data in Amazon S3 using standard SQL operations. Amazon Athena is widely used nowadays since users store data in amazon’s cost-effective S3 storage solution to store and use Athena to lookup data.
This is not going to be optimal in terms of performance. Still, it is excellent if I am looking to save a few bucks. The alternative best solution for this goal is Amazon Redshift, a more persistent, reliable analytical tool for performing analysis using SQL on a large set of data.
To learn more about Amazon Athena in depth please watch this video