Simple wrapper for starting Boto3 clients/resources.
Project description
boto3auth
boto3auth is a simple (Python 3) wrapper for starting clients/resources with Boto3.
Installation
Requires boto3.
pip install boto3auth
Usage
Required:
resource
: AWS resource (e.g.ec2
,dynamodb
,sqs
, etc.)type
: Boto3 Session type (resource
orclient
) Optional:region
: AWS region (e.g.us-east-1
,ca-central-1
, etc.)account_id
: AWS account number (if assuming role)role
: AWS IAM role (if assuming role)
boto3auth assumes you have local AWS credentials configured (or are using a system like aws-vault).
import boto3auth
# EC2 resource with local credentials
resource = boto3auth.auth('ec2')
# DynamoDB resource with assumed role
resource = boto3auth.auth('dynamodb', 'resource', 'us-east-1', '123412341234', 'my-cool-role')
# EC2 client in ca-central-1
client = boto3auth.auth('ec2', 'client', 'ca-central-1')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
boto3auth-1.0.2.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for boto3auth-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7142951aa7cc5351f09a080ba9ed1640cbdeab2537a9d2cff32c27145846dde4 |
|
MD5 | df4aa5d7e3097d28f91d0f80a9cfc392 |
|
BLAKE2b-256 | 9397693418246110776927f47c0a768a85962d3a8759c879835cff67f622fbfd |