AWS - My Learnings

AWS - My Learnings

Let's start with some questions...

What is Cloud?

image.png

What is Cloud Computing?

Cloud computing is:

  • Storing data/applications on remote servers
  • Processing data/applications from servers
  • Accessing data/applications via the internet

What is the hype about the cloud?

There are certain reasons for this:

  1. Cost effectiveness 🤑
    Cloud can certainly be cost-effective as organisations only pay for the resources they use. It is cheaper compared to on-premises hardware.

  2. Fast deployment
    Companies don’t need to spend time configuring hardware, maintaining systems, or upgrading physical servers. This means, without investing a huge amount of time and resources, companies can have faster access to world-class infrastructure, enterprise-class security, and reliable entry to their technology.

  3. Scalability with business demand ⚙️
    Cloud provides flexibility in how companies grow in other ways, including the use of many different technologies and how they complement each other. With the cloud, companies can select from a variety of options—such as data services, storage options, and operating systems, instead of locking themselves into previously purchased on-premises solutions.

Let's get into it!

Service Models

image.png

  1. SaaS
    Software as a service (or SaaS) is a way of delivering applications over the Internet, as a service. Instead of installing and maintaining software, you simply access it via the Internet, freeing yourself from complex software and hardware management.
    Eg. Slack, Zoom

  2. PaaS
    Platform as a Service (or PaaS), is a cloud computing model that provides customers with a complete cloud platform—hardware, software, and infrastructure for developing, running, and managing applications without the cost, complexity, and inflexibility that often comes with building and maintaining that platform on-premises.
    Eg. AWS Lamba, Heroku image.png

  3. IaaS
    Infrastructure as a service (or IaaS) is a type of cloud computing service that offers essential computing, storage, and networking resources on demand, on a pay-as-you-go basis.
    Eg. Digital Ocean, AWS

What is AWS?

Amazon Web Services(AWS) is a secure cloud services platform, offering computing power, database storage, content delivery and other functionality to help the business scale and grow.

If you are a beginner AWS offers its free tier which is accessible to you for 12 months with many services but of course with some limitations on hours and the amount of memory or storage.

For setting up your free tier, you can refer to this video youtu.be/rkKvzCskpLE

This is what your amazon console will look like👇

image.png

What is IAM?

  • AWS Identity and Access Management (AMI) is a web service that helps you securely control access to AWS resources for your users.
  • You use IAM to control who can use your AWS resources(authentication) and what resources they can use and in what ways.

So in a company, you don't need 2-3 AWS accounts, you can just have one AWS account and can have multiple people use that with of course some restrictions, for example, you can define that the developers can only have access to EC2 instances and the S3 bucket.

image.png

NOTE: You should never work from your root account

What is an Instance?

An instance is a virtual server for running applications on Amazon's EC2. It can also be understood as a tiny part of a large computer, a tiny part which has its own Hard drive, network connection, OS etc. But it is actually all virtual.

image.png

Types of Instances

General Purpose Instance
For applications that require a balance of performance and cost. Where you need a prompt response, cost-effectiveness, and less pricing.
Eg: E-mail Response Systems

Compute Instances
For applications that require a lot of processing from the CPU.
Eg: Analysing Streaming Data

Memory Instances
For applications that are heavy in nature, therefore require a lot of RAM.
Eg: Applications that need multi-tasking

Storage Instances
For applications that are huge in size or have a dataset that occupies a lot of space.
Eg: Large sized applications

AWS Compute Domain

Following are the three main services in the compute domain

image.png

What is EC2?

  • Amazon Elastic Compute Cloud, EC2 is a web service from Amazon that provides resizable computing services in the cloud.
  • Using Amazon EC2 eliminates your need to invest in hardware upfront, so you can develop and deploy applications faster.
  • You can use Amazon EC2 to launch as many or as few virtual servers as you need, configure security and networking, and manage storage.

This is the page for EC2, where you can launch an instance and also see the previous ones which are running and so on.

image.png

After clicking on the orange coloured, "Launch Instance" button, you will be redirected to another page, where you can choose customised settings.

image.png

What is Elastic Beanstalk?

AWS Elastic Beanstalk is a PAAS service used for deploying and scaling web applications and services developed with Java, .NET, PHP, NODE.js etc on familiar servers such as Apache, Ngnix, Tomcat and IIS.

Features of AWS Elastic Beanstalk

image.png

How it works?

AWS Elastic Beanstalk deploys web applications so that you can focus on your business.

image.png

What is AWS Lambda?

  • AWS Lambda is a 'serverless' computing service, meaning the developers, don't have to worry about which AWS resources to launch, or how will they manage them, they just put the code on lambda and it runs, it's that simple!
  • Although Lambda can only be used to execute background tasks.
  • AWS Lambda is an automated version of EC2

Cloud Storage

image.png

S3 service

  • Amazon Simple Storage Service (Amazon S3) has a simple interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web.
  • Customers of all sizes and industries can use Amazon S3 to store and protect any amount of data for a range of use cases, such as websites, mobile applications, backup and restore, archive, IoT devices, and big data analytics.

This is the page for S3 where all the buckets are visible👇

image.png

Buckets and Objects

image.png

  • So you can think of a bucket as a container which will store the data which are objects in this case.
  • Every data comes with metadata which is Data with Key and version ID.

Cross Region Replication

image.png

  • Cross-Region replication enables automatic, asynchronous copying of objects across buckets in different AWS regions.
  • Buckets configured for cross-region replication can be owned by the same AWS account or by different accounts.

What is AWS CloudFront?

Amazon CloudFront is a web service that speeds up the distribution of your static and dynamic web content, such as. HTML, .css, .js and image files to your users.

How AWS CloudFront Delivers Content?

  • So basically what happens is, when a user sends a request, let's say to fetch a particular set of data from a server.
  • So first the request goes to the edge location to check, whether the data is cached there, if yes then the request can be fulfilled at a faster rate.
  • But if not then the request goes to the original server and then fetches the information.

image.png

Amazon CloudWatch

Amazon CloudWatch is the component of AWS that provides real-time monitoring of AWS resources and customer applications running on amazon Infrastructure.

There are basically two types of monitoring:

  • Basic Monitoring
    It's free and polls every 5 mins with few metrics.
  • Detailed Monitoring
    It's charged and Polls every 1 min with a wide range of metrics.

What does CloudWatch do?

  • Collects and tracks key metrics
  • Collects, monitors and stores log files
  • Create alarms and sends notifications

How does CloudWatch works?

image.png

Snapshots and AMIs

AMI

  • Now that we know what an EC2 instance is, suppose you want 5 more EC2 instances which are the copy of the first instance.
  • For this purpose, you can configure your first EC2 instance and then can form images of it which are called AMIs (Amazon Machine Image).

Snapshot

  • Snapshots only capture data that has been written to your Amazon EBS (Elastic BeanStalk) volume at the time the snapshot command is issued.

Let's see the difference between the two of them

An EBS snapshot is a backup of a single EBS volume. The EBS snapshot contains all the data stored on the EBS volume at the time the EBS snapshot was created.

An AMI image is a backup of an entire EC2 instance. Associated with an AMI image are EBS snapshots. Those EBS snapshots are the backups of the individual EBS volumes attached to the EC2 instance at the time the AMI image was created.

Autoscaling

image.png

  • As you can clearly understand from the image above that there is a website/application which suddenly becomes a hit overnight and a large no. of users are accessing this website hence the server becomes overburdened.
  • So say around 300 people are coming in and it sees there that you need three servers to handle those kinds of requests, it will do that automatically.
  • Here comes the role of autoscaling, it actually analyzes the kind of load which is coming in and it deploys the servers according to that.

Also here comes the role of AMI, because the new servers have to be the exact copy of the first server to be precise.

image.png

Load Balancer

A load balancer is a device that acts as a reverse proxy and distributes network application traffic across a number of servers.

image.png

Let's understand this scenario

image.png

  • In Classic Load Balancer all the traffic gets distributed equally in all the servers.

  • In application Load Balancer what happens is: Now imagine that these servers (Yellow Ones)👇 manage the image processing part.

image.png

  • And these servers (Orange Ones)👇 manage the blog section.

image.png

  • A user comes to your website, logs in and enters a URL, xyz.co/image.
  • Your load balancer will see, that the user is asking for image content so the user should go to the Yellow Servers.
  • And if the user enters xyz.co/blog, the user will be redirected to the blog managing i.e the Red Servers.

  • This is all done by the load balancer

Amazon Redshift

It is a massively parallel, column-oriented database deployed on the AWS platform that makes it simple and cost-effective to analyse all your data across your data warehouse and data lake.

  • It's easy to set up, deploy and manage
  • Scales quickly to meet up your needs
  • 10x better & faster performance

image.png

  • Cost-effective
  • Allows querying from data-lake

So here are the things which I learned from Amazon Web Services (AWS) and trust me there are gazillions of things in AWS which was not practically possible to include in one blog.

As a Kubernetes user and a DevOps admirer, my next target would be to use and learn about CivoCloud which offers Production-ready Kubernetes, in seconds