{"id":6253,"date":"2020-09-24T15:59:04","date_gmt":"2020-09-24T10:29:04","guid":{"rendered":"https:\/\/www.innovationm.com\/blog\/?p=6253"},"modified":"2023-01-20T18:55:15","modified_gmt":"2023-01-20T13:25:15","slug":"s3-bucket","status":"publish","type":"post","link":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/","title":{"rendered":"S3 Bucket"},"content":{"rendered":"<h1><b>Introduction<\/b><b>:<\/b><\/h1>\n<p><span style=\"font-weight: 400;\">An Amazon S3 bucket is a <\/span><a href=\"https:\/\/searchcloudcomputing.techtarget.com\/definition\/public-cloud\"><span style=\"font-weight: 400;\">public cloud<\/span><\/a><span style=\"font-weight: 400;\"> storage resource available in Amazon Web Services&#8217; (<\/span><a href=\"https:\/\/searchaws.techtarget.com\/definition\/Amazon-Web-Services\"><span style=\"font-weight: 400;\">AWS<\/span><\/a><span style=\"font-weight: 400;\">). S3 stands for Simple Storage Service (<\/span><a href=\"https:\/\/searchaws.techtarget.com\/definition\/Amazon-Simple-Storage-Service-Amazon-S3\"><span style=\"font-weight: 400;\">S3<\/span><\/a><span style=\"font-weight: 400;\">) and it is an <\/span><a href=\"https:\/\/searchstorage.techtarget.com\/definition\/object-storage\"><span style=\"font-weight: 400;\">object storage<\/span><\/a><span style=\"font-weight: 400;\"> offering. Amazon S3 buckets, which are similar to file folders, store objects which consist of <\/span><a href=\"https:\/\/searchdatamanagement.techtarget.com\/definition\/data\"><span style=\"font-weight: 400;\">data<\/span><\/a><span style=\"font-weight: 400;\"> and its descriptive metadata.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Amazon S3 provides a web service which can be used to store and retrieve unlimited amounts of data. The same can be done programmatically using Amazon-provided APIs.S3 in Amazon has two primary entities called buckets and objects. Objects are stored inside buckets.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">By default, the maximum number of buckets that can be created per account is 100. For additional buckets, one can submit a request for a service limit increase. Bucket names have to be globally unique irrespective of which region they are created in. As buckets can be accessed using URLs, it is recommended that bucket names follow DNS naming conventions: all letters should be in lowercase.<\/span><\/p>\n<p><b>Approach<\/b><b>:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">If you are using a bucket in your project you must follow this<\/span><\/p>\n<h2><b>Decide the Bucket Structure:<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">First, decide the structure of the bucket you are creating.\u00a0 For example, if your bucket is going to store images, pdf files of different images and doc. then it should be arranged properly. Let\u2019s say you have Interviewer Resume and Candidate Resume then the ideal structure will be. <\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><\/p>\n<h2><b>Data<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Interviewer (id-32)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; Resume<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a032_Int_Res.pdf<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; Profile Pic\u00a0\u00a0\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a032_Int_Pic.jpg<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Candidate (id-12)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0&#8211; Resume<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a012_Can_Res.pdf<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0&#8211; Profile Pic<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a012_Can_Pro.jpg<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Once you can finalise the structure of your folder then it should be followed in the bucket you are creating.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><strong>1. <\/strong><\/span><b style=\"font-size: 1rem;\">Creating and Naming Bucket:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">After deciding the structure, Using required naming conventions(all letter should be in lowercase) create two buckets for<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u00a0Production<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">QA and Staging<\/span><\/li>\n<\/ul>\n<p><b style=\"font-size: 1rem;\">2.\u00a0 Naming Convention:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The naming convention must be unique for every file and folder and it is related to the file you are creating for example by seeing the name you can identify what is in it.<\/span><\/p>\n<p><b style=\"font-size: 1rem;\">3. Linking Bucket with Database<\/b><span style=\"font-weight: 400;\">:\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now when you have created the bucket with the required folder structure, you have to link it with the database.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For this you have to do these following steps:<\/span><\/p>\n<h2><b>Saving in the Bucket<\/b><b> :<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">When you are saving anything in the S3 Bucket you will do it by creating a POST API, here in this API you will define the path in the bucket where you want to save your file. Once the path is defined the file will get saved in the defined folder in the bucket. The path of the particular file in the bucket will save in the DB according to the required id.<\/span><\/p>\n<h2><b>Getting a file from the bucket<\/b><b> :<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">When you want to access the file from the bucket, you do it by creating a GET API, this API basically picks the path for the required file in the bucket from DB, GET API creates an assigned URL using the path and sends it in desired response and you will get the required data.\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: An Amazon S3 bucket is a public cloud storage resource available in Amazon Web Services&#8217; (AWS). S3 stands for Simple Storage Service (S3) and it is an object storage offering. Amazon S3 buckets, which are similar to file folders, store objects which consist of data and its descriptive metadata. Amazon S3 provides a web [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6256,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[350],"tags":[14,535],"class_list":["post-6253","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-amazon-web-services","tag-innovationm","tag-s3-bucket"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>S3 Bucket - InnovationM - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.innovationm.com\/blog\/s3-bucket\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"S3 Bucket - InnovationM - Blog\" \/>\n<meta property=\"og:description\" content=\"Introduction: An Amazon S3 bucket is a public cloud storage resource available in Amazon Web Services&#8217; (AWS). S3 stands for Simple Storage Service (S3) and it is an object storage offering. Amazon S3 buckets, which are similar to file folders, store objects which consist of data and its descriptive metadata. Amazon S3 provides a web [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.innovationm.com\/blog\/s3-bucket\/\" \/>\n<meta property=\"og:site_name\" content=\"InnovationM - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-24T10:29:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-20T13:25:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/09\/s3-bucket-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"InnovationM Admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InnovationM Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/\"},\"author\":{\"name\":\"InnovationM Admin\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"headline\":\"S3 Bucket\",\"datePublished\":\"2020-09-24T10:29:04+00:00\",\"dateModified\":\"2023-01-20T13:25:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/\"},\"wordCount\":507,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/s3-bucket-1.png\",\"keywords\":[\"InnovationM\",\"S3 Bucket\"],\"articleSection\":[\"amazon web services\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/\",\"name\":\"S3 Bucket - InnovationM - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/s3-bucket-1.png\",\"datePublished\":\"2020-09-24T10:29:04+00:00\",\"dateModified\":\"2023-01-20T13:25:15+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/s3-bucket-1.png\",\"contentUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/s3-bucket-1.png\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/s3-bucket\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"S3 Bucket\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\",\"name\":\"InnovationM - Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\",\"name\":\"InnovationM Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"caption\":\"InnovationM Admin\"},\"sameAs\":[\"http:\\\/\\\/www.innovationm.com\\\/\"],\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/author\\\/innovationmadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"S3 Bucket - InnovationM - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/","og_locale":"en_US","og_type":"article","og_title":"S3 Bucket - InnovationM - Blog","og_description":"Introduction: An Amazon S3 bucket is a public cloud storage resource available in Amazon Web Services&#8217; (AWS). S3 stands for Simple Storage Service (S3) and it is an object storage offering. Amazon S3 buckets, which are similar to file folders, store objects which consist of data and its descriptive metadata. Amazon S3 provides a web [&hellip;]","og_url":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/","og_site_name":"InnovationM - Blog","article_published_time":"2020-09-24T10:29:04+00:00","article_modified_time":"2023-01-20T13:25:15+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/09\/s3-bucket-1.png","type":"image\/png"}],"author":"InnovationM Admin","twitter_misc":{"Written by":"InnovationM Admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/#article","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/"},"author":{"name":"InnovationM Admin","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"headline":"S3 Bucket","datePublished":"2020-09-24T10:29:04+00:00","dateModified":"2023-01-20T13:25:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/"},"wordCount":507,"commentCount":0,"image":{"@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/09\/s3-bucket-1.png","keywords":["InnovationM","S3 Bucket"],"articleSection":["amazon web services"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.innovationm.com\/blog\/s3-bucket\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/","url":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/","name":"S3 Bucket - InnovationM - Blog","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/#primaryimage"},"image":{"@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/09\/s3-bucket-1.png","datePublished":"2020-09-24T10:29:04+00:00","dateModified":"2023-01-20T13:25:15+00:00","author":{"@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"breadcrumb":{"@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.innovationm.com\/blog\/s3-bucket\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/#primaryimage","url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/09\/s3-bucket-1.png","contentUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/09\/s3-bucket-1.png","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/www.innovationm.com\/blog\/s3-bucket\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.innovationm.com\/blog\/"},{"@type":"ListItem","position":2,"name":"S3 Bucket"}]},{"@type":"WebSite","@id":"https:\/\/www.innovationm.com\/blog\/#website","url":"https:\/\/www.innovationm.com\/blog\/","name":"InnovationM - Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.innovationm.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed","name":"InnovationM Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","caption":"InnovationM Admin"},"sameAs":["http:\/\/www.innovationm.com\/"],"url":"https:\/\/www.innovationm.com\/blog\/author\/innovationmadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/6253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/comments?post=6253"}],"version-history":[{"count":0,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/6253\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media\/6256"}],"wp:attachment":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media?parent=6253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/categories?post=6253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/tags?post=6253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}