Today’s tutorial is going to be split in three main steps and I am going to explain you how to:
- Create an Amazon S3 bucket
- Generate your Amazon S3 IAM (Identity and Access Management)credentials
- Apply the correct bucket policies
To begin you will need to own or create an AWS account. To do that you can follow our guide “how to create an AWS account today“. If you already created your account it’s ok to continue following this tutorial.
1. Create an Amazon S3 bucket
1.1. Authenticate into your AWS account ant then go to search and type in “S3”. You will see the S3 service appearing bellow. Click on it.
1.2. On the right part of the screen you will see an orange button with the name “Create bucket” press it and you will be redirected to Create bucket.
1.3. Enter your unique bucket name (check out AWS S3 bucket naming rules) and select the AWS Region in which you want your bucket to be in.
1.4. Block Public Access Settings for this Bucket
Ensure that you disable the “Block all public access” option if the objects stored in your bucket are intended to be publicly accessible. This is particularly important if you are storing images and videos for a website. Enabling this setting restricts public access to the objects within the bucket, potentially causing errors when attempting to access them.
Note: Upon disabling “Block all public access,” it is crucial to acknowledge that the current settings may result in both the bucket and its objects becoming public. This acknowledgment is necessary to proceed.
Attention: Only disable this setting if the objects within the bucket are intended for public access, such as images for a website.
1.5. Create bucket – press on the orange button at the end of the page to create the bucket.
2. Generate your AWS IAM (Identity and Access Management) credentials
2.1. Search for “IAM” in the top search bar and click on it after it finds it.
2.2. In the left side menu click on users
2.3. On the right side click on the blue button “Add users”
2.4. Write your username and Select AWS access type by checking the box next to “Access key – Programmatic access” (Enables an access key ID and secret access key for the AWS API, CLI, SDK, and other development tools) and then click at the bottom on the blue button “Next: Permissions”
2.5. On “Set permissions” screen click on the box “Attach existing policies directly”. In the search bar below, look for for “AmazonS3FullAccess”. Click at the bottom on the blue button “Next: Tags”
2.6. Add tags if you need them and after that click at the bottom on the blue button “Next: Review”. Review your details and if everything is ok click at the bottom on the blue button “Create user”.
2.7. Copy the newly created IAM credentials for safe keeping. You won’t have another chance. If you loose them you will need to create another user.
Thank you for following our tutorial. We encourage you to leave us a comment so we know you are there 🙂