PouryaKit
Decision guides

S3 or Azure Blob

Which provider stores a Host's files behind IFileStorage, and what each one asks of your account.

What it decides

Which package supplies the Host's one implementation of IFileStorage, the File storage contract a Feature uploads, downloads and deletes through: PouryaKit.Storage.S3 or PouryaKit.Storage.AzureBlob.

Feature code is the same on either

A Feature names only IFileStorage and never a cloud SDK, so changing provider changes the Host's registration and its configuration, not a Feature. A Host composes exactly one provider.

When to choose each

S3Azure Blob
StoresAWS S3, and S3-compatible stores such as MinIOAzure Blob Storage, and Azurite for development
CredentialsAWS's own on AWS, or the keys of an S3-compatible store: S3The storage account's key, which signs every presigned link: Azure Blob Storage

Choose by where your files live. On Azure, the account key is the deciding constraint: an account that cannot hand out its key cannot use this provider.

Set it up

Create the bucket or container

Neither provider creates one: the bucket or container must exist before the Host uses it.

Register the provider and bind its options

Registering has the registration and the configuration of each, and the options each one validates when the Host starts.

Store, then record

No file store joins the Unit of Work's commit: store the file first, then record its key in the command's state. Store, then record shows the order and what to do with a file a failed command left.

What the Kit guarantees

Stated in
The contract behaves the same against each provider's storeFile storage guarantees
One provider per Host, validated before it servesOne provider

Failure messages

Next steps

On this page