{"id":15297374,"url":"https://github.com/mtslzr/boto3auth","last_synced_at":"2026-01-06T04:47:10.192Z","repository":{"id":62560369,"uuid":"190423108","full_name":"mtslzr/boto3auth","owner":"mtslzr","description":"Simple (Python 3) wrapper for starting clients/services with Boto3","archived":false,"fork":false,"pushed_at":"2020-02-14T21:58:38.000Z","size":19,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-02T09:41:35.797Z","etag":null,"topics":["aws","boto","boto3","iam","python","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/boto3auth/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtslzr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-05T15:43:46.000Z","updated_at":"2024-10-02T03:41:24.000Z","dependencies_parsed_at":"2022-11-03T14:30:26.619Z","dependency_job_id":null,"html_url":"https://github.com/mtslzr/boto3auth","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtslzr%2Fboto3auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtslzr%2Fboto3auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtslzr%2Fboto3auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtslzr%2Fboto3auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtslzr","download_url":"https://codeload.github.com/mtslzr/boto3auth/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245467615,"owners_count":20620216,"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":["aws","boto","boto3","iam","python","python3"],"created_at":"2024-09-30T19:16:58.302Z","updated_at":"2026-01-06T04:47:05.162Z","avatar_url":"https://github.com/mtslzr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# boto3auth\n\n[![CircleCI](https://circleci.com/gh/mtslzr/boto3auth.svg?style=svg)](https://circleci.com/gh/mtslzr/boto3auth)\n[![PyPI version](https://badge.fury.io/py/boto3auth.svg)](https://badge.fury.io/py/boto3auth)\n\nboto3auth is a simple (Python 3) wrapper for starting clients/resources with Boto3.\n\n## Installation\n\n_Requires boto3._\n\n```bash\npip install boto3auth\n```\n\n## Usage\n\n```python\nimport boto3auth\n\nb3a = boto3auth.Boto3Auth(region, account_id, role, sts)\n```\n\nProperties:\n  - `region`: AWS region (e.g. `us-east-1`, `ca-central-1`, etc.)\n    - Defaults to `us-east-1`, if not set.\n  - `account_id`: AWS account number (if assuming role)\n  - `role`: AWS IAM role (if assuming role)\n  - `sts`: Boto3 STS credentials (if assuming a secondary role)\n\n### Auth\n\n```python\nb3a.auth(resource, type)\n```\n\nArguments:\n  - `resource`: AWS resource (e.g. `ec2`, `dynamodb`, `sqs`, etc.)\n  - `type`: Boto3 Session type (`resource` or `client`)\n\n_boto3auth will use local AWS credentials (works well with [aws-vault])._\n\n```python\nimport boto3auth\n\n# EC2 resource in us-east-1, with local credentials.\nb3a = boto3auth.Boto3Auth()\nresource = b3a.auth('ec2')\n\n# DynamoDB resource in us-west-2, with assumed role.\nb3a = boto3auth.Boto3Auth('us-west-2', '123412341234', 'my-cool-role')\nresource = b3a.auth('dynamodb', 'resource')\n\n# EC2 client in ca-central-1 that requires two assumed roles.\n# e.g. Local -\u003e Account #1 -\u003e Account #2\nfirst = boto3auth.Boto3Auth('ca-central-1', '123412341234', 'first-role')\nfirst.creds() # creds() runs sts.AssumeRole and sets result to self.sts.\n\nsecond = boto3auth.Boto3Auth('ca-central-1', '456745674567', 'second-role', first.sts)\nclient = second.auth('ec2', 'client')\n```\n\n[aws-vault]: https://github.com/99designs/aws-vault\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtslzr%2Fboto3auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtslzr%2Fboto3auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtslzr%2Fboto3auth/lists"}