Situatie
Amazon EC2 (Elastic Compute Cloud) allows you to create virtual servers in the cloud.
Solutie
1. Sign in to AWS Management Console
- Go to AWS Console
- Log in with your AWS credentials
- Navigate to EC2 by searching for “EC2” in the AWS search bar
2. Launch an EC2 Instance
- Click Launch Instance
- Enter an Instance Name (e.g.,
MyEC2Server
)
3. Choose an Amazon Machine Image (AMI)
Amazon Machine Images (AMIs) are pre-configured operating systems for your instance. Common choices:
- Amazon Linux 2023 (optimized for AWS)
- Ubuntu (popular for developers)
- Windows Server (for Windows-based applications)
Select an AMI based on your needs.
4. Choose an Instance Type
Instance types determine the CPU, memory, and performance of your EC2.
- t2.micro or t3.micro (free-tier eligible, good for small applications)
- m5.large (for medium workloads)
- c5.xlarge (for compute-intensive applications)
Pick one based on your use case.
5. Configure Key Pair (SSH Access)
- Click Create a new key pair (if you don’t have one)
- Name it (e.g.,
MyEC2Key
) - Choose RSA or ED25519 encryption
- Click Create key pair (this downloads a
.pem
file)
⚠ Keep this file safe! You need it to SSH into your instance.
6. Configure Network Settings (Security Group)
- Choose Create Security Group
- Name it (e.g.,
MyEC2SecurityGroup
) - Add Inbound Rules:
- SSH (Port 22) → Your IP (for secure remote access)
- HTTP (Port 80) → Anywhere (for a web server)
- HTTPS (Port 443) → Anywhere (for secure web access)
7. Configure Storage
- Default is 8 GiB (Free-tier), but increase if needed
- Choose GP3 or GP2 (recommended SSD storage).
8. Launch the Instance
- Review your settings
- Click Launch Instance
- Wait for it to initialize (takes a few minutes)
- Click View Instances to see the status.
Leave A Comment?