How to Create an EC2 Instance in AWS in 2024
Key Takeaways
This video demonstrates how to create an EC2 instance in AWS and log in via SSH, covering steps from signing into the AWS console to setting up and launching the instance.
Full Transcript
hi and welcome back everyone in this video I'll show you how to very quickly and easily launch an ec2 instance on AWS and then how to connect to your new instance on the terminal using SSH so the first thing you're going to do is go to aws.amazon.com you can remove console here but it will take you to your console anyway and then you can sign into the console if you don't have an account you obviously have to make an account so let's sign in we're going to sign in here and it'll take us to the ec2 dashboard to the AWS dashboard so now we can either click on ec2 here if it shows it in recently visited otherwise we can select it from Services here or we type it in here so we type in ec2 we click on E2 and here the first thing you'll have to do is decide what geographical region you want to be in so right now I'm in US West Oregon and I have an instance running but we can also start launch a new instance by clicking launch instance here and we're going to call it tutorial instance 2 I just made another one we're going to select an operating system I like Ubuntu so this is what I'm going to use I'm going to use Ubuntu Server 2404 long-term support and the architecture I like is a 64-bit x82 architecture so we're going to stick to that and as for instant instance type this depends on what you need your instance for so there's different computers with different you know amounts of memory of CPU power um and so on so if you don't know for sure and you just want to play around you can use the t2 micro which is eligible for free usage if you have a new account you can also to uh instance types so this is if you just type in into Google ec2 instance Ty types this should come up so it's aws.amazon.com E2 instance types and you can look at the different types so we have a T2 micro and it'll tell you everything about the instance you need to know but there's plenty of different types as for pricing you want to go to on demand pricing so ec2 pricing on demand and here you can see for the t2 micro for example let's type it in T2 micro here it'll tell you the cost per hour of the instance running so this is what you'll face and then you can calculate how much that is per day or per month but let's go back here so we're going to stick to this because there's it's 3 tier eligible and it's pretty cheap to run and we're going to create a new key pair so let's click on create new key pair and we're going to call it tutorial key and it's going to create a PM file which we can use in just a second so create pair it created a key file called tutorial key p M we're going to use it in just a minute and then we have to select some network settings so we'll have to at least allow SSH traffic in and at least from the IP from where you want to control the instance so if you type if you select anywhere that's 0.0 it means you can log in from any computer in the world using ssh in a terminal if you want to run a website or web app you'll also want to allow HTTP or https but we're not going to do that now and this is enough for my purposes so hard disk of 8 gabes is fine we're going to launch the instance down here and it's launching the instance so it successfully launched the instance we can now click on instances here and there's two instances one I created before that says running and the new one I created now so you see here tutorial instance two and it's pending because it's still powering up this is the Zone that's in use West 2A and this is the IP so this is fairly important here's the instance type to Now log into the instance on the command line we're going to open a new terminal and the first thing we have to do is we going to we're going to have to change permissions on the PM file we just downloaded so for that we have to do pseudo CH mod 400 those are the permissions we want for the file and then the location of the of of the PM file you just downloaded type your password and now we can do SSH minus I then again the location of the PM file and we're going to type Ubuntu PM Ubuntu that's the username for that type of instance at and then the U the IP of the instance type yes if it's asking and and we're on our instance so this is the instance we just launched on ec2 so you can check it out this is where you are by default you're in home Ubuntu and you can see here your username is auntu and this is the internal IP by Amazon ec2 all right so that's it guys thanks for watching hope you learned something see you next time
Original Description
How to Create AWS EC2 instance & log in via SSH (2024 updated)
In this video tutorial, I will show you how to create an EC2 instance in AWS in 2024. I will walk you through everything from signing into the AWS console to setting up the instance and launching it. I will walk you through the different settings and explain how to pick and instance type for your needs and the costs associated with it.
At the end we will create a key file to log into the instance from the command line via SSH from any Computer and Operating System in the world.
Links:
https://aws.amazon.com/ AWS console login
https://aws.amazon.com/ec2/instance-types/ EC2 instance type descriptions
https://aws.amazon.com/ec2/pricing/on-demand/ EC2 on demand pricing
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Infinite Codes · Infinite Codes · 14 of 39
1
2
3
4
5
6
7
8
9
10
11
12
13
▶
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Why Python is the BEST programming language (Top 10 2024)
Infinite Codes
The Most Fun Programming Language for Beginners!
Infinite Codes
Why Python is the Hottest Programming Language
Infinite Codes
How to delete a repository in GitHub (2024 updated)
Infinite Codes
How to get OpenAI API key / ChatGPT API key (2024 updated)
Infinite Codes
How to clone GitHub Repository (2024 updated)
Infinite Codes
How to Clone GitHub Repository in Visual Studio Code (2024 updated)
Infinite Codes
How to Push Code to GitHub from Visual Studio Code & Create a GitHub Repository (2024 updated)
Infinite Codes
How to Push Code to GitHub on the Command Line (2024 updated) - with Authentication
Infinite Codes
CrewAI Tutorial: Automate your Life with AI Agents
Infinite Codes
Automate your Life with AI Agents (EASY CrewAI Tutorial)
Infinite Codes
I Automated my Instagram with AI Agents - CrewAI Hierarchical Tutorial (Instagram Automation)
Infinite Codes
How I’d learn Machine Learning & AI in 2024 (if I could start over) -- 7-step Roadmap
Infinite Codes
How to Create an EC2 Instance in AWS in 2024
Infinite Codes
How to connect CrewAI to different LLMs (GPT4o, Groq, Llama3, Ollama) - Tutorial & LLM comparison
Infinite Codes
How to Learn Machine Learning in 2024 (7 step roadmap)
Infinite Codes
How to Use Ollama in 3 minutes - Run LLMs locally for FREE (LLama3 & more)
Infinite Codes
How to get a Groq API key - Run LLMs for FREE (LLama3 etc.)
Infinite Codes
What is Groq? - 30 seconds
Infinite Codes
Perplexity AI Tutorial: Why you don't need Google and ChatGPT anymore
Infinite Codes
All Machine Learning algorithms explained in 17 min
Infinite Codes
How Math makes Machine Learning easy (and how you can learn it)
Infinite Codes
15 Machine Learning Lessons I Wish I Knew Earlier
Infinite Codes
Learn Machine Learning Like a GENIUS and Not Waste Time
Infinite Codes
All Machine Learning Concepts Explained in 22 Minutes
Infinite Codes
All Machine Learning Beginner Mistakes explained in 17 Min
Infinite Codes
Neural Networks in 100 seconds
Infinite Codes
Generative AI in 100 seconds
Infinite Codes
GPTs in 100 seconds
Infinite Codes
22 Machine Learning Projects That Will Make You A God At Data Science
Infinite Codes
Transformers in 100 seconds
Infinite Codes
THIS is Why Machine Learning Is Hard For you
Infinite Codes
Deep Learning in 100 seconds
Infinite Codes
30 Machine Learning Facts Most People Get Wrong
Infinite Codes
Gradient Descent in 100 Seconds
Infinite Codes
Computer Vision in 100 Seconds
Infinite Codes
Reinforcement Learning in 100 Seconds
Infinite Codes
32 Machine Learning Facts That Make No Sense
Infinite Codes
What is Machine Learning? Your 2025 Guide to the AI Revolution
Infinite Codes
More on: Linux & CLI
View skill →Related Reads
📰
📰
📰
📰
Hyundai and Kia built a UV system that kills bacteria inside a car while you are sitting in it
The Next Web AI
The latest AI news we announced in June 2026
Google AI Blog
AI-Powered Theodore Roosevelt Is Ready To Answer Your Questions
Forbes Innovation
Krafton agrees to pay Subnautica 2 bonuses after CEO who used ChatGPT to dodge them steps down
The Next Web AI
🎓
Tutor Explanation
DeepCamp AI