{"id":23432,"date":"2019-01-03T12:15:18","date_gmt":"2019-01-03T10:15:18","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=23432"},"modified":"2019-01-03T11:11:42","modified_gmt":"2019-01-03T09:11:42","slug":"boto3-amazon-s3-python-object-store","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/","title":{"rendered":"Boto3 \u2013 Amazon S3 As Python Object Store"},"content":{"rendered":"<p>Use Amazon Simple Storage Service(S3) as an object store to manage Python data structures.<\/p>\n<h2>1.Introduction<\/h2>\n<p>Amazon S3 is extensively used as a file storage system to store and share files across the internet.\u00a0 Amazon S3 can be used to store any type of objects, it is a simple key value store.\u00a0 It can be used to store objects created in any programming languages, such as Java, JavaScript, Python etc.\u00a0 AWS DynamoDB recommends to use S3 to store large items of size more than 400KB.\u00a0 This article focuses on using S3 as an object store using Python.<\/p>\n<h2>2. Pre-requisites<\/h2>\n<p>The Boto3 is the official AWS SDK to access AWS services using Python code.\u00a0 Please ensure Boto3 and awscli are installed in the system.<\/p>\n<pre class=\"brush:php\">$pip install boto3<\/pre>\n<pre class=\"brush:php\">$pip install awscli<\/pre>\n<p>Also configure the AWS credentials using \u201caws configure\u201d command or set up environmental variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY store your keys in the environment.\u00a0 Please DO NOT hard code your AWS Keys inside your Python program.<\/p>\n<p>To configure aws credentials, first install awscli and then use \u201caws configure\u201d command to setup.\u00a0 For more details refer <a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-install.html\">AWS CLI Setup<\/a> and <a href=\"https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/guide\/configuration.html\">Boto3 Credentials<\/a>.<\/p>\n<p>Configure the AWS credentials using command:<\/p>\n<pre class=\"brush:php\">$aws configure<\/pre>\n<p>Do a quick check to ensure you can reach AWS.<\/p>\n<pre class=\"brush:php\">$aws s3 ls<\/pre>\n<p>The above CLI must show the S3 buckets created in your AWS account.\u00a0 The AWS account will be selected based on the credentials configured.\u00a0 In case, multiple AWS accounts are configured, use the \u201c\u2013profile \u201d option in the AWS CLI.\u00a0 If you don\u2019t mention \u201c\u2013profile \u201d option the CLI takes the profile \u201cdefault\u201d.<\/p>\n<p>Use the below commands to configure development profile named \u201cdev\u201d and validate the settings.<\/p>\n<pre class=\"brush:php\">$aws configure -profile dev\n$aws s3 ls --profile dev<\/pre>\n<p>The above command show s3 buckets present in the account which belongs to \u201cdev\u201d profile.<\/p>\n<h2>3. Connecting to S3<\/h2>\n<h3>3.1 Connecting to Default Account (Profile)<\/h3>\n<p>The client() API connects to the specified service in AWS.\u00a0 The below code snippet connects to S3 using the default profile credentials and lists all the S3 buckets.<\/p>\n<pre class=\"brush:php\">import boto3\n\ns3 = boto3.client('s3')\nbuckets = s3.list_buckets()\nfor bucket in buckets['Buckets']:\n    print bucket['CreationDate'].ctime(), bucket['Name']<\/pre>\n<h3>3.2 Connecting to Specific Account (Profile)<\/h3>\n<p>To connect to a specific account, first create session using Session() API.\u00a0 The Session() API allows to mention the profile name and region.\u00a0 It also allows to specify the AWS credentials.<\/p>\n<p>The below code snippet connects to an AWS account configured using \u201cdev\u201d profile and lists all the S3 buckets.<\/p>\n<pre class=\"brush:php\">import boto3\n\nsession = boto3.Session(profile_name=\"dev\", region_name=\"us-west-2\")\ns3 = session.client('s3')buckets = s3.list_buckets()\nfor bucket in buckets['Buckets']:\n    print bucket['CreationDate'].ctime(), bucket['Name']<\/pre>\n<h2>4. Storing and Retrieving a Python LIST<\/h2>\n<p>Boto3 supports <em><strong>put_object()<\/strong> <\/em>and <em><strong>get_object()<\/strong><\/em> APIs to store and retrieve objects in S3.\u00a0 But the objects must be serialized before storing.\u00a0 \u00a0The python pickle library supports serialization and deserialization of objects.\u00a0 Pickle is available by default in Python installation.<\/p>\n<p>The APIs pickle.dumps() and pickle.loads() is used to serialize and deserialize Python objects.<\/p>\n<h3>4.1 Storing a List in S3 Bucket<\/h3>\n<p>Ensure serializing the Python object before writing into the S3 bucket.\u00a0 The list object must be stored using an unique \u201ckey\u201d.\u00a0 If the key is already present, the list object will be overwritten.<\/p>\n<pre class=\"brush:php\">import boto3\nimport pickle\n\ns3 = boto3.client('s3')\nmyList=[1,2,3,4,5]\n\n#Serialize the object \nserializedListObject = pickle.dumps(myList)\n\n#Write to Bucket named 'mytestbucket' and \n#Store the list using key myList001\n\ns3.put_object(Bucket='mytestbucket',Key='myList001',Body=serializedListObject)<\/pre>\n<p>The <em><strong>put_object()<\/strong> <\/em>API may return a \u201c<em>NoSuchBucket<\/em>\u201d exception, if bucket does not exists in your account.<\/p>\n<p><strong>NOTE:\u00a0 Please modify bucket name to your S3 bucket name.\u00a0 I don\u2019t won this bucket.<\/strong><\/p>\n<h3>4.2 Retrieving a List from S3 Bucket<\/h3>\n<p>The list is stored as a stream object inside Body.\u00a0 It can be read using read() API of the <em><strong>get_object()<\/strong><\/em> returned value.\u00a0 It can throw an \u201cNoSuchKey\u201d exception, if the key is not present.<\/p>\n<pre class=\"brush:php\">import boto3\nimport pickle\n\n#Connect to S3\ns3 = boto3.client('s3')\n\n#Read the object stored in key 'myList001'\nobject = s3.get_object(Bucket='mytestbucket',Key='myList001')\nserializedObject = object['Body'].read()\n\n#Deserialize the retrieved object\nmyList = pickle.loads(serializedObject)\n\nprint myList<\/pre>\n<h2>5 Storing and Retrieving a Python Dictionary<\/h2>\n<p>Python dictionary objects can be stored and retrieved in the same way using <em><strong>put_object()<\/strong> <\/em>and <em><strong>get_object()<\/strong> <\/em>APIs.<\/p>\n<h3>5.1 Storing a Python Dictionary Object in S3<\/h3>\n<pre class=\"brush:php\">import boto3\nimport pickle\n\n\n#Connect to S3 default profile\ns3 = boto3.client('s3')\n\nmyData = {'firstName':'Saravanan','lastName':'Subramanian','title':'Manager', 'empId':'007'}\n#Serialize the object\nserializedMyData = pickle.dumps(myData)\n\n#Write to S3 using unique key - EmpId007\ns3.put_object(Bucket='mytestbucket',Key='EmpId007')<\/pre>\n<h3>5.2 Retrieving Python Dictionary Object from S3 Bucket<\/h3>\n<p>Use the get_object() API to read the object.\u00a0 The data is stored as a stream inside the Body object.\u00a0 This can be read using read() API.<\/p>\n<pre class=\"brush:php\">import boto3\n\ns3 = boto3.client('s3')\n\nobject = s3.get_object(Bucket='mytestbucket',Key='EmpId007')\nserializedObject = object['Body'].read()\n\nmyData = pickle.loads(serializedObject)\n\nprint myData<\/pre>\n<h2>6 Working with JSON<\/h2>\n<p>When working with Python dictionary, it is recommended to store it as JSON, if the consumer applications are not written in Python or do not have support for Pickle library.<\/p>\n<p>The api json.dumps() converts the Python Dictionary into JSON and json.loads() converts a JSON to a Python dictionary.<\/p>\n<h3>6.1 Storing a Python Dictionary Object As JSON in S3 bucket<\/h3>\n<pre class=\"brush:php\">import boto3\nimport json\n\ns3 = boto3.client('s3')\n\nmyData = {'firstName':'Saravanan','lastName':'Subramanian','title':'Manager', 'empId':'007'}\nserializedMyData = json.dumps(myData)\n\ns3.put_object(Bucket='mytestbucket',Key='EmpId007')<\/pre>\n<h3>6.2 Retrieving a JSON from S3 bucket<\/h3>\n<pre class=\"brush:php\">import boto3\nimport json\n\ns3 = boto3.client('s3')\nobject = s3.get_object(Bucket='mytestbucket',Key='EmpId007')\nserializedObject = object['Body'].read()\n\nmyData = json.loads(serializedObject)\n\nprint myData<\/pre>\n<h2>7 Upload and Download a Text File<\/h2>\n<p>Boto3 supports upload_file() and download_file() APIs to store and retrieve files to and from your local file system to S3.\u00a0 As per S3 standards, if the Key contains strings with \u201c\/\u201d (forward slash) will be considered as sub folders.<\/p>\n<h3>7.1 Uploading a File<\/h3>\n<pre class=\"brush:php\">import boto3\n\ns3 = boto3.client('s3')\ns3.upload_file(Bucket='mytestbucket', Key='subdir\/abc.txt', Filename='.\/abc.txt')<\/pre>\n<h3>7.2 download a File from S3 bucket<\/h3>\n<pre class=\"brush:php\">import boto3\n\ns3 = boto3.clinet('s3')\ns3.download_file(Bucket='mytestbucket',Key='subdir\/abc.txt',Filename='.\/abc.txt')<\/pre>\n<h2>8 Error Handling<\/h2>\n<p>The Boto3 APIs can raise various exceptions depends on the condition.\u00a0 For example, \u201c<em>DataNotFoundError\u201d<\/em>,\u201dNoSuchKey\u201d,\u201d<em>HttpClientError<\/em>\u201c, \u201c<em>ConnectionError<\/em>\u201c,\u201d<em>SSLError<\/em>\u201d are few of them.\u00a0 The Boto3 exceptions inherit Python \u201cException\u201d class.\u00a0 So handle the exceptions by looking for <em>Exceptions<\/em> class in error and exception handling in the code.<\/p>\n<pre class=\"brush:php\">import boto3\n\ntry:\ns3 = s3.client('s3')\nexcept Exceptions as e:\n        print \"Exception \",e<\/pre>\n<h2>9.Summary<\/h2>\n<p>Storing python objects to an external store has many use cases.\u00a0 For example,\u00a0 a game developer can store intermediate state of objects and fetch them when the gamer resumes from where left, API developer can use S3 object store as a simple key value store are few to mention.\u00a0 Please refer the URLs in the Reference sections to learn more.\u00a0 Thanks.<\/p>\n<h2>References<\/h2>\n<p>[i] Boto3 \u2013 <a href=\"https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/index.html\" rel=\"nofollow\">https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/index.html<\/a><\/p>\n<p>[ii] <a href=\"https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/reference\/services\/s3.html\">Boto3 S3 API<\/a> \u2013 <a href=\"https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/reference\/services\/s3.html\" rel=\"nofollow\">https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/reference\/services\/s3.html<\/a><\/p>\n<p>[iii] AWS CLI \u2013 <a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-install.html\" rel=\"nofollow\">https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-install.html<\/a><\/p>\n<p>[iv] AWS Boto3 Credentials <a href=\"https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/guide\/configuration.html\" rel=\"nofollow\">https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/guide\/configuration.html<\/a><\/p>\n<p>[v]Python 2.7 Pickle Library \u2013 <a href=\"https:\/\/docs.python.org\/3\/library\/pickle.html\" rel=\"nofollow\">https:\/\/docs.python.org\/3\/library\/pickle.html<\/a><\/p>\n<p>[vi] Boto3 Exceptions\u00a0\u00a0<a href=\"https:\/\/github.com\/boto\/botocore\/blob\/develop\/botocore\/exceptions.py\" rel=\"nofollow\">https:\/\/github.com\/boto\/botocore\/blob\/develop\/botocore\/exceptions.py<\/a><\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Web Code Geeks with permission by Saravanan Subramanian, partner at our <a href=\"\/\/www.webcodegeeks.com\/join-us\/wcg\/\" target=\"_blank\" rel=\"noopener\">WCG program<\/a>. See the original article here: <a href=\"https:\/\/techietweak.wordpress.com\/2018\/12\/26\/python-boto3-s3-object-store\/\" target=\"_blank\" rel=\"noopener\">Boto3 \u2013 Amazon S3 As Python Object Store<\/a><\/p>\n<p>Opinions expressed by Web Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Use Amazon Simple Storage Service(S3) as an object store to manage Python data structures. 1.Introduction Amazon S3 is extensively used as a file storage system to store and share files across the internet.\u00a0 Amazon S3 can be used to store any type of objects, it is a simple key value store.\u00a0 It can be used &hellip;<\/p>\n","protected":false},"author":143,"featured_media":1651,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[547,548],"class_list":["post-23432","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-amazon-s3","tag-aws"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Boto3 \u2013 Amazon S3 As Python Object Store - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn about Amazon S3? Check our article explaining how to Use Amazon (S3) as an object store to manage Python data structures.\" \/>\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.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Boto3 \u2013 Amazon S3 As Python Object Store - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about Amazon S3? Check our article explaining how to Use Amazon (S3) as an object store to manage Python data structures.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/saravanan.subramanian.31\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-03T10:15:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Saravanan Subramanian\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tosarvan\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Saravanan Subramanian\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/\"},\"author\":{\"name\":\"Saravanan Subramanian\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/56779276fba995e603f50ea6f18bdd8a\"},\"headline\":\"Boto3 \u2013 Amazon S3 As Python Object Store\",\"datePublished\":\"2019-01-03T10:15:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/\"},\"wordCount\":976,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"keywords\":[\"Amazon S3\",\"AWS\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/\",\"name\":\"Boto3 \u2013 Amazon S3 As Python Object Store - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"datePublished\":\"2019-01-03T10:15:18+00:00\",\"description\":\"Interested to learn about Amazon S3? Check our article explaining how to Use Amazon (S3) as an object store to manage Python data structures.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Boto3 \u2013 Amazon S3 As Python Object Store\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/56779276fba995e603f50ea6f18bdd8a\",\"name\":\"Saravanan Subramanian\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d5b5095370698b8a3f2dfd7ade5444c1b7ec66ed3f549b8a9dcda5580c3a80dd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d5b5095370698b8a3f2dfd7ade5444c1b7ec66ed3f549b8a9dcda5580c3a80dd?s=96&d=mm&r=g\",\"caption\":\"Saravanan Subramanian\"},\"description\":\"Saravanan Subramanian is a System Architect cum Agile Product Owner for developing cloud based applications for service provider back office enterprise applications using open source technologies. He is passionate about Cloud Technology and Big Data Analytics.\",\"sameAs\":[\"http:\/\/techietweak.wordpress.com\/\",\"https:\/\/www.facebook.com\/saravanan.subramanian.31\",\"https:\/\/in.linkedin.com\/in\/tosarvan\",\"https:\/\/x.com\/tosarvan\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/saravanan-subramanian\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Boto3 \u2013 Amazon S3 As Python Object Store - Web Code Geeks - 2026","description":"Interested to learn about Amazon S3? Check our article explaining how to Use Amazon (S3) as an object store to manage Python data structures.","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.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/","og_locale":"en_US","og_type":"article","og_title":"Boto3 \u2013 Amazon S3 As Python Object Store - Web Code Geeks - 2026","og_description":"Interested to learn about Amazon S3? Check our article explaining how to Use Amazon (S3) as an object store to manage Python data structures.","og_url":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/saravanan.subramanian.31","article_published_time":"2019-01-03T10:15:18+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","type":"image\/jpeg"}],"author":"Saravanan Subramanian","twitter_card":"summary_large_image","twitter_creator":"@tosarvan","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Saravanan Subramanian","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/"},"author":{"name":"Saravanan Subramanian","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/56779276fba995e603f50ea6f18bdd8a"},"headline":"Boto3 \u2013 Amazon S3 As Python Object Store","datePublished":"2019-01-03T10:15:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/"},"wordCount":976,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","keywords":["Amazon S3","AWS"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/","url":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/","name":"Boto3 \u2013 Amazon S3 As Python Object Store - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","datePublished":"2019-01-03T10:15:18+00:00","description":"Interested to learn about Amazon S3? Check our article explaining how to Use Amazon (S3) as an object store to manage Python data structures.","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/python\/boto3-amazon-s3-python-object-store\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/www.webcodegeeks.com\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Boto3 \u2013 Amazon S3 As Python Object Store"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/56779276fba995e603f50ea6f18bdd8a","name":"Saravanan Subramanian","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d5b5095370698b8a3f2dfd7ade5444c1b7ec66ed3f549b8a9dcda5580c3a80dd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d5b5095370698b8a3f2dfd7ade5444c1b7ec66ed3f549b8a9dcda5580c3a80dd?s=96&d=mm&r=g","caption":"Saravanan Subramanian"},"description":"Saravanan Subramanian is a System Architect cum Agile Product Owner for developing cloud based applications for service provider back office enterprise applications using open source technologies. He is passionate about Cloud Technology and Big Data Analytics.","sameAs":["http:\/\/techietweak.wordpress.com\/","https:\/\/www.facebook.com\/saravanan.subramanian.31","https:\/\/in.linkedin.com\/in\/tosarvan","https:\/\/x.com\/tosarvan"],"url":"https:\/\/www.webcodegeeks.com\/author\/saravanan-subramanian\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/23432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/143"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=23432"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/23432\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1651"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=23432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=23432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=23432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}