Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Static AWS website using SST

License

NotificationsYou must be signed in to change notification settings

krondorl/aws-static-random

Repository files navigation

AWS Static Random

A simple static website hosted on AWS using SST, serving a random number on each page load.

The site demonstrates deploying a static HTML file to AWS S3 and distributing it via CloudFront.

⚠️ Disclaimer

This project deploys infrastructure to your AWS account.
You are fully responsible for any costs incurred.

Please review all AWS resources created by this project before deploying. Running services likeS3,CloudFront, or other AWS components may result inongoing charges, especially if deployed in a production stage or left running.

The author of this repositorydoes not take responsibility for any unexpected charges or misuse.

To avoid ongoing costs, make sure toremove all deployed resources using:

npx sst remove --stage production

Tech Stack

  • 🛠️SST (Serverless Stack)
  • 🗂️AWS S3 (Static site hosting)
  • 🌐AWS CloudFront (CDN)
  • 🧾Static HTML (with inline JavaScript and inline CSS for simple use case)

Dependencies

Features

  • Deploys a static HTML site to AWS S3
  • Distributes content globally with CloudFront
  • Displays a random number on each page load
  • Simple, minimal configuration

Installation

  1. Clone the repository:
    git clone https://github.com/krondorl/aws-static-random.gitcd aws-static-random
  2. Install dependencies:
    npm install

Set Up IAM User and AWS CLI

Please read these on how to set up user and CLI:

Usage

  • Start local development server:
    npm run dev
  • Deploy to AWS:
    npx sst deploy
  • Remove from AWS:
    npx sst remove --stage production

Commands at a Glance

  • These are the commands you need to use the program.
  • Please learn what each does, before using them.
npm iaws --versionaws configurenpx sst devnpx sst deploy --stage productionnpx sst remove --stage production

🚀 Deployment Info

When deploying your static site with SST, the process includes:

  • Uploading files toAmazon S3
  • Creating or updating aCloudFront distribution

This full setup generally takes8–9 minutes. Most of the time is spent waiting for CloudFront to propagate updates globally. No need to worry — this is normal for first-time or updated deployments.

✅ Good Practice

When you are finished testing the live production website,use the remove script. This way there are (probably) no costs on AWS.

✅ After deletion, double-check:

To confirm everything is gone and you're not billed:

  1. Go toS3 Console – make sure the bucket is gone.
  2. Go toCloudFront Console – check for no distributions.
  3. Go toCloudFormation Console – confirm no active stacks.
  4. CheckBillingCost Explorer in AWS Console.

License

SeeLICENSE file.

Links

History

  • 2025-07-09: Documentation and upload to GitHub.
  • 2025-07-08: First working version.

About

Static AWS website using SST

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp