Creating EC2 Instance
Source: Dev.to
Log in to the AWS Management Console
- Open the AWS Management Console.
- Search for EC2 in the services search bar and open the EC2 Dashboard.
Launch a New Instance
- Click Launch Instance.
- Give your instance a name (e.g.,
MyWebServer).
Choose an Amazon Machine Image (AMI)
- This defines your operating system.
- Common choices: Amazon Linux 2, Ubuntu Server, Windows Server.
Select an Instance Type
- Choose the instance type that matches your performance and cost requirements.
Configure Key Pair (SSH Access)
- Create a new key pair or use an existing one.
- Download the
.pemfile – you’ll need it to SSH into the instance.
Configure Network Settings
- Choose a VPC and Subnet appropriate for your deployment.
Configure Storage
- Adjust storage size and type as needed for your workload.
Launch the Instance
- Review your settings and click Launch.
Connect to Your Instance
For Linux/macOS (SSH)
chmod 400 path/to/your-key-pair.pem
ssh -i path/to/your-key-pair.pem ec2-user@
For Windows
- Decrypt the admin password using your key pair.
- Download the Remote Desktop file and use the decrypted password to connect.
Your EC2 Instance Is Ready
You can now install software, deploy applications, or configure the instance as a server.