In this post, I will cover AWS EC2 Instance (Amazon Elastic Compute Cloud), a computing service from AWS.
Amazon Elastic Compute Cloud (EC2) provides scalable computing capacity in the Amazon Web Services Cloud. Using EC2 Amazon eliminates your need to invest in hardware upfront, so you can develop and deploy applications faster.
Why do we use EC2? | How does EC2 work? | Features of Amazon Elastic Compute Cloud | Use cases of EC2 | Amazon Machine Images (AMIs) | Instance Types | How to create ec2 instance in AWS | Steps to Connect Amazon Windows EC2 Instance
What Is Amazon EC2?
Amazon EC2 is a web service that provides secure and resizable compute capacity in the cloud to users. The EC2 allows us to configure the capacity, and it also provides complete control of all your computing resources. An AWS user can increase or decrease instance capacity by using the EC2 web interface or an application programming interface (API). A developer can automatically code an application to scale up and down instances with AWS Auto Scaling. To manage multiple instances, a user can also define an autoscaling policy and group.
Learn With Us: Join our AWS Solution Architect Training and easily understand AWS basics.
Why do we use Amazon Elastic Compute Cloud?
Organizations have to invest a considerable amount in buying hardware components, and managing them is more hectic than buying them, so the EC2 Amazon eliminates the investment in hardware upfront so that you can develop and deploy applications faster. Using EC2, you can launch as many or as few virtual servers as you need, manage storage, and configure networking and security. EC2 enables you to scale up or down to handle changes in requirements or spikes in popularity, reducing your need to forecast traffic.
How does AWS EC2 work?
It’s pretty simple to get up and running with EC2. You have a choice of pre-configured, templated Amazon Machine Images (AMI) to use for a quick launch. Or, if you prefer, you can create your own AMI that contains all of your libraries, data, applications, and relevant configuration settings. EC2 allows you to customize settings by configuring security and network access. Because you can instantly scale your VM environment to address usage spikes or drops, you have the power to control the number of resources being used at any point in time. The service’s elasticity supports the minimized costs of a “pay-for-what-you-use” billing model.
Features of Amazon Elastic Compute Cloud
- Reliable: Amazon EC2 offers a highly reliable environment where the replacement of instances is rapidly possible.
- Secure: Amazon Virtual Private Cloud where EC2 works and provides a secured and robust network to resources.
- Flexible tools: EC2 Amazon provides the tools for developers and system administrators to build failure applications and isolate themselves from common failure situations.
- Inexpensive: EC2 Amazon wants us to pay only for the resources that we use on an hourly basis. It includes multiple purchase plans, such as On-Demand Instances, Reserved Instances, Spot Instances, etc. which we can choose as per our needs.
Use Cases of AWS EC2 Instances
- Hosting environments: Primarily, EC2 is used for hosting a website and application on the cloud. The best part of EC2 Amazon is that it provides a Dynamic and Scalable environment where its compute capacity can grow as per the needs of the application. Companies like Netflix and Reddit are the best proof of EC2 hosting success.
- Backup and disaster recovery: Companies hold EC2 as a medium for performing disaster recovery in both active and passive environments.EC2 turns quickly in case of an emergency, which means businesses have access to the fastest failover with minimal downtime of their application.
- High-performance computing: The EC2 Amazon provides virtualized servers with high-performance networking and high compute power. Organizations like NASA and Pfizer employ high-performance computing using the EC2 Amazon instance.
- Development and test environment: EC2 Amazon is scalable, so now the organization can create and deploy large-scale testing and development environments with unprecedented ease. EC2 eliminates the need in hardware investments and also provides a scalable solution
- Banking and financial sector: These sectors demand maximum scalability and security, and EC2 provides both. Amazon Cloud builds trust by providing highly secure services. Retail and commercial banks, insurance providers, and significant payment platforms rely on AWS.
Amazon Machine Images (AMIs)
Amazon Machine Images, or AMIs, are pre-configured virtual machine images that you can use to launch EC2 instances. You can create and customize your AMIs to save time and effort in setting up new instances. AMIs provide a fast and reliable way to launch instances with your desired operating system, applications, and security settings.
- Amazon Linux 2 / 2023 AMI: This is a pre-configured image of the Amazon Linux operating system that includes commonly used software packages and tools. It comes with AWS CLI built in. It is optimized for running on AWS and can be used for various types of workloads.
- Windows Server AMIs: These are images of the Microsoft Windows Server operating system that can be used to launch instances for running Windows-based applications.
- Database AMIs: These are images of popular databases such as Amazon RDS, MySQL, Oracle, PostgreSQL, and MongoDB. These AMIs can be used to launch instances in a pre-configured database environment.
- Application AMIs: These are images of popular applications such as WordPress, Magento, Drupal, Joomla, and many others. These AMIs can be used to launch instances in a pre-configured application environment.
- Machine Learning AMIs: These are images of Amazon Machine Learning environments such as Amazon SageMaker, TensorFlow, Apache MXNet, and others. These AMIs can be used to launch instances with pre-installed machine-learning libraries and tools.
- Security AMIs: These are images of security-focused software such as firewalls, intrusion detection systems, and vulnerability scanners. These AMIs can be used to launch instances in a pre-configured security environment.
Instance Types
AWS EC2 offers a wide range of instance types to choose from, each designed to meet specific computing needs. These instance types differ in terms of their CPU, memory, storage, and networking capacity. By understanding the different instance types and their capabilities, you can choose the right one to optimize your workload performance and cost-effectiveness.
- General Purpose Instances: These instances are suitable for a wide range of workloads, such as small to medium-sized databases, web servers, and development environments. For example, a t2.micro instance can be used for running a small-scale WordPress website, while an m5.large instance can be used for running a small-scale e-commerce website. Examples of general-purpose instances include t2, m5, and m6g.
- Compute Optimized Instances: These instances are ideal for compute-intensive workloads, such as high-performance computing (HPC), scientific modeling, and data analytics. Examples of compute-optimized instances include c5, c6g, and c6gd.
- Memory Optimized Instances: These instances are designed for workloads that require large amounts of memory, such as in-memory databases, big data processing, and analytics. Examples of memory-optimized instances include r5, r6g, and x1e.
- Storage Optimized Instances: These instances are suitable for storage-intensive workloads that require high disk throughput and low latency, such as data warehousing and log processing. Examples of storage-optimized instances include i3, i3en, and d3.
- GPU Instances: These instances are designed for workloads that require high-performance GPU resources, such as machine learning, deep learning, and graphics rendering. Examples of GPU instances include p3, g4, and inf1.
- High-Performance Computing Instances: These instances are designed for high-performance computing (HPC) workloads that require high network performance and low latency, such as scientific modeling, financial simulations, and engineering simulations. Examples of HPC instances include hpc6id and hpc6a.
8 Steps To Create AWS Windows EC2 Instance
Note: If you don’t have an AWS account, check our blog on how to create an AWS Free Tier Account
Step 1: Log in to your AWS account and go to the EC2 dashboard to launch a new instance.
Step 2: In the Name and Tags step, you can add tags to an instance. Here, tags help you to enable categorizing AWS resources in different ways, for example, by owner, environment, or purpose. For example, you could define a set of tags for your account’s EC2 instances that help you track each instance’s owner and stack level.
Step 3: Select Windows under QuickStart and Select Microsoft Windows Server 2022 Base AMI. You can also select other AMIs as per your needs, but here we are launching a Windows Server, so we have to select the Windows Server 2022 Base AMI.
Step 3: Select the t2.micro instance type. If you want, you may select another instance type, but they are chargeable, so we choose the t2.micro instance type, which is eligible for the free tier and limited resources.
Step 4: Select an existing key pair or create a new one. We will create a new one, enter the name of the Key-pair as Windows-Key, and Create the Key Pair.
Also Read: Our Previous Blog On SDLC Automation
Step 5: Now, keep everything default and click on Launch Instance.
Step 6: Now Click on View all Instances.
Do Check: Our Blog Post on AWS SNS for an overview.
Step 7: Here, you shall see your instance is launching and the Status check is Initializing, wait for some time.
Step 8: Refresh, and you shall see your instance is Up and Running, and the Status check has changed to 2/2 checks.
Also, Visit Our Blog post on AWS Secrets Manager for an overview.
10 Steps To Connect AWS Windows EC2 Instance
Step 1: Firstly, we have to select the Windows instance From the Running Instance of the EC2 dashboard and click on Connect.
Step 2: Here we have to select the RDP (Remote desktop protocol) Client and then Download the RDP File and save it somewhere safe. We then need a password to access the RDP file, so click on Get Password.
Read More: Amazon AWS Elastic Beanstalk.
Step 3: At this step of launching, we have to upload the Key-pair (the key that we created in the earlier step). Click on Browse, then select the key and click on Decrypt Password. This provides us with a usable password.
Step 4: After submitting the key pair, the Password is Generated, copied, and saved somewhere safe.
Step 5: Now open the Remote Desktop File from downloads for launching the Windows instance. If your local computer is a Mac, you will need to download “Microsoft Remote Desktop” from the App Store to be able to open your RDP file.
Read: AWS Certified DevOps Engineer Professional
Step 6: After opening the RDP file, click on Connect to launch the Window instance.
Note: Windows has the Remote Desktop Connection Application pre-installed, so for other OSs like Mac you need to download the Microsoft Remote Desktop app from the Mac App Store.
Check Out: AWS Web App Deployment.
Step 7: Here we have to provide the credentials for accessing the Instance so we have to Enter the Password That we copied in Step 4 and click on OK.
Step 9: Click on Yes.
Step 10: So we have successfully connected to an Amazon Windows Instance, Here we perform all our operations and tasks that we are performing on the normal Windows operating system.
That’s all our Amazon Windows EC2 instance is up and running. To learn more about AWS, please check out our references section.
Download the Sample Guide
Related Links/References
- AWS Free Tier Limits
- AWS Free Tier Account Details
- Overview of Amazon Web Services & Concepts
- How to create a free tier account in AWS
- Storage Options – Amazon Elastic Compute Cloud – AWS Documentation
- AWS Management Console Walkthrough
- AWS Certified DevOps Engineer Professional DOP-C02
- AWS Certified Solutions Architect Associate SAA-C03
Next Task For You
Begin your journey towards an AWS Cloud by joining our FREE Informative Class on Amazon Cloud Free Class by clicking on the below image.
Leave a Reply