Project 1: inspect the files, then open EC2
Mentor-led build • Estimated 35–45 minutes. We will serve a static website using Amazon EC2, Amazon Linux 2023, and Nginx.
Project 1: Files the Browser Needs
A static website consists of client-side assets served directly to the visitor's browser. The diagram below shows how source files stored in GitHub will map to Nginx's default web directory on the EC2 server:
Nginx looks for index.html in /usr/share/nginx/html/ by default. Copying files directly to this folder makes the site immediately available to HTTP visitors.
Step 1 — Inspect the repository
Before provisioning cloud infrastructure, inspect the source files you are preparing to deploy:
- 1Open the Project 1 repository using the supplied GitHub link below.
- 2Select the
gh-pagesbranch in the GitHub branch switcher. - 3Confirm that the starter website files include
index.html,style.css,script.js,logo.png, andbackground.jpg. - 4Read
index.htmland identify which CSS, JavaScript, and image files it references. - 5Understand that the public repository provides the source files that will be cloned and copied to the server in Step 7.
Important: Always verify filenames and paths before copying. If the repository structure ever changes, your deployment commands must match the actual file paths.
index.html is the default entry page of a website. When a visitor opens your domain or IP address, the Nginx web server automatically returns this file. If this file or its linked stylesheet, script, or image assets are missing, the website will appear broken or incomplete.
Step 2 — Sign in and launch an EC2 instance
Open the EC2 Console in the AWS account approved for the workshop. Select the workshop Region, for example Mumbai (ap-south-1) if that is the Region chosen by the organiser. Keep the same Region throughout the exercise.
| Setting | What to Select |
|---|---|
| Name | aws-class-website |
| Application image | Amazon Linux 2023 (AMI) |
| Instance type | A small type approved by the organiser and appropriate to the workshop budget (e.g. t2.micro or t3.micro). |
| Key pair | Create a key pair named aws-class-key, unless one has already been provisioned for the lab. Download and securely store the .pem private key. |
| Network | Use a suitable subnet with public IPv4 connectivity for this public website exercise. |
| Storage | Keep the instructor-approved test configuration (default 8 GiB gp3). Do not unnecessarily increase storage. |
Store the private .pem file securely. Do not email it, upload it to GitHub, share it in a chat, or include it in a screenshot.
A downloaded private key should be treated as an absolute secret. If you lose access to it, follow the approved recovery or reconnection process rather than searching for a way to re-download the same private key.
Capture the EC2 Launch Instance page showing the selected operating system (Amazon Linux 2023), instance type, and key-pair name. Do not capture private keys, credentials, account secrets, or other sensitive information.
