WEBVTT

00:00.920 --> 00:05.910
-In this section, we will get
introduced to the S3 service in AWS.

00:07.340 --> 00:10.120
S3 stands for Simple Storage Service.

00:11.400 --> 00:15.990
This service provides an infinitely
scalable storage solution from AWS.

00:16.510 --> 00:20.220
It also offers high availability
of data by storing it

00:20.250 --> 00:23.590
across multiple devices and
availability zones in a region.

00:24.630 --> 00:26.790
S3 is an object based storage.

00:27.290 --> 00:31.250
It allows us to store objects or
flat files, such as documents,

00:31.400 --> 00:34.050
images, and videos in the AWS cloud.

00:35.460 --> 00:39.380
This is equivalent to a file
share storage, such as NFS, which

00:39.380 --> 00:42.770
is suitable to store flat files,
but not suitable to install an

00:42.770 --> 00:44.730
operating system or databases.

00:46.210 --> 00:50.030
Data in S3 is stored in
the form of an S3 bucket.

00:50.860 --> 00:53.920
A bucket can be considered to
be a container or a directory

00:53.940 --> 00:55.410
which stores all your files.

00:55.960 --> 00:58.360
You can create as many
of these buckets as you

00:58.360 --> 01:00.010
need in your AWS account.

01:01.390 --> 01:03.620
Everything within a
bucket is an object.

01:04.400 --> 01:07.820
For example, let's consider
a bucket called all-pets.

01:08.090 --> 01:11.240
Within this, we can have
individual files such as a

01:11.240 --> 01:16.810
document called pets.json and
image called dog and a cat video.

01:17.660 --> 01:21.190
Besides these, you can also
have files within a folder such

01:21.190 --> 01:25.810
as the cat.jpg file under the
pictures folder and a dog.mp4

01:25.810 --> 01:27.540
file inside the videos folder.

01:28.570 --> 01:31.360
Each of these items that
you see here is an object.

01:31.970 --> 01:35.390
In the case of the file
within a folder, the path

01:35.420 --> 01:38.760
of the file including the
folder is also an object.

01:40.420 --> 01:44.360
AWS provides a simple web
interface to create an S3 bucket

01:44.410 --> 01:45.900
via the Management Console.

01:47.330 --> 01:50.220
When creating a bucket in
AWS, there are a couple of

01:50.240 --> 01:51.840
considerations to be followed.

01:52.730 --> 01:54.490
The bucket name must be unique.

01:55.050 --> 01:58.470
This is because when
creating a bucket, AWS also

01:58.500 --> 02:00.280
creates a DNS name for it.

02:01.550 --> 02:05.340
This DNS name will be accessible
from anywhere in the world.

02:05.980 --> 02:09.400
No two buckets, not even those
which are created on different

02:09.400 --> 02:10.880
accounts, can have the same name.

02:12.360 --> 02:15.550
Secondly, the name should
also be DNS-compliant.

02:15.960 --> 02:19.420
This means that there should not
be any uppercases or underscores.

02:19.890 --> 02:24.290
The name should be between 3
to 63 characters long, and it

02:24.300 --> 02:25.990
should not end with a dash.

02:27.110 --> 02:30.860
The maximum size of a file that
can be uploaded is 5 terabytes.

02:32.020 --> 02:34.630
Check out the reference
documentation for the complete

02:34.630 --> 02:36.780
list of bucket naming restrictions.

02:37.950 --> 02:41.260
Once a bucket is created, it
can be accessed via a unique

02:41.260 --> 02:43.240
DNS name that looks like this.

02:44.290 --> 02:48.010
For example, if we create
a bucket called all-pets in

02:48.010 --> 02:52.420
the us-west-1 region, the web
address for this bucket would be

02:52.710 --> 02:58.710
https://all-pets.us-west-1.
amazonaws.com.

02:59.540 --> 03:03.210
The objects within this bucket can
now be accessed using the bucket

03:03.210 --> 03:05.590
name and the object names like this.

03:06.760 --> 03:11.710
Any object in an S3 bucket consists
of an object data and metadata.

03:12.580 --> 03:16.450
The data consists of a key, which
is the actual name of the object,

03:16.770 --> 03:20.260
and a value, which is the actual
data referenced by that object.

03:21.110 --> 03:24.220
Metadata are details about
the object stored in a bucket.

03:24.850 --> 03:28.520
For example, the time when the
object was created, the owner,

03:28.610 --> 03:30.510
the size of the object, et cetera.

03:32.150 --> 03:36.270
Just like IAM users, when a
bucket is created and objects

03:36.280 --> 03:40.810
uploaded to it, by default, AWS
provides it the least permissions.

03:41.650 --> 03:44.730
This means that by default,
no one can access the objects

03:44.740 --> 03:47.410
in the bucket with the
exception of the bucket owner.

03:48.630 --> 03:51.720
Access to the bucket and its
objects are governed by bucket

03:51.750 --> 03:53.950
policies and access control lists.

03:55.100 --> 03:58.140
Bucket policies are permissions
that are granted at a bucket

03:58.140 --> 04:02.070
level, and access control lists
are more fine-grained access

04:02.070 --> 04:05.000
that can be used to define
permissions at an object level.

04:06.280 --> 04:10.270
In this course, we will take a look
at some of the basic bucket policies

04:10.280 --> 04:12.230
to govern access to S3 buckets.

04:13.320 --> 04:18.120
These will be used later in S3 with
Terraform lecture and the S3 Lab.

04:19.200 --> 04:23.370
To allow the IAM user called
Lucy to be able to retrieve all

04:23.380 --> 04:27.060
objects in the example bucket
called all-pets, we can make use

04:27.080 --> 04:29.010
of a bucket policy like this.

04:30.620 --> 04:34.560
Just like IAM policies, bucket
policies are JSON documents,

04:35.000 --> 04:38.180
and when they are attached to a
bucket, they can either grant or

04:38.180 --> 04:39.950
revoke access at a bucket level.

04:41.080 --> 04:43.940
Finally, with the bucket
policy, we can provide access

04:43.940 --> 04:47.550
to IAM users, groups, or even
public access to our buckets.

04:48.210 --> 04:52.090
We can even grant access to
users from other AWS accounts.

