DEV Community

Ajit Singh for This is Learning

Posted on

Amazon S3 - Introduction Hands On

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. s3 search
  • This will land you on the S3 console. Select create bucket on it
    S3-2

  • 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.

  • Don't change the block all public access setting its about permissions and we will study about permissions to a bucket later on.
    Alt Text

  • 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.

  • Add tags as you want you can add tags to identify what this bucket is for. Lets learn about encryption and advanced settings later on. Click create bucket.
    Alt Text

  • Now let us upload some assets on this bucket. To upload click on the bucket. You will se an upload button, click it.
    Alt Text
    Alt Text

  • Here you can add files by clicking the add files button. After that select a file and click upload.
    Alt Text
    Alt Text

  • You will see the following screen. Once upload is completed click close. We have uploaded a file.

Alt Text

  • 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.

Alt Text
Alt Text

  • 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.
    Alt Text
    Alt Text

  • Let's delete this object. Go to the bucket select the object and click delete.

Alt Text

  • Type permanently delete to delete the object and click delete objects. Click close on next screen after deletion is completed.
    Alt Text
    Alt Text

  • Now our bucket is empty. This is it for this tutorial.
    Alt Text

We added and deleted objects in AWS S3 in the next section we will study about permissions and bucket versioning.

Latest comments (0)