Host Website Using Amazon Simple Storage Service (S3)

Hosting a website will help to store workloads on a simple storage service with bucket versioning, data replication, Cross-origin resource sharing, and Lifecycle policies.

Pre-requisites :
  1. Basic Knowledge of Amazon Simple Storage Service (S3)
  2. You need an AWS account with an internet connection.
  3. Have an AWS account or can sign in using the Free Tier of AWS.
Steps :
  1. Create S3 bucket with domain name as www.websitename.com
  2. Create a file named index.html and upload file in bucket.
  3. Go to permissions and enable public access in Access control list (ACL) for object and object ACL as Read.
  4. Make sure to enable bucket versioning so that if incase you upload any updated file in the bucket, it should not override and delete the previous file.
  5. Go to bucket (www.websitename.com)> properties > static website > enable > click on host static website > fill index.html in index document and click on save changes.
  6. You'll get a bucket website endpoint URL which you'll need to fill on the domain purchasing website (like Godaddy.com).
  7. There are more features which you can enable such as data lifecycle which will help you to decide what will be the access frequency for your data and accordingly you can set to Standard, Standard IA, Intelligent tie ring, Glacier or Deep Glacier (Always remember that data can be transferred only from warm to cold).
  8. Data lifecycle often helps in cost optimization.
Screenshot from Amazon Console

Congratulations, you've successfully hosted Website on Amazon Simple Storage Service (S3).

Terminologies :

Bucket Versioning : Bucket versioning is basically keeping different of objects in the same buckets which prevent from accidental deletion proactively.

Data Replication : It helps to keep multiple copies of data in same or different region which avoid and helps in different situation like data loss or where we need to retrieve data such as disaster recovery.

CORS : Cross origin resource sharing is basically resources from one domain can interact with different domain.

Storage Classes : It is basically the access frequency for the data which we'll be uploading by case to case basis.

P.S : This is the easiest way to implement that worked for me.


Host Website Using Amazon Simple Storage Service (S3) was originally published in Towards AWS on Medium, where people are continuing the conversation by highlighting and responding to this story.

Namaste Devops is a one stop solution view, read and learn Devops Articles selected from worlds Top Devops content publishers inclusing AWS, Azure and others. All the credit/appreciations/issues apart from the Clean UI and faster loading time goes to original author.

Comments

Did you find the article or blog useful? Please share this among your dev friends or network.

An android app or website on your mind?

We build blazing fast Rest APIs and web-apps and love to discuss and develop on great product ideas over a Google meet call. Let's connect for a free consultation or project development.

Contact Us

Trending DevOps Articles

Working with System.Random and threads safely in .NET Core and .NET Framework

Popular DevOps Categories

Docker aws cdk application load balancer AWS CDK Application security AWS CDK application Application Load Balancers with DevOps Guru Auto scale group Automation Autoscale EC2 Autoscale VPC Autoscaling AWS Azure DevOps Big Data BigQuery CAMS DevOps Containers Data Observability Frequently Asked Devops Questions in Interviews GCP Large Table Export GCP Serverless Dataproc DB Export GTmetrix Page Speed 100% Google Page Speed 100% Healthy CI/CD Pipelines How to use AWS Developer Tools IDL web services Infrastructure as code Istio App Deploy Istio Gateways Istio Installation Istio Official Docs Istio Service Istio Traffic Management Java Database Export with GCP Jenkin K8 Kubernetes Large DB Export GCP Linux MSSQL March announcement MySQL Networking Popular DevOps Tools PostgreSQL Puppet Python Database Export with GCP Python GCP Large Table Export Python GCP Serverless Dataproc DB Export Python Postgres DB Export to BigQuery Sprint Top 100 Devops Questions TypeScript Client Generator anti-patterns of DevOps application performance monitoring (APM) aws amplify deploy blazor webassembly aws cdk application load balancer security group aws cdk construct example aws cdk l2 constructs aws cdk web application firewall aws codeguru reviewer cli command aws devops guru performance management aws service catalog best practices aws service catalog ci/cd aws service catalog examples azure Devops use cases azure devops whitepaper codeguru aws cli deploy asp.net core blazor webassembly devops guru for rds devops guru rds performance devops project explanation devops project ideas devops real time examples devops real time scenarios devops whitepaper aws docker-compose.yml health aware ci/cd pipeline example host and deploy asp.net core blazor webassembly on AWS scalable and secure CI/CD pipelines security vulnerabilities ci cd pipeline security vulnerabilities ci cd pipeline aws smithy code generation smithy server generator
Show more