A Beginner's Guide to Amazon S3 Permissions and Access Control
Published: 2023-04-04 13:57:11

+ Sign in to the AWS Management Console at [https://console.aws.amazon.com] using your AWS account credentials.

+ Navigate to the S3 Dashboard by selecting S3 from the list of services.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ce6d8ov7vro9vn1g5fpv.png)

+ Click the "Create Bucket" button.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ahjq2gojxcwft1qvfz0u.png)

+ In the "Bucket Name and Region" section, enter a name for your bucket. **Bucket name must be globally unique and must not contain spaces or uppercase letters, so you may need to choose a different name if the name you select is already taken.**

+ Choose the region where you want your bucket to be located. Selecting a region that's closest to your users can help minimize latency and improve performance.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ogerh5wc2amlg9qtjfi7.png)

+ Configure your bucket options. Here, you can choose settings such as versioning, encryption, and access control. You can also add tags to your bucket to help organize it.

+ Click the "Create Bucket" button to create your bucket.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/giv0z9im3bsis75wjzwf.png)

**Congratulations!** You've now created an S3 bucket in AWS. You can use your bucket to store objects such as files, images, and videos. You can also configure your bucket to host static websites or serve as a backend for your applications.

## <u>Now making whatever you uploaded (e.g picture) public</u>

+ Select the bucket that contains the object you want to make public.

+ Find the object in the list and click on it to open its details page.

+ Click the "Permissions" tab in the object details page and Under the "Edit public access" section, click the "Edit" button and save changes afterwards.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/itonys7ik7rqtey81uar.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3nrxnp2snz4sma00ot0.png)

+ Under "permission", the "edit object ownership" section, click the "ALC enabled" button.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/559ghb5dcopn5sziwcrc.png)

+ Under the "Access for other AWS accounts" section, click the "Edit" button.

+ Select "Grant public read access to this object(s)" and click "Save changes".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uvozqf42k3tstxu48oqh.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zuh0r4psiva4bu21rgg4.png)

+ To test if the object is now public and readable, copy the URL of the object again and paste it into a web browser. The object should now be visible.

**Note:** Making an object public means that anyone with the object's URL can view it. Be careful when making objects public and ensure that you only make objects public that you want to be accessible to anyone. Also, keep in mind that public objects may be subject to web crawlers and search engines, and may be cached in different locations around the world.

## <u>Terminating an S3 bucket</u>

Terminating an S3 bucket means deleting it completely. This is useful if you no longer need the bucket, or if you want to start fresh with a new bucket. However, it's important to note that once a bucket is deleted, all objects stored within the bucket are permanently deleted and cannot be recovered.

+ Select the bucket you want to terminate.

+ Click the "Delete bucket" button.

In the confirmation dialog box, type the name of the bucket to confirm that you want to delete it.

+ Click "Confirm" to delete the bucket.

After confirming the deletion, AWS will immediately begin the process of deleting the bucket and all of its contents. It may take some time to complete, depending on the size of the bucket and the number of objects it contains.

It's important to note that terminating a bucket will not only delete all of the objects stored within the bucket, but will also delete any associated metadata, permissions, and access control policies. Be sure to carefully review the contents of the bucket before terminating it, and make sure that you have backups of any data that you need to keep.