{"id":13936061,"url":"https://github.com/keithweaver/python-aws-s3","last_synced_at":"2026-01-16T13:35:21.525Z","repository":{"id":88797698,"uuid":"83728399","full_name":"keithweaver/python-aws-s3","owner":"keithweaver","description":"Demo of AWS S3 Walkthrough using Python","archived":false,"fork":false,"pushed_at":"2017-10-02T13:01:36.000Z","size":11952,"stargazers_count":190,"open_issues_count":1,"forks_count":108,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-27T04:30:33.998Z","etag":null,"topics":["amazon-web-services","aws","python","s3","walkthrough"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keithweaver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-02T21:53:19.000Z","updated_at":"2024-10-13T03:51:26.000Z","dependencies_parsed_at":"2023-06-12T16:00:13.858Z","dependency_job_id":null,"html_url":"https://github.com/keithweaver/python-aws-s3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/keithweaver/python-aws-s3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithweaver%2Fpython-aws-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithweaver%2Fpython-aws-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithweaver%2Fpython-aws-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithweaver%2Fpython-aws-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keithweaver","download_url":"https://codeload.github.com/keithweaver/python-aws-s3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithweaver%2Fpython-aws-s3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266019657,"owners_count":23864916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-web-services","aws","python","s3","walkthrough"],"created_at":"2024-08-07T23:02:20.865Z","updated_at":"2025-07-19T21:31:31.970Z","avatar_url":"https://github.com/keithweaver.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# python-aws-s3\n\n## About\n\nThis is a demo of setting up an Amazon Web Service (AWS) S3 bucket and uploading a file with Python.\n\n## Setting Up Bucket\n\nOpen [AWS Console](https://aws.amazon.com/console/) and log in.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/1.png?token=AGNQQB4Q7sizjmFqsAVZq3V_sN8TMRFLks5YwerPwA%3D%3D \"Logo Title Text 1\")\n\nClick the `Services` dropdown and select the `S3` service.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/2.png?token=AGNQQNz_t6F17wj-SFdtfMyDoIajZS_0ks5YweyxwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/3.png?token=AGNQQJstPfN74ZaU0DAGs48onSsPTqsjks5YwezAwA%3D%3D \"Logo Title Text 1\")\n\nClick `Create Bucket`. Give it a name, region then hit next through each step.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/4.png?token=AGNQQLW_rjSbf4dhVQzVyf9K82ftwDGXks5YwezYwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/5.png?token=AGNQQD4kg2EX_ZXz6jNEQOl03rXmi4g6ks5YwezIwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/6.png?token=AGNQQBiuGeGun0prBmDnWfCGS7txhGqCks5YweztwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/7.png?token=AGNQQKrDpZNUvJ_1BSsAxBTL4z-F-9yzks5Ywez6wA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/8.png?token=AGNQQLY2H-I-DXKgioN3a_sSZa0RvA9vks5Ywe0RwA%3D%3D \"Logo Title Text 1\")\n\nNow click your new bucket\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/9.png?token=AGNQQIF3ijNHUArFfOIKmDqQLesD-0xDks5Ywe06wA%3D%3D \"Logo Title Text 1\")\n\nUpload a test image to your bucket\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/10.png?token=AGNQQNvBtD2xdq2lEv-0nPOSd4lr_HcUks5Ywe1IwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/11.png?token=AGNQQJ7uOOASpUpWvH17LFx1hUf2gn-Nks5Ywe1UwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/12.png?token=AGNQQJ5neNpGcIPRJruFgoLHluLHjfzSks5Ywe1pwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/13.png?token=AGNQQPvo-Kz8gzLdfDzuJFTDqHOw7zZ9ks5Ywe12wA%3D%3D \"Logo Title Text 1\")\n\nYou can find your new file. If you click it, you should see a link. Open the link in a new tab.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/14.png?token=AGNQQPBk3nKWXD5dLMty1mbSz_wq4Towks5Ywe2MwA%3D%3D \"Logo Title Text 1\")\n\nAs you can see, you'll get \"Access Denied\".\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/15.png?token=AGNQQBPsYqTSH6PhLfvI_JcpDzkuZE3pks5Ywe2bwA%3D%3D \"Logo Title Text 1\")\n\nClick the file, and under \"more\" press make public. Refresh the link.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/16.png?token=AGNQQNKjd5GvP2Wnh8f5JGTYV1AfVIhfks5Ywe2mwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/17.png?token=AGNQQB9N71ROMur-mOpgYYbJnD8_tGiHks5Ywe2zwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/18.png?token=AGNQQDZfL40P0kDRLMraNNS1gNjT15ARks5Ywe27wA%3D%3D \"Logo Title Text 1\")\n\n\nNow click `Services` then go to `IAM` dashboard.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/19.png?token=AGNQQMLc53mftbit-GS4dB848a1P0wxxks5Ywg5PwA%3D%3D \"Logo Title Text 1\")\n\n\nYou should see your `IAM` dashboard. On the left menu, you can click `Users`.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/20.png?token=AGNQQFZWACEcI0OCPGlI8VFfKYojrNOdks5Ywg5cwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/21.png?token=AGNQQHJ8cTd2pp9gjLJFo-9YP9M26CjJks5Ywg5pwA%3D%3D \"Logo Title Text 1\")\n\n\nClick the `Add User`.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/22.png?token=AGNQQHb97i8061Z8yyk7wgNoBzKEdjWCks5Ywg54wA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/23.png?token=AGNQQGmUhdp8lvITugT3O6QuF95bDecxks5Ywg6GwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/24.png?token=AGNQQEfgNzexuJsc6SrmSQ3Op6Z2hjpeks5Ywg6YwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/25.png?token=AGNQQBJMq9cmkWyerv0lKoiK7FLyQrVMks5Ywg6swA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/26.png?token=AGNQQK_yGtNWgoPTm-PVRMaUY4SPN80bks5Ywg7EwA%3D%3D \"Logo Title Text 1\")\n\n\nNow click your new user from the list of users.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/27.png?token=AGNQQP44HDGnKbF_qF55ERkBp2qZ9w6-ks5Ywg7UwA%3D%3D \"Logo Title Text 1\")\n\n\nCopy the User ARN\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/28.png?token=AGNQQOphRJzEZzkfFy8zNwowoQmk3SXOks5Ywg7hwA%3D%3D \"Logo Title Text 1\")\n\n\nReopen the S3 dashboard\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/29.png?token=AGNQQFxnq6FxO5TyZuI7stDN4sicpf4lks5Ywg7swA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/30.png?token=AGNQQMNL9wrpk7q59xyNIsYGEh3QdTwyks5Ywg8KwA%3D%3D \"Logo Title Text 1\")\n\n\nNow click the permissions tab.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/31.png?token=AGNQQPPvYEoQ5UYrW1gC66w_fPVrTZjEks5Ywg8UwA%3D%3D \"Logo Title Text 1\")\n\n\nThen click Bucket Policy.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/32.png?token=AGNQQNpX1_U-waAnhxbVZlxZW4PZk8liks5Ywg8iwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/33.png?token=AGNQQMXZnAR1uU1IG-2_HztGgvg8xId7ks5Ywg87wA%3D%3D \"Logo Title Text 1\")\n\n\nSet your Bucket Policy to be the same as below. Change `arn:aws:iam::281979644754:user/sample-user` to be your User ARN. Also change `arn:aws:s3:::img-bucket-00123` to your Bucket ARN. The bucket ARN is above the textarea.\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Id\": \"Policy1488494182833\",\n    \"Statement\": [\n        {\n            \"Sid\": \"Stmt1488493308547\",\n            \"Effect\": \"Allow\",\n            \"Principal\": {\n                \"AWS\": \"arn:aws:iam::281979644754:user/sample-user\"\n            },\n            \"Action\": [\n                \"s3:ListBucket\",\n                \"s3:ListBucketVersions\",\n                \"s3:GetBucketLocation\",\n                \"s3:Get*\",\n                \"s3:Put*\"\n            ],\n            \"Resource\": \"arn:aws:s3:::img-bucket-00123\"\n        }\n    ]\n}\n```\n\nClick CORS configuration and add the following policy:\n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cCORSConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\"\u003e\n  \u003cCORSRule\u003e\n    \u003cAllowedOrigin\u003e*\u003c/AllowedOrigin\u003e\n    \u003cAllowedMethod\u003eGET\u003c/AllowedMethod\u003e\n    \u003cAllowedMethod\u003ePOST\u003c/AllowedMethod\u003e\n    \u003cAllowedMethod\u003ePUT\u003c/AllowedMethod\u003e\n    \u003cMaxAgeSeconds\u003e3000\u003c/MaxAgeSeconds\u003e\n    \u003cAllowedHeader\u003eAuthorization\u003c/AllowedHeader\u003e\n  \u003c/CORSRule\u003e\n\u003c/CORSConfiguration\u003e\n```\n\n\nReopen the `IAM` dashboard.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/34.png?token=AGNQQHJ_DYvOXj-GDK0M6tOSzChGt18rks5Ywg9NwA%3D%3D \"Logo Title Text 1\")\n\n\nOpen your new user.\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/35.png?token=AGNQQLB9HYxUyOs324GT_gIT72Kp-aLUks5Ywg9lwA%3D%3D \"Logo Title Text 1\")\n\n\nClick on the `New inline policy`\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/36.png?token=AGNQQMBE1OAZSRrf6GA2X-lYyNKAMh_hks5Ywg9xwA%3D%3D \"Logo Title Text 1\")\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/37.png?token=AGNQQGWZA9403bBqVmocrO2D2Ht3cgATks5Ywg-FwA%3D%3D \"Logo Title Text 1\")\n\n\nUpdate the policy to be as follows:\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:ListAllMyBuckets\",\n                \"s3:PutObject\",\n                \"s3:GetObject\"\n            ],\n            \"Resource\": [\n                \"arn:aws:s3:::*\"\n            ]\n        }\n    ]\n}\n```\n\n\n```\ngit clone https://github.com/keithweaver/python-aws-s3.git\ncd python-aws-s3\npython example.py\n```\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/40.png?token=AGNQQLDaMw4p1lrb003wBahAe_bRngFqks5Ywg-5wA%3D%3D \"Logo Title Text 1\")\n\n```\npython example-w-folder-create.py\n```\n\n![alt text](https://raw.githubusercontent.com/keithweaver/python-aws-s3/master/images-for-setup/41.png?token=AGNQQOElPIcg_RfAje3l2ZJSFjqA4Umrks5Ywg_BwA%3D%3D \"Logo Title Text 1\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeithweaver%2Fpython-aws-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeithweaver%2Fpython-aws-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeithweaver%2Fpython-aws-s3/lists"}