← Back to Portfolio
AWS S3 Static Hosting
Configured and deployed a static website on Amazon S3 with public access enabled.
Steps to Note
- Bucket Name: Always input a bucket name that is DNS-compliant. This ensures the bucket can be accessed via a standard URL and avoids errors. DNS-compliant names are lowercase, can include numbers and hyphens, and must start and end with a letter or number.
- Bucket Policy: A bucket policy is a set of rules that defines who can access the bucket and what actions they can perform. Setting a policy is essential for allowing public read access to your static website files while keeping other permissions secure.
- JSON (JavaScript Object Notation): Bucket policies are written in JSON, a lightweight format for storing and exchanging data. JSON uses key-value pairs to define permissions, making it easy to read and configure programmatically.
- Enable Static Website Hosting: After configuring your bucket and policy, you must enable static website hosting in the S3 settings. This tells AWS to serve the files in your bucket as a website and provides the URL to access it publicly.
Live Website
View the live S3 hosted website:
Visit S3 Static Website
Key Learnings
- Understanding S3 bucket configuration for static hosting
- Managing public access permissions via bucket policy
- Hands-on experience with JSON-based configuration
- Deploying a fully functional static site accessible via a public URL