Time
3 hours 27 minutes
Difficulty
Beginner
CEU/CPE
4

Video Transcription

00:01
In this video
00:03
we will create a static s3 website
00:06
and
00:07
we will create a bucket policy for our website.
00:14
In our last video,
00:15
we enabled version ing on our bucket
00:18
and we walked through a version ing example
00:22
In this lesson, we will create a static s3 website
00:26
and we will walk through adding a bucket policy.
00:31
We can hold static web sites on Amazon s three
00:35
my static
00:37
we mean simply individual web pages that contain Onley static content.
00:43
That means that our site
00:44
will not be able to run any server side scripts as dynamic pages would
00:49
using PHP,
00:51
Jsp or SP
00:55
to host the static Web site.
00:58
We will configure our s three bucket
01:00
for website hosting and then upload are content to our bucket.
01:06
Then we will add a bucket policy to grant the world read access to our bucket.
01:12
Our website will then be available
01:15
at the AWS Region specific website en pointe
01:19
for our bucket.
01:23
These concepts are best learned by a demonstration So
01:26
let's create our site.
01:30
So from the AWS council, we type s three and then enter
01:37
Next
01:38
we will create a new bucket.
01:42
We will give the bucket the name.
01:45
First Dash Library
01:47
bash, Static
01:49
Bash s three dash site.
01:52
Then we click Create bucket.
01:55
So
01:57
now we see that our new bucket has been created.
02:00
So let's click it
02:02
then let's select properties
02:07
Next
02:07
click Static website hosting.
02:12
We will select
02:14
Use this bucket to host a static Web site.
02:21
Next, we will create a landing page for our site.
02:24
We will type
02:25
index dot html
02:30
Then we will create an error dot ht ml page that will display an error message.
02:36
If a website visitor request a page that doesn't exist,
02:40
then we click Save.
02:45
Now we could see that static website hosting is enabled on our bucket.
02:51
And here is our in point,
02:53
which is derived from our bucket name
02:57
and the region of Rs three bucket.
03:00
So now let's exit to the S three page
03:06
noticed that our bucket is not yet public.
03:08
Remember that all buckets are private by default.
03:14
So
03:15
let's edit our public access settings.
03:19
Just as in the previous lesson, we click, save and type confirm
03:23
then confirm
03:25
Now notice that our objects can be public.
03:30
Next, we will need to add a bucket policy to grant re permission to our site.
03:37
Let's select permissions,
03:39
then bucket policy.
03:43
This takes us to the Bucket Policy editor screen.
03:46
Our bucket policy will be a Jason document.
03:51
I have one that I already created.
03:53
I will paste it in and then explain what it's doing.
03:58
Line two
04:00
is the version of Jason that we're running
04:03
lines four through eight are essentially the policy that says that anyone is allowed, get
04:11
or read permission to the objects within our bucket.
04:15
So let's click. Save
04:18
A W s informs us
04:20
that our bucket now has public access.
04:25
Let's exit back to the S three page
04:30
notice now that our bucket is featuring the public icon.
04:35
Let's click on our bucket again
04:39
and upload our content.
04:51
I have already created documents off line called Index that HTML
04:58
and error that HTML
05:01
These are just simple HTML files that will serve as our demonstration index and our pages
05:10
again. We will need to make both of these files public
05:14
or else we will receive that access denied XML air.
05:25
Great.
05:27
So now both of our files are public.
05:30
Let's exit to our bucket to ensure that everything looks as we expect.
05:34
All appears to be in order
05:38
So now let's test our site to see if it works.
05:43
Click on the end point
05:45
and nice.
05:46
There is Rs three landing page.
05:53
Now
05:54
let's test to see if our air pages working as expected.
05:59
I will request a file
06:00
that doesn't exist within our bucket.
06:15
Awesome!
06:16
Our air pages being served up properly.
06:25
Learning chick,
06:27
What steps are involved? To create a static As three website,
06:31
we sign into the
06:32
A. W s management console.
06:35
Then we create a bucket.
06:39
We opened the bucket properties paying.
06:43
Then we choose static website hosting.
06:46
Then we choose
06:47
Use this bucket to host a website
06:53
in the index document box
06:56
we typed the name of our index document.
06:59
The name is usually index dot html.
07:03
Then we create an error dot html file to catch potential errors and serving up our website.
07:12
We choose safe to save the website configuration
07:16
and then we copy the in point to a text file.
07:28
In this video,
07:29
we created a static s3 website
07:32
and
07:33
we created a bucket policy
07:35
for our website

Up Next

Intro to AWS

Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow.

Instructed By

Instructor Profile Image
Shaun Balkum
Sr. Network Engineer at Presidio
Instructor