We studied about AWS S3 in the last tutorial now we study how we can add, delete objects in our S3 bucket. Lets move right into it.
- Go the AWS Console Dashboard search for S3 and select it.
Select Bucket name and bucket region, remember bucket name has to be unique. Although AWS S3 is a global service but buckets belong to a specific region.
Then there is bucket versioning if this is enabled we can version our objects. So that the old data is not lost. We disable it for now. To keep this tutorial simple.
You will see the following screen. Once upload is completed click close. We have uploaded a file.
- Open the S3 object. Click on the object URL. You will se an access denied page. So how we see the contents of our page.
On top there is an open button click on it and you can see the contents of the file. So, why does this link works and the earlier one didn't because when we click the open button at the top we are given a url that has no security and has some params which bypass the security. By default all our S# objects are not public. So a public url does not work we have to assign permissions to S3 objects by bucket permissions which we will check later on.
Let's delete this object. Go to the bucket select the object and click delete.
We added and deleted objects in AWS S3 in the next section we will study about permissions and bucket versioning.