Creating an S3 Bucket0:47
These objects represent files we want to store in the bucket. Let's head over to the AWS console. Select the S3 service. And here we can see a list of all the buckets in this AWS account. Let's click on Create Bucket. And then give our bucket a name. Bucket names must be between 3 and 63 characters long. They also have to be unique across all AWS accounts. That means we really have to come up with a unique bucket name that none of the other AWS customers have used before. I'll use Laracast's test.
Setting Public Bucket Policy7:03
to make it easier to remember what this policy is about. And the SID is an identifier for the statement we have, allow public access. For the principle, we'll choose to apply this statement to all principles, which means anyone, authenticated or not authenticated. For the effect, we are going to use allow. And for the action, we will use S3:GetObject. This action is what AWS gets when we try to view an object inside a bucket. For the resource, we will choose all objects in this bucket. Now let's save the change.
Verifying Public Object Access7:42
For the resource, we will choose all objects in this bucket. Now let's save the change. And we can see AWS displays a big red label stating that the objects are publicly accessible now. And the access level also changed to public. Let's go to the objects tab, choose our object, and click on the object URL. And here we go. This object is now publicly available for internet browsers to access. Now that we know how to create buckets and upload objects to them,
