Ojasa Mirai

Ojasa Mirai

Cloud

Loading...

Learning Level

🟢 Beginner🔵 Advanced
🔧 AWS Account Setup⚙️ AWS Compute Overview🖥️ EC2 Deployment🎯 Elastic Beanstalk⚡ Lambda Serverless📁 S3 Static Hosting🗄️ RDS Relational Database📊 DynamoDB NoSQL💾 ElastiCache Caching📊 AWS Monitoring🔑 AWS Authentication📈 AWS Scaling & Load Balancing🐳 AWS ECS Containers💰 AWS Cost Optimization
Cloud/Aws Deployment/Ec2 Deployment

🖥️ EC2 Deployment

Introduction

Amazon EC2 provides resizable compute capacity in the cloud. Launch instances in minutes and scale capacity as needed.

Key Learning Outcomes

By the end of this lesson, you'll understand:

  • Launching EC2 instances
  • Connecting via SSH
  • Managing security groups
  • Storing data with EBS
  • Auto-scaling instances
  • Monitoring performance

Launching an Instance

# Create key pair
aws ec2 create-key-pair --key-name my-key --query 'KeyMaterial' --output text > my-key.pem
chmod 400 my-key.pem

# Launch instance
aws ec2 run-instances \
  --image-id ami-0c55b159cbfafe1f0 \
  --instance-type t3.micro \
  --key-name my-key \
  --security-group-ids sg-12345678 \
  --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=MyInstance}]'

Connecting to Instance

# Get public IP
aws ec2 describe-instances --instance-ids i-1234567890abcdef0 \
  --query 'Reservations[0].Instances[0].PublicIpAddress' --output text

# SSH into instance
ssh -i my-key.pem ec2-user@<public-ip>

Security Groups

# Create security group
aws ec2 create-security-group \
  --group-name my-sg \
  --description "My security group"

# Add inbound rule
aws ec2 authorize-security-group-ingress \
  --group-id sg-12345678 \
  --protocol tcp \
  --port 22 \
  --cidr 0.0.0.0/0

EBS Volumes

# Create volume
aws ec2 create-volume \
  --availability-zone us-east-1a \
  --size 100 \
  --volume-type gp2

# Attach to instance
aws ec2 attach-volume \
  --volume-id vol-12345678 \
  --instance-id i-1234567890abcdef0 \
  --device /dev/sdf

Key Takeaways

  • **Instances** are virtual servers in the cloud
  • **Key pairs** authenticate SSH access
  • **Security groups** control network access
  • **EBS** provides persistent block storage
  • **Auto-scaling** adjusts capacity dynamically

Next Steps

Learn about Elastic Beanstalk for managed deployments, or explore Lambda.


Resources

Python Docs

Ojasa Mirai

Master AI-powered development skills through structured learning, real projects, and verified credentials. Whether you're upskilling your team or launching your career, we deliver the skills companies actually need.

Learn Deep • Build Real • Verify Skills • Launch Forward

Courses

PythonFastapiReactJSCloud

© 2026 Ojasa Mirai. All rights reserved.

TwitterGitHubLinkedIn