Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
22 views1 page

Deploying A Static Site Using AWS S3 and CloudFront

cl

Uploaded by

goktasorhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

Deploying A Static Site Using AWS S3 and CloudFront

cl

Uploaded by

goktasorhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

5.

Deploying a Static Site Using AWS S3


and CloudFront
Amazon S3 can be used to host static websites, and CloudFront can be used to distribute the
content globally with caching for faster access. Here's how to set up a simple static website
using AWS S3 and CloudFront:

1. Create S3 Bucket:
- Log into AWS Management Console.
- Navigate to S3, create a new bucket, and enable "Static website hosting."
- Upload your HTML, CSS, and JavaScript files.

2. Set Bucket Permissions:


- Go to the "Permissions" tab and set the bucket policy to allow public access to the static
files.

```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::your-bucket-name/*"
}
]
}
```

3. Configure CloudFront:
- Go to CloudFront, create a new distribution, and select your S3 bucket as the origin.
- Set the default root object (e.g., `index.html`).

4. Deploy:
- After configuration, your static site will be distributed globally with CloudFront, ensuring
fast access for users worldwide.

You might also like