Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nirmalnaveen20/s3-static-website
DevOps Mini Project
https://github.com/nirmalnaveen20/s3-static-website
aws deployment s3 static-website
Last synced: 2 days ago
JSON representation
DevOps Mini Project
- Host: GitHub
- URL: https://github.com/nirmalnaveen20/s3-static-website
- Owner: NirmalNaveen20
- License: other
- Created: 2023-12-05T03:19:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-05T07:25:26.000Z (about 1 year ago)
- Last Synced: 2023-12-06T07:23:24.824Z (about 1 year ago)
- Topics: aws, deployment, s3, static-website
- Language: CSS
- Homepage: http://aws-nirmal-project-s3.com.s3-website-us-east-1.amazonaws.com
- Size: 635 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
# Static Website Hosting on AWS S3 Bucket
A brief description of what this project does and who it's for
## Overview
This repository demonstrates how to host a static website on AWS S3 (Simple Storage Service) and enable static web hosting. The provided code and configuration files make it easy to deploy a static website quickly and efficiently.
## Features
Before you begin, ensure you have the following:
- An AWS account with appropriate permissions to create and manage S3 buckets.
- AWS CLI installed and configured with the necessary credentials.## Getting Started
Follow these steps to set up and deploy your static website:
### 1.Clone the repository to your local machine:
```
git clone https://github.com/NirmalNaveen20/s3-static-website.git
```### 2.Customize your website content:
Replace the contents of the index.html, style.css, and any other necessary files in the public directory with your own website content.
### 3.Create an S3 bucket:
```
aws s3api create-bucket --bucket your-unique-bucket-name --region your-preferred-region
```Make sure to replace your-unique-bucket-name with a globally unique name for your bucket and your-preferred-region with the AWS region where you want to create the bucket.
### 4.Upload your website files to the S3 bucket:
```
aws s3 sync public/ s3://your-unique-bucket-name
```### 5.Enable static website hosting on the S3 bucket:
```
aws s3 website s3://your-unique-bucket-name/ --index-document index.html
```
Update the index.html with the actual name of your main HTML file if it's different.### 6.Access your static website:
After a few minutes, your website should be accessible at the following endpoint:
`http://your-unique-bucket-name.s3-website-your-preferred-region.amazonaws.com`
Replace your-unique-bucket-name and your-preferred-region with the appropriate values.
### Cleanup
To delete the S3 bucket and associated resources:
```
aws s3 rb s3://your-unique-bucket-name --force
```Note: Deleting a bucket will permanently remove all objects stored in the bucket.