02 / STEP-BY-STEP DEPLOYMENTPAGE 3 OF 4

Connect to the server and install Nginx

We are now working on the remote Linux computer in AWS, not on your laptop. Commands typed in the SSH session run on EC2.

Step 5 — Connect using SSH

On macOS or Linux, open Terminal. On Windows, use OpenSSH in PowerShell or Windows Terminal (or use the approved browser-based EC2 Instance Connect method if supported by your workshop).

RUN ON YOUR LAPTOP — REPLACE PATH + IP
chmod 400 ~/Downloads/aws-class-key.pem
ssh -i ~/Downloads/aws-class-key.pem ec2-user@YOUR_PUBLIC_IP

• Replace YOUR_PUBLIC_IP with the actual public IPv4 address displayed in your EC2 instance details.

• Ensure the key path matches where your .pem file was saved (e.g. ~/Downloads/aws-class-key.pem).

• The default SSH username for the Amazon Linux 2023 AMI is ec2-user.

• chmod 400 sets the required read-only permissions on macOS and Linux. Windows PowerShell handles key ACL permissions through file properties.

IF SSH FAILS • 6-POINT CHECKLIST

If your connection times out or rejects your key, verify each item below before asking a mentor:

  • 1. Check that the file path to aws-class-key.pem is exact and accessible.
  • 2. Confirm the key pair matches the one selected during instance launch.
  • 3. Verify the security group inbound rule permits port 22 from your current IP address.
  • 4. Confirm the instance state is Running and status checks report 2/2 passed.
  • 5. Verify you copied the Public IPv4 address, not the Private IPv4 address.
  • 6. Confirm the username is ec2-user.
Never send your private key to a mentor or peer. Share only the terminal error message and non-sensitive details.

Step 6 — Install Git and Nginx on EC2

Now that you are connected to the Amazon Linux terminal, install the package dependencies and activate the Nginx web server daemon:

RUN INSIDE THE SSH SESSION
sudo dnf update -y
sudo dnf install -y git nginx
sudo systemctl enable --now nginx
sudo systemctl is-active nginx
  • •
    sudo dnf update -y: Updates available installed packages according to Amazon Linux 2023 repositories.
  • •
    sudo dnf install -y git nginx: Installs Git (for cloning the starter code) and Nginx (the web server daemon).
  • •
    sudo systemctl enable --now nginx: Configures Nginx to start automatically at system boot and launches it immediately.
  • •
    sudo systemctl is-active nginx: Verifies whether the service is running. The expected terminal output is active.

Note: These commands are specifically tailored for Amazon Linux 2023 using the dnf package manager. Do not substitute Ubuntu's apt commands.

Test Nginx Locally on EC2

Before copying your website files, check that Nginx responds to HTTP requests on the EC2 instance itself:

TEST NGINX LOCALLY ON EC2
curl -I http://localhost

This request tests Nginx from inside the server. A successful response includes an HTTP status header such as HTTP/1.1 200 OK.

A successful local curl test proves the Nginx daemon is running, but does not prove public internet reachability. Public browser access will be verified in Step 8.

SCREENSHOT TARGETS 4 + 5 • WORKSHOP EVIDENCE

Capture the connected Amazon Linux terminal and a terminal showing the Nginx service as active together with the local HTTP test. Never include passwords, private keys, authentication tokens, or other secrets.

SSH session connected to the expected Amazon Linux instance.
Nginx service reports status active.
Local HTTP request (curl -I http://localhost) returns an HTTP 200 OK header.
Full-Scale AWS Deployment BlueprintArchitecture Map

Interactive end-to-end cloud pipeline: from Git starter repository to live Nginx server.

AWS Cloud Launchpad Architecture and Deployment Blueprint
EC2 • VPC • NGINX • GIT • SECURITY GROUPS
Source: src/public/assets/image.png
AWS LAUNCHPAD 2026•Hosted by AWS SBG PSIT