AWS Builder Center
Deploy Your First Website on AWS for Under $1: A Beginner's Walkthrough

Deploy Your First Website on AWS for Under $1: A Beginner's Walkthrough

A step-by-step guide to hosting a static website on AWS with S3 and CloudFront, with a budget alert set up first so you never get a surprise bill.

Most beginners avoid AWS because they're afraid of the bill. This guide fixes that. You'll deploy a real website, secure it, and set a spending alert before you build anything.
What you'll build: a static website hosted on Amazon S3 and served globally through Amazon CloudFront (HTTPS included).
Expected cost: usually a few cents for a small site, and often $0 within free-tier limits. Free-tier terms change, so check the current AWS Free Tier page before you start.

Step 0: Protect yourself first

Do this before anything else.
  1. Sign in with your root user and enable MFA.
  1. Go to Billing → Budgets → Create budget and choose the Zero spend budget template (or set a $1 budget).
  1. Add your email so you get alerts.
If something goes wrong later, you'll know within hours instead of at the end of the month.

Step 1: Create your website

Create a file named  index.html :
<!DOCTYPE html>
<html>
<head><title>My First AWS Site</title></head>
<body>
<h1>Hello from AWS!</h1>
<p>Deployed with S3 and CloudFront.</p>
</body>
</html>

Step 2: Create an S3 bucket

  1. Open S3 → Create bucket.
  1. Give it a globally unique name (for example  yourname-first-site-2026 ).
  1. Keep Block all public access ON. CloudFront will access the bucket privately.
  1. Click Create bucket, then Upload your  index.html .

Step 3: Create a CloudFront distribution

  1. Open CloudFront → Create distribution.
  1. Set the origin to your S3 bucket.
  1. Choose Origin access control (OAC) so only CloudFront can read the bucket.
  1. Set Default root object to  index.html .
  1. Create the distribution, then copy the bucket policy that CloudFront offers and paste it into your bucket's Permissions → Bucket policy.

Step 4: Test it

Wait a few minutes for the distribution to deploy, then open the CloudFront domain name (it looks like  d1234abcd.cloudfront.net ). You should see your page over HTTPS.

Why this setup?

Choice
Reason
Private bucket + OAC
No public bucket, which is a common cause of data leaks
CloudFront
HTTPS, caching, and fast global delivery
Budget alert first
Catches cost surprises early

Common mistakes

  • Making the bucket public. Not needed. Use OAC instead.
  • Forgetting the default root object. You'll get an "Access Denied" error at the root URL.
  • Skipping cleanup. Leftover resources can keep costing money.

Step 5: Clean up

When you're done experimenting:
  1. Disable, then delete, the CloudFront distribution.
  1. Empty, then delete, the S3 bucket.
  1. Check Billing a day later to confirm nothing is still running.

Summary

You deployed a secure static site on AWS, set a spending guardrail first, and learned the S3 + CloudFront pattern that powers a huge number of real websites. Next steps: add a custom domain with Route 53, or automate deployments with GitHub Actions.

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article