AWS Practical: Create S3 Bucket and Launch EC2 Instance
Introduction
Amazon Web Services (AWS) provides cloud services like storage and virtual servers. In this practical, we will:
- Create an S3 bucket and upload files.
- Launch an EC2 virtual machine instance.
Part 1: Create an S3 Bucket and Upload Files
What is S3?
Amazon S3 (Simple Storage Service) is an object storage service used to store files such as documents, images, and videos in the cloud.
Step 1: Login to AWS Console
- Go to https://aws.amazon.com
- Login to AWS Management Console
Step 2: Create an S3 Bucket
- Search for S3 in services.
- Click Create bucket.
- Enter:
- Bucket name (must be globally unique)
- Choose region
- Keep default settings (or adjust permissions if needed).
- Click Create bucket.
Step 3: Upload Files to S3
- Open the created bucket.
- Click Upload.
- Select files from your computer.
- Click Upload.
Files are now stored in the cloud.
Part 2: Launch an EC2 Virtual Machine
What is EC2?
Amazon EC2 (Elastic Compute Cloud) provides scalable virtual servers in the cloud.
Step 1: Open EC2 Service
- In AWS Console, search for EC2.
- Click Launch Instance.
Step 2: Configure Instance
- Enter instance name (Example: MyServer).
- Choose Amazon Machine Image (AMI)
- Example: Ubuntu Server 22.04
- Choose instance type
- Example: t2.micro (Free tier eligible)
- Create or select a key pair (for SSH login).
- Configure security group:
- Allow SSH (Port 22)
- Allow HTTP (Port 80) if hosting website
Click Launch Instance.
Step 3: Connect to EC2 Instance
Once running:
- Select instance → Click Connect.
- Use SSH command:
ssh -i your-key.pem ubuntu@your_public_ip
Now you are connected to your VM.
Summary Table
| Service | Purpose |
|---|---|
| Amazon S3 | Cloud file storage |
| Amazon EC2 | Virtual machine hosting |
Advantages
S3
- Highly durable storage
- Scalable
- Pay-as-you-go
EC2
- Flexible compute capacity
- Scalable
- Multiple OS support
Conclusion
In this practical, we successfully created an S3 bucket for cloud storage and launched an EC2 instance to run a virtual server. This demonstrates AWS storage and compute services working together in a cloud environment.
Viva Questions with Answers
1. What does S3 stand for?
Simple Storage Service.
2. What is EC2 used for?
To launch virtual servers in the cloud.
3. What is required to connect to EC2?
A key pair (.pem file).
4. Which port is used for SSH?
Port 22.
5. Is S3 scalable?
Yes, it is automatically scalable.
