Skip to main content

datus-aws-common

Shared plumbing for the Datus AWS plugins (datus-glue-plugin, datus-s3-plugin, datus-cloudwatch-plugin, …). It is not a plugin — it registers no datus.plugins entry point — but every AWS plugin depends on it so the boto3 wiring lives in exactly one place.

Extracted once nine AWS plugins needed the same code (the monorepo's "copy small helpers until at least three plugins need them" rule points to extraction well before that).

What it provides

Module Contents
errors PluginError/UsageError/ConfigError/MissingDependencyError/ApiError and exit codes 0/1/2/3/8 (copied from datus-airflow-plugin)
output render_rows / render_one — table / plain / json / yaml (copied)
awsconfig AwsSettings (region + credentials + AssumeRole + endpoint/timeout) and validate_keys for strict per-profile key checking
session build_session (profile/keys/chain + optional STS AssumeRole) and build_client (endpoint override + botocore retry/timeout Config)
client call (botocore ClientError/BotoCoreErrorApiError), paginate (boto3 paginators → flat list), wait_until (monotonic-deadline poller for --wait)
cli AwsContext (lazy, multi-service client cache), add_output_option / confirm / parse_json_arg / parse_datetime_arg, and run (parse → dispatch → error-to-exit-code)

Credential model

Every AWS plugin profile shares the same credential block; resolution mirrors the airflow plugin's S3 deploy:

region: us-east-1
profile: my-aws-profile                     # or explicit keys / the standard chain
access_key_id: ${AWS_ACCESS_KEY_ID}
secret_access_key: ${AWS_SECRET_ACCESS_KEY}
session_token: ${AWS_SESSION_TOKEN}
role_arn: arn:aws:iam::123456789012:role/datus   # short-lived STS AssumeRole
role_session_name: datus                    # optional
external_id: team-a                         # optional
endpoint_url: http://minio:9000             # optional (S3-compatible stores)
timeout: 60                                 # optional botocore connect/read timeout
max_attempts: 3                             # optional botocore retry attempts

Development

uv run --package datus-aws-common pytest datus-aws-common

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datus_aws_common-0.1.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datus_aws_common-0.1.1-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file datus_aws_common-0.1.1.tar.gz.

File metadata

  • Download URL: datus_aws_common-0.1.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for datus_aws_common-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d88ecb50562ad8ac24a683ecbec976895811acc497682844763133b04ded77f1
MD5 488c52b36eeef17b793fc5149f951347
BLAKE2b-256 547f8a7fcdbfe4f576213a47bd780a92f110cf36ef6238ad60c46d5c7e6828b9

See more details on using hashes here.

File details

Details for the file datus_aws_common-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for datus_aws_common-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f5184497f4f8267477668c40cb89665dfd07381f2f803a9b1c79a2ec1ed50100
MD5 ab4f80071354c46f39d5aa7fe6acfa89
BLAKE2b-256 e40225ca92d3139fb5f05dd0755382bd11b0b54c5d1ed0b3daf1037aaa250c0d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page