Introduction to AWS
Amazon Web Services (AWS) is the world’s leading cloud platform, offering over 200 fully featured services from data centers globally. It helps businesses scale without investing in physical infrastructure.
AWS Basics
AWS Management Console
A web-based user interface for accessing all AWS services, creating resources, and monitoring usage. Ideal for beginners to explore.
AWS CLI
The Command Line Interface allows automation of AWS tasks, scripting deployments, and batch operations.
# Configure AWS CLI with credentials
aws configure
Regions & Availability Zones
AWS resources are deployed in specific regions (geographic locations). Each region has multiple Availability Zones (data centers) to ensure redundancy.
us-east-1a ensures high availability.
Compute Services
EC2 (Elastic Compute Cloud)
Virtual servers to run applications, websites, and workloads.
# Launch an EC2 instance
aws ec2 run-instances \
--image-id ami-0abcdef1234567890 \
--count 1 \
--instance-type t2.micro \
--key-name MyKeyPair \
--security-group-ids sg-12345 \
--subnet-id subnet-67890
Lambda (Serverless Computing)
Run code without provisioning servers. Automatically scales based on demand.
# Create a Lambda function
aws lambda create-function \
--function-name MyFunction \
--runtime python3.9 \
--role arn:aws:iam::123456789012:role/execution_role \
--handler lambda_function.lambda_handler \
--zip-file fileb://function.zip
Storage Services
S3 (Simple Storage Service)
Object storage for files, images, backups, and big data.
# Create an S3 bucket
aws s3 mb s3://mybucket
# Upload a file
aws s3 cp myfile.txt s3://mybucket/
EBS (Elastic Block Store)
Persistent disk storage for EC2 instances.
# Create EBS volume
aws ec2 create-volume --size 10 --availability-zone us-east-1a --volume-type gp2
Glacier
Long-term archival storage at very low cost.
Networking & Security
VPC (Virtual Private Cloud)
Create isolated networks for your resources with subnets, route tables, and gateways.
Security Groups & IAM
# List IAM users
aws iam list-users
# Attach Admin policy
aws iam attach-user-policy \
--user-name John \
--policy-arn arn:aws:iam::aws:policy/AdministratorAccess
Database Services
RDS (Relational Database Service)
Managed SQL databases such as MySQL, PostgreSQL, and SQL Server.
DynamoDB
Fully managed NoSQL database for high performance and scalability.
# Create DynamoDB table
aws dynamodb create-table \
--table-name Users \
--attribute-definitions AttributeName=UserId,AttributeType=S \
--key-schema AttributeName=UserId,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
Monitoring & Management
CloudWatch
Monitor logs, metrics, and create alarms for resources.
CloudTrail
Track all API activity for auditing and compliance.
# Enable CloudTrail
aws cloudtrail create-trail --name MyTrail --s3-bucket-name my-bucket
Advanced AWS Concepts
Auto Scaling
Automatically scale EC2 instances based on demand.
Load Balancing
Distribute traffic across multiple servers for availability.
Elastic Beanstalk
Deploy apps without managing infrastructure.
CloudFormation
Define infrastructure as code.
# Deploy CloudFormation stack
aws cloudformation create-stack \
--stack-name MyStack \
--template-body file://template.yaml
Hands-On Exercises
- Launch a free-tier EC2 instance and connect via SSH.
- Create an S3 bucket and upload/download files.
- Write a Lambda function that triggers on S3 upload.
- Configure IAM users with least privilege policies.
- Create a DynamoDB table and perform CRUD operations.