Introduction to Amazon AWS

  1. What Is AWS?



  2. Why Use Cloud Computing?



  3. AWS Global Infrastructure



  4. Key AWS Service Categories

  5. AWS groups its services into several categories:

  6. Understanding the Shared Responsibility Model



  7. Billing and Pricing on AWS



  8. Common Beginner Architectures



  9. Summary of AWS Concepts

  10. Concept Description Examples
    Compute Run applications EC2, Lambda
    Storage Store objects or block data S3, EBS
    Database Managed SQL/NoSQL RDS, DynamoDB
    Networking Virtual networks & routing VPC, CloudFront
    Security User & access management IAM, KMS
    DevOps Monitoring and CI/CD CloudWatch, CodeBuild





Introduction to AWS EC2

  1. What Is Amazon EC2?


  2. Core Concepts


  3. EC2 Workflow: How It All Fits Together

  4. Choose AMI → Choose Instance Type → Configure Networking → Add Storage → Add Key Pair → Launch



  5. Key Concepts Explained in Detail



  6. How EC2 Pricing Works



  7. Connecting to an EC2 Instance

  8. ssh -i mykey.pem ec2-user@<public-ip>
    


    Use your RDP client → enter public IP → use decrypted administrator password
    


  9. Elastic IPs



  10. EC2 Ideal Use Cases


  11. EC2 vs. Other Compute Services


  12. Service Purpose
    EC2 Full control of a virtual machine; flexible but requires management
    Lambda Serverless compute, run functions without managing servers
    ECS / EKS Container orchestration (Docker, Kubernetes)
    Lightsail Simplified VPS hosting, easier than EC2



Introduction to AWS S3 (Simple Storage Service)

  1. What Is Amazon S3?


  2. How S3 Stores Data: Buckets and Objects


  3. Accessing S3


  4. Object Storage vs. Filesystem Storage



  5. S3 Storage Classes

  6. Storage Class Description Use Case
    S3 Standard Highest availability and performance General-purpose, frequently accessed data
    S3 Standard-IA (Infrequent Access) Lower cost, slightly lower availability Backup, disaster recovery, long-term assets
    S3 One Zone-IA Data stored in only one AZ Cost saving for easily reproducible data
    S3 Glacier Very low-cost archival storage Long-term backups, regulatory data
    S3 Glacier Deep Archive Lowest cost storage class Cold archives; retrieval may take hours


  7. S3 Bucket Policies & Access Control



  8. Static Website Hosting with S3




  9. S3 Versioning



  10. S3 Lifecycle Rules



  11. Event Notifications



  12. Use Cases




Introduction to AWS RDS (Relational Database Service)

  1. What Is Amazon RDS?


  2. RDS vs. Running Databases on EC2


  3. RDS Database on EC2
    Fully managed backups, updates, failover You maintain OS, database engine, patches
    Automatic scaling Manual hardware changes
    High availability options built in You must configure replication/failover
    Monitoring through CloudWatch You install/manage your own monitoring stack
    No direct OS access (more secure) Full OS access (more flexibility)



  4. Key RDS Components



  5. High Availability with Multi-AZ



  6. Read Replicas (Scaling Read Traffic)



  7. Backups and Snapshots



  8. RDS Monitoring & Metrics



  9. Connecting to an RDS Database

  10. mydb.abcd1234xyz.eu-central-1.rds.amazonaws.com
    
    psql -h mydb.abcd1234xyz.eu-central-1.rds.amazonaws.com \
         -U myuser -d mydatabase



  11. Aurora: The Special RDS Engine



  12. Pricing Summary




Introduction to AWS DynamoDB

  1. What Is Amazon DynamoDB?


  2. DynamoDB vs. Relational Databases

  3. DynamoDB RDS (SQL Databases)
    Schema-less (flexible attributes) Fixed schemas (columns, constraints)
    Horizontal scaling built-in Vertical scaling mostly (larger DB instance)
    Serverless You manage DB instances
    No joins Joins and complex SQL supported
    Key-value + document model Relational model


  4. Core DynamoDB Concepts

  5. Table: Users
    Partition Key: user_id
    
    Table: Orders
    Partition Key: customer_id
    Sort Key: order_timestamp
    


  6. Reading and Writing Data

  7. # Put an item
    aws dynamodb put-item \
      --table-name Users \
      --item '{"user_id": {"S": "123"}, "name": {"S": "Alice"}}'
    
    # Get an item
    aws dynamodb get-item \
      --table-name Users \
      --key '{"user_id": {"S": "123"}}'
    


  8. Query vs. Scan



  9. DynamoDB Scaling Model




  10. Indexes: GSI and LSI

  11. 
    Table: Orders
    Partition Key: customer_id
    Sort Key: order_timestamp
    
    GSI: lookup by product_id
    LSI: lookup by status within same customer_id partition
    


  12. DynamoDB Streams



  13. DynamoDB Security



  14. Typical Use Cases




Introduction to the AWS CLI (Command Line Interface)

  1. What Is the AWS CLI?


  2. Installing the AWS CLI

  3. # Linux
    curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
    unzip awscliv2.zip
    sudo ./aws/install
    
    # macOS (pkg installer)
    curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
    sudo installer -pkg AWSCLIV2.pkg -target /
    
    # Windows
    Download the installer from AWS website and run it.
    

    aws --version


  4. Configuring the AWS CLI

  5. aws configure
    ~/.aws/
        credentials      # stores keys
        config           # stores region/output profile settings
    


  6. AWS CLI Structure

  7. aws <service> <command> [parameters]
    

    aws s3 ls
    aws ec2 describe-instances
    aws dynamodb put-item
    aws iam list-users


  8. Using AWS CLI Profiles

  9. aws configure --profile dev
    aws s3 ls --profile dev


  10. Common AWS CLI Examples

  11. aws s3 ls
    aws s3 cp file.txt s3://my-bucket/
    aws s3 sync ./site s3://my-bucket/site/

    aws ec2 describe-instances
    aws ec2 start-instances --instance-ids i-1234567890
    aws ec2 stop-instances --instance-ids i-1234567890

    aws dynamodb list-tables
    aws dynamodb get-item --table-name Users --key '{"id": {"S": "1"}}'

    aws iam list-users
    aws iam create-user --user-name alice


  12. Using the AWS CLI with JSON

  13. aws ec2 describe-instances --query "Reservations[*].Instances[*].InstanceId"
    aws ec2 describe-instances | jq


  14. AWS CLI Pagination

  15. aws ec2 describe-instances --no-paginate


  16. AWS CLI with Environment Variables

  17. export AWS_ACCESS_KEY_ID="ABC..."
    export AWS_SECRET_ACCESS_KEY="XYZ..."
    export AWS_DEFAULT_REGION="eu-central-1"



  18. AWS CLI Automation & Scripting

  19. #!/bin/bash
    aws ec2 run-instances \
      --image-id ami-0abcd1234 \
      --instance-type t2.micro \
      --count 1
    


  20. Command Completion

  21. complete -C '/usr/local/bin/aws_completer' aws




Introduction to AWS Lambda

  1. What Is AWS Lambda?


  2. How Lambda Works

  3. Event  →  Lambda Function  →  Response / Side Effect
    


  4. Supported Languages



  5. Basic Lambda Function Structure

  6. def handler(event, context):
        name = event.get("name", "World")
        return {"message": f"Hello, {name}!"}
    

    exports.handler = async (event) => {
        return { message: "Hello from Lambda!" };
    };
    


  7. Triggers: What Can Invoke a Lambda?

  8. ServiceTrigger Example
    S3Run code when a file is uploaded
    API GatewayHandle HTTP requests (serverless API)
    DynamoDB StreamsProcess table insert/update/delete events
    CloudWatch EventsScheduled cron jobs
    SQSProcess messages from a queue
    SNSHandle push notifications/topics
    EventBridgeReact to system-wide events
    KinesisStream processing


  9. Lambda Pricing (Pay Only for Usage)



  10. Execution Environment



  11. Permissions & IAM Roles

  12. Read from S3 → needs s3:GetObject
    Write to DynamoDB → needs dynamodb:PutItem
    Push logs → needs logs:CreateLogStream + logs:PutLogEvents
    



  13. Deploying Lambda Functions

  14. aws lambda update-function-code \
      --function-name myFunction \
      --zip-file fileb://function.zip
    


  15. Logging & Monitoring

  16. aws logs tail /aws/lambda/myFunction --follow



How EC2, S3, RDS, and AWS CLI Work Together to Host an Application

  1. Overview: Hosting an Application on AWS


  2. Role of Each AWS Service in an Application


  3. Typical Full-Stack Architecture

  4. 
                      ┌─────────────────────┐
                      │      S3 Bucket      │ ← stores static files, frontend, uploads
                      └─────────┬───────────┘
                                │
                                ▼
                         CloudFront CDN (optional)
                                │
                                ▼
              ┌────────────────────────────────┐
              │            EC2 Server          │ ← backend/API server
              │   (Node.js, Python, Java, ...) │
              └─────────────────┬──────────────┘
                                │
                                ▼
                     RDS Managed Database
                    (PostgreSQL, MySQL, ...)
    



  5. Step-by-Step Workflow: Hosting an App Using EC2, S3, and RDS


    1. Create and Configure an RDS Database
    2. mydb.abcd1234xyz.eu-central-1.rds.amazonaws.com

    3. Upload Your Website or Assets to S3
    4. aws s3 mb s3://my-frontend-site
      aws s3 sync ./dist s3://my-frontend-site
      
      aws s3 website s3://my-frontend-site --index-document index.html
      

    5. Launch an EC2 Instance
    6. ssh -i mykey.pem ec2-user@ec2-1-2-3-4.compute.amazonaws.com

    7. Deploy Application Code to EC2
    8. sudo yum install git -y
      git clone https://github.com/my/app.git
      cd app
      npm install
      npm start
      
      export DB_HOST="mydb.abcd1234.rds.amazonaws.com"
      export DB_USER="admin"
      export DB_PASS="mypassword"
      

    9. Integrate EC2 with S3
    10. const s3 = new AWS.S3();
      await s3.upload({ Bucket: "my-frontend-site", Key: "upload.png", Body: file });
      

    11. Use AWS CLI for Automation and Deployment
    12. aws ec2 describe-instances
      aws rds describe-db-instances
      aws s3 sync ./public s3://my-frontend-site
      
      #!/bin/bash
      aws s3 sync ./dist s3://my-frontend-site
      ssh ec2-user@server "cd app && git pull && systemctl restart app"
      


  6. How EC2, S3, and RDS Collaborate Inside the App

  7. Browser
       ▲
       │    GET static HTML/CSS/JS
       │
       ▼
    S3 Static Website Hosting
       ▲
       │    AJAX / REST API calls
       ▼
    EC2 Backend Server
       ▲
       │    SQL queries
       ▼
    RDS Database
    



  8. Security and IAM Considerations