S3

 S3


In AWS S3 storage is special kind of storage that provides flexibility that other kind of storage services don't provide. S3 is sitting internet facing subnet and if we want to access S3 bucket from our private subnet we need to either direct traffic over internet gateway or use S3 gateway endpoint service. To access or upload files to S3 we must use REST API for that. This actually makes things easier because thanks to this we will be able to do all operations programmatically (via our favorite programming language). In block storage service we supposed to use operating system to perform all the tasks. There should be some kind of hierarchy. But in S3 files storage in "bucket"s. Hierarchy can be mimicked by prefixes. 

Let's create bucket and access over internet

  1. Search S3 in the search bar 




  2. Create a bucket





  3. Name must be unique otherwise it will display an error. Use default settings.





  4. After that try to upload some files there.



  5. Click to that file you will see the bucket link of that file. Try to open it in your browser.





  6. You will face with "Access Denied" message. But why ? By default all bucket permissions set to deny. We need to not only change bucket permissions but also S3 service permission as well.  




  7. Click to the bucket and then permissions tab,you will see that "Block all public access" part, click to edit button.




  8. Uncheck all the boxes and save it.





  9. And one last thing to do, edit policy and add the lines below, this will set permissions in a way that everyone with the link will be able to access it. Resource key must take value of ARN of our bucket and "/*" after that to ensure all object access in that bucket.









  10. That is it, now we can access our file.
  

Comments

Popular posts from this blog

S3 - Create a static website

AWS - Databases DynamoDB, RDS