Let's get started with AWS S3 service(Storage services)
In this blog, we are going to learn how to use S3 service for storage and how to create a bucket and your own policies.
Step 1: Sign in to the console as we have shown in the previous blog, you will get a window like this below, click on services as marked.
Step 2: Go to the storage option and select S3 service.
Step 3: After this click on create bucket, and fill the details. we need to create a bucket where we are going to store our data of any type, even you can create multiple folders in that bucket according to your requirements.
Step 4: Fill the details, name, and select the region in which you want your bucket to create and after that click on next.
Step 5: After that configure the options like if you want versioning, log, cloud watch, etc, we are going to check versioning and rest I will keep the same and after that click on Next.
Step 6: Set the permissions, let it remain the same and click on Next.
Step 7: After that review, your settings and click on create bucket.
Step 8: After that select your bucket.
Step 9: Click on your bucket and click on upload, and upload your data. you can use the drag and drop method also to upload your file.
Step 10: After selecting the files click on upload.
Step 10: After uploading file click on that file, you will see a screen like this, copy that URL and paste it in your browser.
Step 11: after you will copy that URL you will see an error message like this on your screen because we have not given access to our bucket to get public access.
Step 12: Go to your bucket and click on permissions.
Step 13: Click on edit and uncheck the box block all public access and click on the Save button.
Step 14: After that go to the bucket policy and add the policy and click on the Save button.
Step 15: open that URL again and you can see your image there.
Step 16: You can even do the version controlling also of your file, go to your file and click on show version.
Step 17: you can see the versions of your file and the latest version also.
So in this blog, we learned how to create an S3 bucket, how to upload your data, allow public access, how to generate your own policy, and how to check versions of your file.
In the next blog, we are going to learn how to host your static website through an S3 bucket.