Learn AWS Deployment Models and EC2 Service

Learn AWS Deployment Models and EC2 Service

Cloud Day Series : Day - 1

Hello Everyone πŸ‘‹,

Welcome to our Day - 1 of the Cloud Day Series. I'm very excited to have you here. In this series, we are learning about some Cloud Deployment models and ....

"Knock Knock"

Ashok: Huh..? Hello !

James: Hi Ashok, I am James and this is William Lean. We Both have a business in this city. we read your last blog about cloud computing and AWS service models. But we're a bit hazy on some of the concepts, especially these 'deployment models' you mentioned that you will discuss in your next blog and how one uses a computer inside another computer. I guess we came at the right time to discuss this πŸ˜‰.

Ashok: Yes, James, and I'm happy to help you both.

William: I actually'm not a big fan of this stuff. But I like to listen...

Ashok: No problem, Although Listening is a good skill for a business person, Okay lets start With AWS Deployment models and EC2 !

James: EC2 !? πŸ€”, can you explain it briefly?

Ashok: Sure I will but firstly let me explain about deployment models.

James: Okay πŸ˜…, go on !!!

Deployment Models in AWS

When we talk about deployment models in AWS, we mainly refer to the ways you can set up your cloud environment.

  • On-premises or Private Cloud: means setting up your own infrastructure in your own or rented physical location.

  • Public Cloud: You utilize the infrastructure provided by cloud providers like AWS.

  • Hybrid Cloud: A combination of both on-premises and cloud.

Both: πŸ™„!?

Ashok: Okay let's take an example:

Let's imagine a city...

  • You're a resident of the city, and while you don’t own an entire city but a block of area, you've built a tall, secure apartment building in this city. Inside your apartment building, you can customize each floor, set up security, and ensure that only your guests can enter. However, the land and the all utilities (like water, and electricity) are still provided by the city's administration. This is how the Public Cloud works. Similarly in AWS, You can use different services that you need for your business and only pay for what you use. It is often called Pay-as-you-go pricing.

  • Now, instead of building in the city, you decide to buy a huge piece of land outside of it. Here, you build your estate with its power supply, water source, and security. Everything on this estate is owned and managed by you. It's isolated from the city, giving you complete control, but also the responsibility of maintenance, security, and development. Any expansion requires you to personally procure and set up resources. We often call this a private cloud or on-premises. Although you have more control over things. It's still become another big responsibility for you.

  • Coming to the Hybrid Cloud, while maintaining the existing resources in the private cloud you can also utilize the public cloud services based on the use case.

James: That sounds easy, but will it be safe and fast?

Ashok: Absolutely. AWS is renowned for its security and speed. It's like if you had a physical shop in the best location in the city, with top-notch security guards.

William: Hmm, it still sounds technical, but I can see the advantages. Though, I think I'm still more comfortable with on-premises. Old habits die hard! 😊

Ashok: And that's perfectly alright, William. Every business has unique needs. James, would you consider Public Cloud ?

James: I'm willing to invest if it gives me peace of mind. And what about this "computer inside a computer" thing?

Ashok: Ah, that's Amazon EC2 – Elastic Compute Cloud. Think of EC2 as a virtual computer. Just like you use a physical computer, EC2 allows you to run a computer, but it's virtual and in the cloud.

William: But why would someone want a virtual computer?

Ashok: That's a Good question, William. Imagine you're launching a new online store. Instead of buying physical servers, and worrying about electricity, cooling, and maintenance, you can simply "rent" a virtual server on AWS using EC2. It's cost-effective and scalable, and you can turn it on or off as needed. You can create your own web server by following a few simple steps.

James: Sounds convenient! So, how do we create one?

Ashok: It's simple, Let me explain to you in a step-by-step manner

EC2 Service in AWS Cloud

1. Log into the AWS Management Console

Login to your AWS Management Console. If you don't have any account you can create it for free.

On the console page, You will find "Services" in the top left corner of the website. Click on it and search for EC2 in the search option.

2. EC2 Service

You will move to the EC2 Service Page by clicking on it. In that page, You will find instances. Click on Launch instances.

You will be directed EC2 web server setup page. in this page, you will do some configurations like name, operating system for your server, instance type, and login system where you can connect to your instance from your local machine by using the key pair.

3. Launch Instance

In our case, I am choosing the Amazon Linux OS AMI(Amazon Machine Image).

4. Instance Types

Coming to Instance types, I am choosing t2.micro which comes with 1 CPU and 1 GiB of Memory. You can also change the instance type based on your requirements.

Key pair is an important thing you have to take care of. if it gets to someone they will have complete access to your virtual machine or EC2.

VPC means Virtual Private Cloud it is your cloud space where you can use different services from AWS and you can create multiple VPCs too. We will discuss more about VPC and Subnets in our next blog. For now, skip it.

5. Security Groups or Firewalls

It is responsible for the security of your server. More simply it acts as a bodyguard to your server to control the traffic. Here we allow SSH to login to your instance from your local machine by using a few software like Putty.

6. Script

In Advance options, You will find the user-data field. In this paste this script. this script is responsible for Installing an Apache web server (httpd), Configuring the web server to automatically start on boot, and Activating the Web server it the end Create a simple web page.

#!/bin/bash
yum -y install httpd
systemctl enable httpd
systemctl start httpd
echo '<html><h1>Hello James From Your Web Server!</h1></html>' > /var/www/html/index.html

7. Creation of Instance

Now, we Successfully created the EC2 instance 🀩. Now go back to the instance page to see our newly created instance.

(I previously created an instance for testing purpose. You can ignore it.) You can see our instance successfully running.

Public IP

In our running instance. You can find the Public IP, copy that IP address, and paste it into your new tab. If you see this response. That means we successfully created our web server.

Changing Instance Types

You can change your instance type, and to do that come back to your instances page. On that page, you will find Actions > Instance settings > Change Instance type. Before that, you have to stop your instance. You can do that by selecting the instance state.

In the change instance type page. I currently have a t2.micro instance now I am moving to t2.small by simply selecting it from the instance type. then click on Apply

That's it, We successfully changed our instance type too.

And make sure to terminate the instance if you no longer need it. If you don't do that it will welcome doors to unnecessary bills to your account.

James: Thanks Ashok, for making it clearer for us.

Ashok: Always here to help and clarify! Cloud computing is the future, but understanding it deeply is key. πŸš€

Conclusion

I hope this illustrative discussion helped clarify AWS deployment models and EC2 for you. If you like it please give a ❀️ and also share your insights. Until next time, keep exploring and innovating!

We will meet in our next Cloud Day Series... Bye!! πŸ‘‹

Let's connect on ...

Twitter

LinkedIn

GitHub

Β