{"id":19594239,"url":"https://github.com/julioaranajr/05_boto3","last_synced_at":"2026-06-11T06:31:16.500Z","repository":{"id":60971328,"uuid":"547155034","full_name":"julioaranajr/05_boto3","owner":"julioaranajr","description":"How install boto3, awscli. Configuring AWS environment, testing AWS credentials, exercises.","archived":false,"fork":false,"pushed_at":"2022-10-11T13:28:59.000Z","size":300,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T14:21:51.139Z","etag":null,"topics":["aws-config","aws-credentials","aws-environment","aws-sdk","awscli","boto3","boto3-script"],"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/julioaranajr.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}},"created_at":"2022-10-07T08:12:06.000Z","updated_at":"2022-10-07T09:35:26.000Z","dependencies_parsed_at":"2023-01-19T19:00:43.531Z","dependency_job_id":null,"html_url":"https://github.com/julioaranajr/05_boto3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/julioaranajr/05_boto3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julioaranajr%2F05_boto3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julioaranajr%2F05_boto3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julioaranajr%2F05_boto3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julioaranajr%2F05_boto3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julioaranajr","download_url":"https://codeload.github.com/julioaranajr/05_boto3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julioaranajr%2F05_boto3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34186385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aws-config","aws-credentials","aws-environment","aws-sdk","awscli","boto3","boto3-script"],"created_at":"2024-11-11T08:42:41.662Z","updated_at":"2026-06-11T06:31:16.480Z","avatar_url":"https://github.com/julioaranajr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 05_boto3\n\n## Install boto3\nTo install the Boto3 library, you have to run the following command in your terminal:\n\n```sh\npip install boto3\n```\n\nThe command above will install the Boto3 library globally in your system. Alternatively, \nyou can configure a Python development environment to isolate your dependencies and manage \nthem separately\n\n## Install AWS CLI tools \nTo install theAWS CLI tools, you have to run another command in your terminal:\n\n```\npip install awscli\n```\n\n\n## Configuring AWS environment\n\nAWS CLI is a set of command-line tools for accessing AWS from the terminal shell. \nThose tools are available for you through the aws command. In this section, we’ll use a \nsubcommand named configure to set up an AWS environment on your laptop, workstation, or server.\n\nTo configure the AWS environment, type the following command in your terminal:\n\n```sh\naws configure\n ```\n \nThis command will walk you through an environment configuration process and \nask you for 4 things:\n\n- AWS Access Key: just press enter \n- AWS Secret Access Key: just press and press enter \n- Default region name: type -\u003e your [aws-region-1] and enter\n- Default output format: type -\u003e json and press enter\n\n**The aws configure tool allows you not to store your AWS credentials** \n**(the AWS Access and Secret Keys) in your Python scripts.**\n\nNote: even storing AWS Access and Secret Keys in a plain text file \n(~/.aws/credentials) is not very secure. The better and more secure \nway is to store AWS Access and Secret Keys in the encrypted store, \nfor example, aws-vault.\n\n## Testing AWS credentials\n\nAs soon as you’ve configured your AWS credentials, you can test that everything’s \nready to move forward. \n\nTest your Credentials here -\u003e [Test_AWS_Credentials.md](https://github.com/julioaranajr/05_boto3/blob/main/Test_AWS_Credentials.md)\n\n### List Buckets example\n\n```py\nfrom urllib import response\nimport boto3\nfrom datetime import date\n\n# Let's use Amazon S3\n# s3 = boto3.resource('s3')\n\n# Print out bucket names\n# for bucket in s3.buckets.all():\n#     print(bucket.name)\n\nclient = boto3.client(\"s3\")\n\nresponse = client.list_buckets()\n\n#print(response)\n#print(response[\"ResponseMetadata\"][\"RequestId\"])\n#print(response[\"Buckets\"][0][\"Name\"])\n\nfor bucket in response[\"Buckets\"]:\n    print(date.strftime(bucket[\"CreationDate\"], \"%H-%m-%Y %H:%M\"), bucket[\"Name\"])\n```\n\n### Exercises:\n\n- Write a boto3 script that prints out all VPCs and Subnets\nin your lab account.\n\n- Then for each resource found (VPC and subnets), attach a new \nAWS tag \"Project: Talent-Academy\" where tag key is \"Project\" and \ntag value is \"Talent-Academy\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulioaranajr%2F05_boto3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulioaranajr%2F05_boto3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulioaranajr%2F05_boto3/lists"}