๐Ÿ”ฌ Hands-On Lab ยท Amazon S3

AWS S3
Lab Presentation

Step-by-step practical guide. 6 hands-on labs โ€” by the end you will have created a fully working S3 bucket with uploads, versioning, pre-signed URLs, and a hosted website.

Lab 1: Create Bucket Lab 2: Upload & Access Lab 3: Pre-signed URL Lab 4: Versioning Lab 5: Lifecycle Policy Lab 6: Static Website
Before You Start
โœ“
Prerequisites โ€” Check These First
Make sure everything is ready before opening the console
๐ŸŒ

AWS Account

Free tier account. Console: console.aws.amazon.com

๐Ÿ‘ค

IAM User Login

Log in as an IAM user, NOT the root account.

๐Ÿ“„

Test Files Ready

Have 2โ€“3 files on your laptop: 1 image, 1 PDF, 1 text file.

๐ŸŒ

Region

Set region to ap-south-1 (Asia Pacific Mumbai) in top-right corner.

Lab 1 of 6
1
Create an S3 Bucket
Your storage container โ€” must be globally unique
What We Are Doing
A Bucket is the top-level container for all your files in S3. Think of it like creating a new account on Google Drive โ€” before you can store anything, you need the account.
  • 1
    Open AWS Console and go to S3Services โ†’ Storage โ†’ S3
  • 2
    Click Create bucket (orange button, top right)
  • 3
    Fill in the settings:
    Settings
    Bucket name     : iimt-lab-yourname-2026  # make it unique โ€” add your name
    AWS Region      : Asia Pacific (Mumbai) ap-south-1
    Block Public Access: ON (all checkboxes ticked)  # keep default
    Versioning      : Disabled  # we will enable in Lab 4
    Default encryption: SSE-S3  # default, automatic
  • 4
    Scroll down and click Create bucket
  • 5
    You should see your bucket in the list. Click on it to open.
Expected Result
Bucket is created and appears in the S3 bucket list. Status shows 0 objects.
Lab 2 of 6
2
Upload Files & Test Access
Upload files, copy the URL, see what happens
What We Are Doing
We will upload a file, try to open its URL in the browser โ€” and see the "Access Denied" error that proves S3 is private by default. Then we make the object public and try again.
  • 1
    Inside your bucket โ†’ Click UploadBucket โ†’ Upload
  • 2
    Click Add files โ†’ Select an image from your laptop โ†’ Click Upload
  • 3
    After upload, click on the file name to open its details
  • 4
    Find Object URL โ†’ Click Copy
  • 5
    Paste the URL in a new browser tab and press Enter
    You should see: AccessDenied error โ€” this is correct!
Why AccessDenied?
The bucket has Block Public Access = ON. No one can access files without authorization. This is correct and secure. To give access, we use a Pre-signed URL (Lab 3) โ€” NOT making the bucket public unless we truly need to.
Lab 3 of 6
3
Generate a Pre-signed URL
Create a temporary URL that expires โ€” share files safely
What We Are Doing
A Pre-signed URL gives temporary access to a private file. After the expiry time, the URL stops working โ€” perfect for sharing files securely without making the bucket public.
  • 1
    Click on the uploaded file โ†’ Look for the Object actions dropdown (top right)
  • 2
    Click Share with a presigned URL
  • 3
    Set the expiry time:
    Pre-signed URL Settings
    Time interval : Minutes
    Duration      : 5  # 5 minutes โ€” short for demo purposes
  • 4
    Click Create presigned URL โ†’ Click Copy presigned URL
  • 5
    Paste in a new browser tab โ†’ The file opens successfully!
  • 6
    Wait 5 minutes โ†’ Try the same URL again โ†’ Now you get AccessDenied โ€” the URL expired!
Classroom Demo Tip
Set expiry to 1 minute for live demo. After 1 minute, open the URL again in front of the class to show it has expired. This clearly demonstrates the time-limited, secure nature of Pre-signed URLs.
Lab 4 of 6
4
Enable Versioning
Keep every version of every file โ€” never lose data
What We Are Doing
We will enable versioning on the bucket, then upload the same file twice. S3 will keep both versions. We will then restore the older version to demonstrate recovery.
  • 1
    In your bucket โ†’ Click Properties tabBucket โ†’ Properties tab
  • 2
    Scroll to Bucket Versioning โ†’ Click Edit โ†’ Select Enable โ†’ Click Save changes
  • 3
    Go to Objects tab โ†’ Click Upload โ†’ Upload the same image file from your laptop again (must be the same filename)
  • 4
    Enable the Show versions toggle (top right of the objects list)
    You should now see 2 versions of the same file โ€” each with a different Version ID!
  • 5
    Click on the older version (it will have an older timestamp) โ†’ Click Download โ†’ This is version 1 recovery!
  • 6
    Now delete the latest version by selecting it and clicking Delete
    The older version automatically becomes the current version.
What You Proved
S3 Versioning keeps all copies of a file. Deleting the latest version does not delete the data โ€” it reveals the previous version.
Lab 5 of 6
5
Create a Lifecycle Policy
Auto-move objects to cheaper storage after a set number of days
What We Are Doing
We will create a rule: "After 30 days, move objects to Standard-IA (cheaper). After 90 days, move to Glacier. After 365 days, delete them." This runs automatically โ€” you don't need to do anything manually.
  • 1
    In your bucket โ†’ Click Management tabBucket โ†’ Management tab
  • 2
    Under Lifecycle rules โ†’ Click Create lifecycle rule
  • 3
    Fill in:
    Lifecycle Rule Settings
    Rule name  : archive-old-files
    Rule scope : Apply to all objects in the bucket
                  # tick the acknowledgement checkbox
  • 4
    Under Lifecycle rule actions โ†’ Tick: Transition current versions of objects between storage classes
  • 5
    Add transitions:
    Transitions
    Transition 1: Standard-IA    after 30  days
    Transition 2: Glacier Flexible after 90  days
    Expiration  : Delete object   after 365 days
  • 6
    Click Create rule
Teaching Tip
Explain to students: "You don't need to remember to move files. AWS will do it automatically based on this rule. This saves money without any manual work."
Lab 6 of 6
6
Host a Static Website on S3
Deploy a real webpage โ€” no server needed
What We Are Doing
We will create a simple HTML file on our laptop, upload it to S3, enable static website hosting, and open the website in a browser โ€” with a real URL!
  • 1
    Create a file called index.html on your laptop with this content:
    index.html
    <html>
      <head>
        <title>IIMT Cloud Lab</title>
      </head>
      <body style="font-family:Arial; text-align:center; padding:60px; background:#fff8f0">
        <h1 style="color:#FF9900">๐ŸŽ‰ My First S3 Website!</h1>
        <p>Hosted on Amazon S3. No server required.</p>
        <p>Built by: YOUR NAME HERE</p>
      </body>
    </html>
  • 2
    Create a NEW bucket for the website (website bucket needs different settings):
    Name: iimt-website-yourname ยท Block Public Access: TURN OFF โ†’ tick the acknowledgement box
  • 3
    Upload index.html to this new bucket
  • 4
    Go to Properties tab โ†’ Scroll to Static website hosting โ†’ Click Edit
    Enable it โ†’ Index document: index.html โ†’ Error document: error.html โ†’ Save
  • 5
    Go to Permissions tab โ†’ Bucket policy โ†’ Edit โ†’ Paste this policy:
    Bucket Policy JSON
    {
      "Version": "2012-10-17",
      "Statement": [{
        "Effect": "Allow",
        "Principal": "*",
        "Action": "s3:GetObject",
        "Resource": "arn:aws:s3:::iimt-website-yourname/*"
                      // replace with your actual bucket name
      }]
    }
  • 6
    Go to Properties โ†’ Static website hosting โ†’ Copy the Bucket website endpoint URL
    Open it in a browser โ€” your website is live!
Expected Result
You should see your HTML page in the browser at a URL like:
http://iimt-website-yourname.s3-website.ap-south-1.amazonaws.com

โœ… A real website โ€” no server, no Nginx, no EC2 โ€” just S3!
Lab Recap
๐Ÿ“‹
What We Did Today โ€” Quick Reference
LabWhat We DidKey Learning
Lab 1Created an S3 BucketBucket name must be globally unique
Lab 2Uploaded file, saw AccessDeniedS3 is private by default
Lab 3Generated Pre-signed URLTemporary, expiring access โ€” no public access needed
Lab 4Enabled VersioningEvery upload is saved; delete = Delete Marker, not permanent
Lab 5Created Lifecycle PolicyAWS auto-moves objects to cheaper storage โ€” saves money
Lab 6Hosted a Static WebsiteS3 can serve a real website with zero server setup

๐ŸŽฏ Ask Students These Questions

AWS Official Docs

Official Documentation โ€” S3 Labs

Step-by-step AWS docs for every lab above. Use these when you're stuck or want to go deeper.

Lab Topic AWS Docs URL
Create a Bucket (Lab 1 & 2)S3/creating-bucket-key.html
Upload Objects (Lab 2)S3/upload-objects.html
Pre-signed URLs (Lab 3)S3/ShareObjectPreSignedURL.html
Enable Versioning (Lab 4)S3/manage-versioning-examples.html
Lifecycle Policy Setup (Lab 5)S3/lifecycle-configuration-intro.html
Static Website Hosting (Lab 6)S3/HostingWebsiteOnS3Setup.html
Free Hands-On Labs AWS Skill Builder โ€” free browser-based S3 labs. First 5 GB S3 storage is always free (Free Tier, never expires).