HawkEx.CSV.Storage.S3 (hawk_ex v0.1.0)

Copy Markdown View Source

Amazon S3 storage adapter for CSV exports.

This adapter stores generated CSV files as S3 objects and returns an s3://bucket/key path that can later be passed to read/2 or delete/2. It is intended for production deployments where local disk is ephemeral or shared access to exports is required.

Requires ex_aws and ex_aws_s3 in your dependencies:

{:ex_aws, "~> 2.5"},
{:ex_aws_s3, "~> 2.5"},

Options

  • :bucket - S3 bucket name (required).
  • :prefix - key prefix inside the bucket (default: "exports/").

Configuration

config :hawk_ex,
  csv_storage: {HawkEx.CSV.Storage.S3,
    bucket: "my-app-exports",
    prefix: "exports/"}

AWS credentials

Credentials are read from the standard AWS credential chain: environment variables, IAM roles, or ~/.aws/credentials. Configure them through ex_aws directly, not through HawkEx.