Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Now that you have an AWS account, let's start exploring S3. In this video, we’ll learn about S3 buckets, and how to make one.
New Terms:
- S3 bucket — A container that holds files in Amazon S3.
Bucket Requirements:
- Every file in S3 must be stored in a bucket, so you need at least one bucket before you can store files in S3.
- You can have up to 100 buckets at once. You can create and delete as many buckets as you want, as long as you never have more than 100 at the same time.
- You must specify a region when you create a bucket. A bucket that is geographically closer to you will be slightly faster than a bucket that is farther away. Different regions have slightly different prices.
- You must specify a name for your bucket, which has its own set of requirements.
Bucket Name Requirements:
- Between 3 and 63 characters long
- Lowercase letters, numbers, hyphens, and periods only
- No uppercase letters, no spaces, no special characters
- Cannot start or end with a hyphen or a period
- Cannot have two periods next to each other
- Must be different from any other bucket name in all of S3
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You've got an AWS account, so let's
start learning about one of the simplest
0:00
services in AWS, Amazon S3, used for
storing and retrieving files.
0:03
Files in S3 are stored inside
of something called a bucket,
0:09
which is a new concept that
requires a bit of explanation.
0:12
A lot of people use S3 for storage,
files are constantly being uploaded and
0:15
downloaded all over the world, and
0:19
everyone using it expects to see
their files and no one else's.
0:21
Can you imagine how embarrassing
it would be if you uploaded some
0:25
private pictures to S3 and
someone else was able to see them?
0:28
Fortunately, it doesn't work that way, all
the files in S3 are divided into buckets,
0:31
and you can only see
the files in your own bucket.
0:36
And what is a bucket?
0:39
Just like a real world bucket,
a bucket in S3 is designed to hold things.
0:40
You bucket holds your files, and
other buckets hold files for
0:45
other people, that way you won't
share files unintentionally.
0:47
S3 buckets help keep your files
private and secure, every file on S3
0:51
must be stored in a bucket, so you can't
use S3 without having at least one bucket.
0:56
Let's dive in and learn how to create one.
1:00
Log into your AWS account and
go to the AWS Management Console.
1:02
The S3 service is under the Storage
section, you can click on that link or
1:07
search for S3 in the search
box at the top of the page.
1:10
Now, we're on the S3 Management Console,
as you can see, we don't
1:15
have any buckets yet, so S3 is giving us
some information for how to get started.
1:18
It's a three-step process,
Create a new bucket, Upload your data, and
1:22
Set up your permissions.
1:27
In this video, we're only going to do
the first step, but other videos in
1:28
this course will show you how to do
the second and third steps, as well.
1:31
To create a new bucket, you can either
click on the Get started button
1:34
at the bottom or on the Create
bucket button at the top-left.
1:37
Now, we have to type in a few piece
of information to create the bucket.
1:43
The first one is the most complicated,
picking a name for your bucket.
1:46
The field says it has to be
a DNS-compliant bucket name,
1:50
which means it would be valid for a URL.
1:53
You can also see there's
a little info message here,
1:55
the bucket name must be unique across
all existing bucket names in Amazon S3.
1:58
There's also something about Cloudfront,
but we can ignore it for now.
2:02
So what does that all mean?
2:05
These are the rules for
naming buckets in S3,
2:07
your name has to be at least three
characters long and no more than 63.
2:09
You can only use lower case letters,
numbers, hyphens, and periods.
2:13
That means, you can't use uppercase
letters, spaces, or special characters.
2:19
The name can't start or
end with a hyphen or a period.
2:23
You can't have two periods
next to each other.
2:27
And finally, if someone else has already
claimed the name you want, you're out of
2:30
luck, you'll have to pick a different
name that isn't currently being used.
2:34
Fortunately, the bucket creation form
is smart enough to tell you when
2:38
you make a mistake with selecting a name.
2:41
For example, let's say I try to create
a bucket named a, as you can see,
2:43
that's too short.
2:48
But if I add two more characters,
then the warning disappears.
2:49
Now, we've got three characters,
which is enough.
2:54
But if I add a capital letter,
that's not allowed.
2:56
Same with special characters,
2:58
see each time a try it tells
me that it's not allowed.
3:00
But it's not complaining about
the name abc, at least not yet.
3:04
Let's move on for now.
3:08
Next, I need to select a Region, as you
can see, there are a lot of options.
3:10
When you select a region,
3:14
you're telling S3 where in the world
you want it to hold your data.
3:15
It doesn't really make much difference,
3:18
since you can still access your
data from anywhere in the world.
3:20
However, different regions have slightly
different prices, and a region that is
3:23
geographically closer to you will be
faster than one that is farther away.
3:27
I'm going to use the U.S.
3:31
West (Oregon) region, but I suggest that
you use whatever region is closest to you.
3:32
Now, it's asking if we want to copy
settings from an existing bucket.
3:37
We don't have any existing buckets, so we
can skip this, I'll press the Next button.
3:40
Oops, I thought that might happen, the
name abc is already taken by someone else,
3:45
so I'll need to pick a different name,
how about treehouse-course.
3:50
You'll notice that I can't pick
a name that ends with a dash,
3:54
that's another rule that
I mentioned earlier.
3:57
Anyway, let's see if this name is taken.
4:00
Great, that means it's available.
4:05
We can ignore everything else on here for
now, so
4:07
just keep pressing the Next button
until you get to the confirmation page.
4:09
Double check that the name and
4:12
location are what you want,
then click Create bucket.
4:13
Great, looks like it worked.
4:17
You can create multiple buckets if you
want to, and that can be a good idea if
4:19
you're storing multiple files that
should be kept separate from each other.
4:22
For example, you probably want to
save pictures of your family, and
4:25
you probably want to save copies of
important documents like tax forms, but
4:28
you probably want to keep them
separate from each other.
4:31
I'll make a new bucket for
my family pictures.
4:34
Let's see if this name is available.
4:36
Yes it is, click Next, Next,
4:40
Next, and Create, done.
4:45
Now, I've got two different buckets.
4:48
You can have up to 100 different
S3 buckets at any one time.
4:50
If you decide that you don't need
a bucket anymore, you can delete it.
4:54
First, select the bucket by clicking
on its row in the bucket list,
4:58
don't click on the Bucket name itself,
5:01
because that will open the bucket,
which is not what we want.
5:03
Instead, click on the row, and
then click on the Delete bucket button.
5:06
AWS makes you confirm that you really
want to delete the bucket, and
5:11
makes you type in the name
of the bucket you selected.
5:14
I'll do that now,
since I'm sure I don't need this bucket.
5:17
Creating and
deleting buckets in S3 is basically free,
5:23
you'd have to do it over a thousand times
in a month for it to cost even a penny.
5:26
Plus, it's covered under the free tier,
so for
5:30
the first year of your AWS account,
it's completely free.
5:33
Try making a bucket or two on your own
AWS account, and in the next video,
5:36
we'll learn how to store
files in a bucket.
5:39
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up