How to Create Your First EC2 Instance in AWS
How to Create Your First EC2 Instance in AWS

How to Create Your First EC2 Instance in AWS

With EC2, you can run all sorts of stuff like apps, websites, and data processing tasks without needing to own and manage physical computers. It's popular because you can easily adjust how much computing power you need, and you only pay for what you use. It's a handy tool for businesses and developers who want flexibility without the hassle of dealing with hardware.

Hopefully, by now, you have an account in AWS; if you still need to, sign up and set up your account before continuing on.

Login: Once you're logged into AWS, navigate to the search bar and search EC2 to navigate to the service.

Launch Instance: Now that you're on the EC2 dashboard, click the orange "Launch Instance" button.

Launch Instance

Name: You'll want to name your new EC2 Instance on the configuration menu.

Amazon Machine Image: Select the Amazon Machine Image (AMI) that best fits your EC2 Instance. Be aware that there are many options, and most come with costs. Since this is a tutorial, we'll select Amazon Linux 2, which is "Free Tier Eligible." When you become serious about making a real EC2 Instance, you'll want to select an image that works for your application. AWS's marketplace offers a large selection of AMIs that will be suitable for your application.

Amazon Machine Image:

Architecture: I'm going to select 64-bit (x86) as the Architecture type for this tutorial, which will give the instance more performance. The main difference between the two is that 64-bit (x86) will give you better performance, and 64-bit (Arm) will be significantly cheaper. I'm not concerned about costs since I will be terminating the instance after I create it, which I strongly recommend you do if you're just practicing; this will keep your fees to a minimum.

Architecture

Instance type: This is where you can select the performance of your instance. The instance type is similar to if you were shopping for a computer. A computer with 1GB of memory will be much cheaper than a computer with 16 GB of memory and a higher-performing CPU. Again, keep in mind that there is an hourly cost to rent these instance types. I'm going to select t2.micro, the free tier eligible type that they offer. Tip: To save money, maybe go with a lower image tier and work up from there. If your budget isn't a problem, select a more efficient image that will be at peak performance.

Create Key Pair

Key Pair: Creating a Key pair is essential to connect to your instance through SSH. Click on Create key Pair, name the key pair, select RSA, and then I suggest selecting to download the .pem; it's compatible with Windows, Macs, and Linux. The .ppk is more compatible with Windows 7 or 8. Click on Create Key Pair; the window will close and download the key to your local computer. Open the file in your notepad and save it somewhere safe.

Network Settings

Network settings: For this tutorial, the VPC network is fine. Under Firewall, we will create a new security group, disable SSH traffic, and select "Allow HTTP traffic from the internet.

Advanced Details

Configure storage: To stay in the free tier eligibility, we'll select 8 gp2.

Advanced details: You can select more options that fit your instance better. For the sake of this tutorial, we won't need to choose anything further, but if you wish, you can add a custom script under User Data. You can even create a simple webpage after you click on "Launch Instance."

#ec2 #cybersecurity #aws #amazonwebservices #cloudsecurity

Akshay Nalawade

Data Analyst | Data Engineer | Python | SQL | Tableau | Big Data | ETL | Apache Spark | Power BI | AWS | Azure. Raw Data to Business Solutions.

1 年

Excellent step-by-step guide on launching an AWS EC2 instance! This comprehensive walkthrough provides a solid foundation for beginners, covering essential configurations like AMI selection, instance type, and network settings. Kudos on including reminders about terminating instances to avoid unnecessary charges. This guide is a valuable resource for anyone getting started with EC2 on AWS. ?? #AWS #EC2 #CloudComputing

要查看或添加评论,请登录

Kurt Hummel的更多文章

社区洞察

其他会员也浏览了