Files
post3/todos/POST3-008-client-sdk.md
2026-02-27 11:38:10 +01:00

1.0 KiB

POST3-008: Client SDK crate

Status: Done Priority: P0 Blocked by:

Description

Create a crates/post3-sdk/ client crate that wraps aws-sdk-s3 with post3-specific defaults.

What was built

  • crates/post3-sdk/Cargo.toml — depends on aws-sdk-s3, aws-credential-types, aws-types, aws-config
  • Post3Client struct wrapping aws_sdk_s3::Client
  • Post3Client::new(endpoint_url) — builds client with force_path_style, dummy creds, us-east-1
  • Post3Client::builder() — for advanced config (custom creds, region, etc.)
  • Re-exports: aws_sdk_s3 and bytes
  • Convenience methods:
    • create_bucket(name), head_bucket(name), delete_bucket(name), list_buckets()
    • put_object(bucket, key, body: impl AsRef<[u8]>)
    • get_object(bucket, key)Result<Bytes>
    • head_object(bucket, key)Result<Option<ObjectInfo>>
    • delete_object(bucket, key)
    • list_objects(bucket, prefix)Result<Vec<ObjectInfo>>
  • inner() access to aws_sdk_s3::Client
  • Unit tests + doc-tests pass