In this article I go through over 10 compute services provided by AWS
This article is a complementary article to my AWS For Everyone series where I take you step by step to ace the AWS Cloud Practitioner Exam with hands on tutorials and explanations. Make sure to check out my blog for the previous articles and much more!
Elastic Compute Cloud (EC2)
EC2 is a virtual server that you rent and you pay for only what you use. Each EC2 server is called "instance".
EC2 is easy to scale through a feature of "auto scaling" that spins servers on increased requests. It's reliable, thanks to the AWS financial investment. It also works seamlessly with other services in AWS like storage or networking.
Shared Responsibility Model for EC2
Let's Create and Connect To an EC2 Instance!
Connecting through SSH
SSH is a protocol used to securely log into other computers and run commands from the command line. It uses TCP and port 22. The connection is secure and encrypted.
Elastic Load Balancer
A load balancer sits between the servers and the clients and its job is to balance the request load on all server instances so that we don't overload one server. It exposes a single DNS entry point to the application and it automatically balances the load across different instances and different availability zones.
There are different types of Load Balancers inside AWS:
Application Load Balancer (ALB): handles HTTP and HTTPS traffic. Applications in the OSI Networking model operate on layer 7.
Network Load Balancer: handles TCP, UDP and TLS and it's used for ultra high-performance and ultra-low latency.
Let's create an ALB (Application Load Balancer)!
Create ALB Load Balancer
Auto Scaling Group (ASG)
We saw how load balancers route traffic to different instances based on the load, but what if we have a case where at some time in the year we want to have 20 instances running, and in another time of the year we want only 5 running? We want to be able to automatically scale up and down based on demand. That's when ASG comes into play.
You define the minimum and the maximum number of instances to be scaled, and AWS will do the magic for you. ASG allows you to run at optimal capacity which means it's cost effective because it scales only on demand so you pay only what you need. How to implement ASG? Follow the video tutorial below
AWS Elastic Beanstalk
According to Google, Elastic Beanstalk is named after the beanstalk that grew all the way up to the clouds in the English fairy tale Jack and the Beanstalk. That's because for us developers, this works just like magic!
AWS Elastic Beanstalk is a Platform As A Service (PAAS) where you only have to care about the applications and the data. All the infrastructure is handled for you from load balancers to EC2 instances to databases to autoscaling groups and so on.
This magical beanstalk allows you to create an application without worrying about the infrastructure with the minimal amount of effort.
AWS Batch
Batch jobs = workloads that need to happen periodically at a certain time. AWS Batch service is used when you want to schedule events for processing.
Amazon Lightsail
It is meant for people with little to no experience in cloud, and it's good for simple appliations and websites. It's less expensive than building an infrastructure and also the pricing is predictable.
Amazon Workspaces
Replaces on-premises Virtual Desktop Infrastructure (VDI). Employees and contractor can easily applications and desktops from anywhere.
AWS Lambda: Serverless
What is serverless? they are apps running in response to some event on a server you don't have to buy or manage. The server is handled by the cloud provider for you.
In Lambda functions, your responsibility as a customer is the security of the code, storage and access of data and IAM roles and permissions.
Containers on AWS (ECS, EKS, Fargate, ECR)
Amazon Elastic Container Service (ECS)
Used to run, stop, and manage Docker containers in AWS.
It is integrated into many AWS services, including IAM, load balancers, auto scaling, VPC.
Amazon Elastic Kubernetes Service (EKS)
Kubernetes as a Service on AWS. Kubernetes is an open-source container orchestration platform which automates deploying, scaling, management and scheduling of containers.
AWS installs, operates and maintains the Kubernetes cluster/nodes.
If you'd like to have a hands-on beginner Kubernetes tutorial, consider reading my article or watching my YouTube video here:
Two Ways to Run ECS/EKS
Using EC2 where you provision and maintain the EC2 instances that the containers run on.
Fargate: serverless solution where AWS handles the underlying infrastructure.
Amazon Elastic Container Registry (ECR)
Private repository on AWS for Docker images.
ECS, EKS pull images from here to build containers.
I hope this overview tutorial was helpful. Please consider looking into my YouTube channel where I aspire to teach how to build web applications from code to production by making all complex topics easy to understand and digest: