https://github.com/scartill/botobuddy
A Collection of Extension Functions Based on Boto3
https://github.com/scartill/botobuddy
Last synced: 6 months ago
JSON representation
A Collection of Extension Functions Based on Boto3
- Host: GitHub
- URL: https://github.com/scartill/botobuddy
- Owner: scartill
- License: mit
- Created: 2025-05-14T08:23:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-10T17:02:59.000Z (8 months ago)
- Last Synced: 2025-11-30T03:47:18.247Z (7 months ago)
- Language: Python
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# A Collection of Extension Functions Based on Boto3
## Supported CLI Commands
### DynamoDB Commands
- **truncate-table**: Truncate a DynamoDB table by deleting all its items.
### S3 Commands
- **delete-bucket**: Clean and delete an S3 bucket completely, including all objects and versions.
- **ls**: List all objects in an S3 bucket. The same as `aws s3 ls`, but useful with `--assume-role`.
- **view-dict**: View a dictionary stored in an S3 bucket as a JSON object.
### Route 53 Commands
- **export-hosted-zone**: Export all resource record sets from a specified hosted zone.
- **import-hosted-zone**: Import resource record sets into a specified hosted zone from a file, skipping NS and SOA records.
### SageMaker Commands
- **human-effort**: Generate a report on the human effort that a SageMaker job required.
## Session Configuration
This library uses the `session_config` transversely for AWS Session configuration and other general configuration parameters, generally supplied to the CLI.
This is a dictionary with the following keys, all optional:
- `profile`: The AWS profile to use.
- `region`: The AWS region to use.
- `assume_role`: The AWS role to assume.
## Noteable Functions and Classes
### General
#### `botobuddy.utils.dslice`
This function is used to slice a dictionary into a new dictionary, using the keys to define the slice.
Each key can be a string, or a dictionary with the following keys:
- `k`: the key to slice
- `c`: the cast or conversion function
- `d`: the default value
- `n`: the name of the key in the result dictionary
### S3
#### `botobuddy.s3.S3Uri`
This class is used to represent an S3 URI, and provides methods to parse and manipulate it.
### API Gateway
#### `botobuddy.apigw.get_api_uri`
This function is used to get the URI of an API Gateway API.
### Lambda
#### `botobuddy.awslambda.response`
This function is used to return a response from a Lambda function.
#### `botobuddy.awslambda.request_params`
This function is used to get the parameters passed to REST API-based Lambda function.
### Secrets Manager
#### `botobuddy.secman.get_sm_secret`
This utility is used to get a JSON-formatted secret from Secrets Manager.
## Development Environment Quickstart
```pwsh
uv sync
uv run botobuddy --help
```