New Terms:

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

0:00

You've got an AWS account, so let's
start learning about one of the simplest

0:03

services in AWS, Amazon S3, used for
storing and retrieving files.

0:09

Files in S3 are stored inside
of something called a bucket,

0:12

which is a new concept that
requires a bit of explanation.

0:15

A lot of people use S3 for storage,
files are constantly being uploaded and

0:19

downloaded all over the world, and

0:21

everyone using it expects to see
their files and no one else's.

0:25

Can you imagine how embarrassing
it would be if you uploaded some

0:28

private pictures to S3 and
someone else was able to see them?

0:31

Fortunately, it doesn't work that way, all
the files in S3 are divided into buckets,

0:36

and you can only see
the files in your own bucket.

0:39

And what is a bucket?

0:40

Just like a real world bucket,
a bucket in S3 is designed to hold things.

0:45

You bucket holds your files, and
other buckets hold files for

0:47

other people, that way you won't
share files unintentionally.

0:51

S3 buckets help keep your files
private and secure, every file on S3

0:56

must be stored in a bucket, so you can't
use S3 without having at least one bucket.

1:00

Let's dive in and learn how to create one.

1:02

Log into your AWS account and
go to the AWS Management Console.

1:07

The S3 service is under the Storage
section, you can click on that link or

1:10

search for S3 in the search
box at the top of the page.

1:15

Now, we're on the S3 Management Console,
as you can see, we don't

1:18

have any buckets yet, so S3 is giving us
some information for how to get started.

1:22

It's a three-step process,
Create a new bucket, Upload your data, and

1:27

Set up your permissions.

1:28

In this video, we're only going to do
the first step, but other videos in

1:31

this course will show you how to do
the second and third steps, as well.

1:34

To create a new bucket, you can either
click on the Get started button

1:37

at the bottom or on the Create
bucket button at the top-left.

1:43

Now, we have to type in a few piece
of information to create the bucket.

1:46

The first one is the most complicated,
picking a name for your bucket.

1:50

The field says it has to be
a DNS-compliant bucket name,

1:53

which means it would be valid for a URL.

1:55

You can also see there's
a little info message here,

1:58

the bucket name must be unique across
all existing bucket names in Amazon S3.

2:02

There's also something about Cloudfront,
but we can ignore it for now.

2:05

So what does that all mean?

2:07

These are the rules for
naming buckets in S3,

2:09

your name has to be at least three
characters long and no more than 63.

2:13

You can only use lower case letters,
numbers, hyphens, and periods.

2:19

That means, you can't use uppercase
letters, spaces, or special characters.

2:23

The name can't start or
end with a hyphen or a period.

2:27

You can't have two periods
next to each other.

2:30

And finally, if someone else has already
claimed the name you want, you're out of

2:34

luck, you'll have to pick a different
name that isn't currently being used.

2:38

Fortunately, the bucket creation form
is smart enough to tell you when

2:41

you make a mistake with selecting a name.

2:43

For example, let's say I try to create
a bucket named a, as you can see,

2:48

that's too short.

2:49

But if I add two more characters,
then the warning disappears.

2:54

Now, we've got three characters,
which is enough.

2:56

But if I add a capital letter,
that's not allowed.

2:58

Same with special characters,

3:00

see each time a try it tells
me that it's not allowed.

3:04

But it's not complaining about
the name abc, at least not yet.

3:08

Let's move on for now.

3:10

Next, I need to select a Region, as you
can see, there are a lot of options.

3:14

When you select a region,

3:15

you're telling S3 where in the world
you want it to hold your data.

3:18

It doesn't really make much difference,

3:20

since you can still access your
data from anywhere in the world.

3:23

However, different regions have slightly
different prices, and a region that is

3:27

geographically closer to you will be
faster than one that is farther away.

3:31

I'm going to use the U.S.

3:32

West (Oregon) region, but I suggest that
you use whatever region is closest to you.

3:37

Now, it's asking if we want to copy
settings from an existing bucket.

3:40

We don't have any existing buckets, so we
can skip this, I'll press the Next button.

3:45

Oops, I thought that might happen, the
name abc is already taken by someone else,

3:50

so I'll need to pick a different name,
how about treehouse-course.

3:54

You'll notice that I can't pick
a name that ends with a dash,

3:57

that's another rule that
I mentioned earlier.

4:00

Anyway, let's see if this name is taken.

4:05

Great, that means it's available.

4:07

We can ignore everything else on here for
now, so

4:09

just keep pressing the Next button
until you get to the confirmation page.

4:12

Double check that the name and

4:13

location are what you want,
then click Create bucket.

4:17

Great, looks like it worked.

4:19

You can create multiple buckets if you
want to, and that can be a good idea if

4:22

you're storing multiple files that
should be kept separate from each other.

4:25

For example, you probably want to
save pictures of your family, and

4:28

you probably want to save copies of
important documents like tax forms, but

4:31

you probably want to keep them
separate from each other.

4:34

I'll make a new bucket for
my family pictures.

4:36

Let's see if this name is available.

4:40

Yes it is, click Next, Next,

4:45

Next, and Create, done.

4:48

Now, I've got two different buckets.

4:50

You can have up to 100 different
S3 buckets at any one time.

4:54

If you decide that you don't need
a bucket anymore, you can delete it.

4:58

First, select the bucket by clicking
on its row in the bucket list,

5:01

don't click on the Bucket name itself,

5:03

because that will open the bucket,
which is not what we want.

5:06

Instead, click on the row, and
then click on the Delete bucket button.

5:11

AWS makes you confirm that you really
want to delete the bucket, and

5:14

makes you type in the name
of the bucket you selected.

5:17

I'll do that now,
since I'm sure I don't need this bucket.

5:23

Creating and
deleting buckets in S3 is basically free,

5:26

you'd have to do it over a thousand times
in a month for it to cost even a penny.

5:30

Plus, it's covered under the free tier,
so for

5:33

the first year of your AWS account,
it's completely free.

5:36

Try making a bucket or two on your own
AWS account, and in the next video,