Simple wrapper for starting Boto3 clients/resources.
Project description
boto3auth
boto3auth is a simple (Python 3) wrapper for starting clients/services with Boto3.
Installation
Requires boto3.
pip install boto3auth
Usage
Required:
- resource: Chosen AWS resource (e.g. 'ec2', 'dynamodb', 'sqs', etc.)
- type: Chosen Boto3 Session ('resource' or 'client') Optional:
- region: Chosen AWS region (e.g. 'us-east-1', 'ca-central-1', etc.)
- account_id: Chosen AWS account, if assuming role
- role: Chosen 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.0.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for boto3auth-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b651177bb2ddb0ab035f78d96f30a359f177de9fd4214c93e759f61051045a76 |
|
MD5 | 41131b7597a65e64cc56aef57cbd4924 |
|
BLAKE2b-256 | 61c8589ba384e74f39dd1a621ebe09c09e3687c512c82eddf34de98b701473bf |