- Notifications
You must be signed in to change notification settings - Fork0
Static AWS website using SST
License
krondorl/aws-static-random
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
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
- 🛠️SST (Serverless Stack)
- 🗂️AWS S3 (Static site hosting)
- 🌐AWS CloudFront (CDN)
- 🧾Static HTML (with inline JavaScript and inline CSS for simple use case)
- SST (latest)
- Deploys a static HTML site to AWS S3
- Distributes content globally with CloudFront
- Displays a random number on each page load
- Simple, minimal configuration
- Clone the repository:
git clone https://github.com/krondorl/aws-static-random.gitcd aws-static-random
- Install dependencies:
npm install
Please read these on how to set up user and CLI:
- SST AWS Static Site Example
- SST Static Site Docs
- SST Guide: Configure the AWS CLI
- SST Guide: Create an IAM User
- SST IAM Credentials
- Start local development server:
npm run dev
- Deploy to AWS:
npx sst deploy
- Remove from AWS:
npx sst remove --stage production
- 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
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.
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:
- Go toS3 Console – make sure the bucket is gone.
- Go toCloudFront Console – check for no distributions.
- Go toCloudFormation Console – confirm no active stacks.
- CheckBilling →Cost Explorer in AWS Console.
SeeLICENSE file.
- 2025-07-09: Documentation and upload to GitHub.
- 2025-07-08: First working version.
About
Static AWS website using SST
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.