This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Binary Store component specs

The supported binary stores that interface with Dapr

The following table lists the components supported by the Binary Store building block. For instructions on using the building block, see the Binary Store how-to guide.

ComponentComponent typeStatusDescription
In-memorybinarystore.in-memoryAlphaVolatile store for local development and testing.
AWS S3binarystore.aws.s3AlphaAmazon S3 and S3-compatible object storage.
Azure Blob Storagebinarystore.azure.blobstorageAlphaAzure Blob Storage containers.
Azure Data Lake Storage Gen2binarystore.azure.datalakeAlphaAzure Data Lake Storage Gen2 filesystems.
Google Cloud Storagebinarystore.gcp.bucketAlphaGoogle Cloud Storage buckets.
OCI Object Storagebinarystore.oci.objectstorageAlphaOracle Cloud Infrastructure Object Storage buckets.

The Binary Store API is currently alpha. See the component certification lifecycle for details about component status.

1 - AWS S3

Configuration for the AWS S3 and S3-compatible Binary Store component

The AWS S3 Binary Store stores files as objects in an Amazon S3 bucket. It can also connect to S3-compatible services such as MinIO, Ceph, or Cloudflare R2. The component is alpha and uses Dapr’s built-in AWS authentication profile.

Component format

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: s3-files
spec:
  type: binarystore.aws.s3
  version: v1
  metadata:
  - name: bucket
    value: "binary-files"
  - name: prefix
    value: "uploads"

Configure AWS credentials for the sidecar through the AWS authentication profile and your AWS environment or workload identity. Avoid putting access keys directly in the component manifest.

Spec metadata fields

FieldRequiredDetailsExample
bucketYName of the S3 bucket. The component needs s3:PutObject and s3:DeleteObject; it also needs s3:GetObject for retrieval and delete existence checks. To report a missing object as not found during deletion, grant s3:ListBucket as well. Without the permissions needed for the existence check, deletion may report success without determining whether the object existed."binary-files"
prefixNPrefix prepended to each file name. If configured, it must not start with /."uploads"
partSizeNMultipart upload part size, specified as a byte count or byte-size string. Defaults to 16Mi; must be between 5 MiB and 5 GiB. S3 limits uploads to 10,000 parts; larger parts can increase the maximum upload size (up to 50 TB) but use more memory per in-flight upload."64Mi"
endpointNCustom endpoint for an S3-compatible service or emulator. Do not set this for production Amazon S3."http://localhost:9000"
forcePathStyleNDefaults to false (virtual-hosted style). Set to true to use path-style requests; many S3-compatible services require it."true"
disableSSLNDefaults to false. Allows connecting to a non-HTTPS endpoint."true"
insecureSSLNDefaults to false. Accepts self-signed or invalid certificates for HTTPS endpoints. This weakens transport security."true"

Size values can be provided as a string containing the number of bytes (for example, "16777216") or as a size with a unit such as "16Mi".

2 - Azure Blob Storage

Configuration for the Azure Blob Storage Binary Store component

The Azure Blob Storage Binary Store stores each file as a blob in the configured container. The component is alpha.

Component format

The following example authenticates with a connection string:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: azure-files
spec:
  type: binarystore.azure.blobstorage
  version: v1
  metadata:
  - name: connectionString
    value: "<AZURE_STORAGE_CONNECTION_STRING>"
  - name: containerName
    value: "binary-files"

Authentication

The component supports three authentication methods:

  • Connection string: provide connectionString.
  • Account key: provide accountName and accountKey.
  • Microsoft Entra ID: provide accountName and configure credentials for the sidecar’s environment. Supported credential types include workload identity, managed identity, client secret, and certificate. See Authenticating to Azure.

Spec metadata fields

FieldRequiredDetailsExample
connectionStringY for connection-string authenticationAzure Blob Storage connection string."DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=<key>;EndpointSuffix=core.windows.net"
accountNameY for account-key and Entra ID authenticationStorage account name."mystorageaccount"
accountKeyY for account-key authenticationBase64-encoded primary or secondary storage account key."<base64-encoded-key>"
containerNameYName of the Blob Storage container to use."binary-files"
publicAccessLevelNAccess level for data in the container: none, blob, or container. Defaults to none."none"
prefixNPrefix prepended to each file name. If configured, it must not start with /."uploads"
partSizeNUpload block size, specified as a byte count or byte-size string. Defaults to 16Mi; must be between 1 byte and 4000 MiB. Block blobs are limited to 50,000 blocks; larger blocks increase the maximum upload size but use more memory per in-flight upload."64Mi"
endpointNCustom endpoint URL, for example an Azurite emulator or a custom storage domain."http://127.0.0.1:10000"
retryCountNMaximum number of HTTP retries for transient failures. Defaults to 3."5"
disableEntityManagementNDefaults to false. When true, the component does not try to create the container during initialization; pre-create it and grant the identity read/write access."true"

Size values can be provided as a string containing the number of bytes (for example, "16777216") or as a size with a unit such as "16Mi".

Keep publicAccessLevel set to its default unless public access is specifically required.

3 - Azure Data Lake Storage Gen2

Configuration for the Azure Data Lake Storage Gen2 Binary Store component

The Azure Data Lake Storage Gen2 Binary Store stores each file in the configured filesystem. The component is alpha.

Component format

The following example authenticates with a connection string:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: data-lake-files
spec:
  type: binarystore.azure.datalake
  version: v1
  metadata:
  - name: connectionString
    value: "<AZURE_STORAGE_CONNECTION_STRING>"
  - name: fileSystemName
    value: "binary-files"

Authentication

The component supports three authentication methods:

  • Connection string: provide connectionString.
  • Account key: provide accountName and accountKey.
  • Microsoft Entra ID: provide accountName and configure credentials for the sidecar’s environment. Supported credential types include workload identity, managed identity, client secret, and certificate. See Authenticating to Azure.

Spec metadata fields

FieldRequiredDetailsExample
connectionStringY for connection-string authenticationAzure Storage connection string."DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=<key>;EndpointSuffix=core.windows.net"
accountNameY for account-key and Entra ID authenticationStorage account name."mystorageaccount"
accountKeyY for account-key authenticationBase64-encoded primary or secondary storage account key."<base64-encoded-key>"
fileSystemNameYName of the Data Lake Storage Gen2 filesystem to use."binary-files"
prefixNPrefix prepended to each file name. If configured, it must not start with /."uploads"
partSizeNUpload chunk size, specified as a byte count or byte-size string. Defaults to 16Mi; must be between 1 byte and 4000 MiB. Larger chunks reduce request overhead but use more memory per in-flight upload. The maximum file size remains 5 TB."64Mi"
retryCountNMaximum number of HTTP retries for transient failures. Defaults to 3."5"
endpointNCustom endpoint URL."https://mystorageaccount.dfs.core.windows.net"
disableEntityManagementNDefaults to false. When true, the component does not try to create the filesystem during initialization; pre-create it and grant the identity read/write access."true"

Size values can be provided as a string containing the number of bytes (for example, "16777216") or as a size with a unit such as "16Mi".

4 - Google Cloud Storage Bucket

Configuration for the Google Cloud Storage Binary Store component

The Google Cloud Storage Binary Store stores each file as an object in the configured bucket. The component is alpha and uses Dapr’s built-in GCP authentication profile.

Component format

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: gcp-files
spec:
  type: binarystore.gcp.bucket
  version: v1
  metadata:
  - name: bucket
    value: "binary-files"
  - name: prefix
    value: "uploads"

Configure credentials for the sidecar using Google Cloud’s Application Default Credentials or an appropriate workload identity. Do not store service account keys directly in the component manifest.

Spec metadata fields

FieldRequiredDetailsExample
bucketYName of the Google Cloud Storage bucket to use."binary-files"
prefixNPrefix prepended to each file name. If configured, it must not start with /."uploads"
partSizeNResumable upload chunk size, specified as a byte count or byte-size string. Defaults to 16Mi and must be a positive multiple of 256 KiB. Larger chunks reduce request overhead but use more memory per in-flight upload. The maximum object size remains 5 TiB."64Mi"

Size values can be provided as a string containing the number of bytes (for example, "16777216") or as a size with a unit such as "16Mi".

5 - In-memory

Configuration for the in-memory Binary Store component

The in-memory Binary Store keeps files in the Dapr sidecar process. It is useful for local development, tests, and demos, but it is not durable: data is not written to disk, is lost when the process stops, and is not shared between sidecar instances.

Component format

Create a component of type binarystore.in-memory:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: local-files
spec:
  type: binarystore.in-memory
  version: v1
  metadata:
  - name: prefix
    value: "uploads"
  - name: maxSize
    value: "8Mi"
  - name: maxTotalSize
    value: "1Gi"

For example, an application request for report.pdf is stored under the component’s uploads prefix. The prefix is optional.

Spec metadata fields

FieldRequiredDetailsExample
prefixNOptional prefix prepended to each file name in the store. If configured, it must not start with /."uploads"
maxSizeNMaximum size of a single file, specified as a byte count or byte-size string. Defaults to 4Mi; uploads larger than the limit are rejected. Must be greater than zero."8Mi"
maxTotalSizeNMaximum combined size of stored files and in-flight uploads, specified as a byte count or byte-size string. Defaults to 512Mi; uploads that exceed the limit are rejected. Replacing a file temporarily requires capacity for both the old and new content. Must be greater than zero."1Gi"

Size values can be provided as a string containing the number of bytes (for example, "16777216") or as a size with a unit such as "16Mi".

6 - OCI Object Storage

Configuration for the OCI Object Storage Binary Store component

The OCI Object Storage Binary Store stores each file as an object in the configured bucket. The component is alpha.

Component format

The following example authenticates using an OCI configuration file:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: oci-files
spec:
  type: binarystore.oci.objectstorage
  version: v1
  metadata:
  - name: configFileAuthentication
    value: "true"
  - name: configFilePath
    value: "/home/app/.oci/config"
  - name: configFileProfile
    value: "DEFAULT"
  - name: bucketName
    value: "binary-files"
  - name: compartmentOCID
    value: "<COMPARTMENT_OCID>"
  - name: namespace
    value: "<OBJECT_STORAGE_NAMESPACE>"

The configuration file must be available at the specified path inside the sidecar’s environment. Protect credentials in the file using your deployment’s secret-management practices.

Authentication

The component supports three authentication methods:

  • API key: provide region, userOCID, fingerPrint, privateKey, and tenancyOCID.
  • Instance principal: set instancePrincipalAuthentication to "true" and grant the compute instance’s dynamic group the required Object Storage permissions.
  • Configuration file: set configFileAuthentication to "true" and provide configFilePath. Optionally select a profile with configFileProfile.

Only configure one authentication method for a component. For details, see the OCI documentation for instance principals and SDK configuration files.

Spec metadata fields

FieldRequiredDetailsExample
bucketNameYName of the OCI Object Storage bucket."binary-files"
compartmentOCIDYOCID of the compartment containing the bucket."ocid1.compartment.oc1..example"
namespaceNOCI Object Storage namespace. If omitted, the component resolves it from the tenancy."my-namespace"
prefixNPrefix prepended to each file name. If configured, it must not start with /."uploads"
partSizeNMultipart upload part size, specified as a byte count or byte-size string. Defaults to 16Mi; must be between 10 MiB and 50 GiB. OCI limits uploads to 10,000 parts; larger parts can increase the maximum upload size (up to 10 TiB) but use more memory per in-flight upload."64Mi"
regionY for API key authenticationOCI region where the bucket is located."us-ashburn-1"
userOCIDY for API key authenticationOCID of the OCI user."ocid1.user.oc1..example"
fingerPrintY for API key authenticationFingerprint of the API key."xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
privateKeyY for API key authenticationPrivate key for API authentication. Treat this value as a secret."<PRIVATE_KEY>"
tenancyOCIDY for API key authenticationOCID of the tenancy."ocid1.tenancy.oc1..example"
instancePrincipalAuthenticationY when using instance principalSet to "true" to use instance principal authentication. Defaults to "false"."true"
configFileAuthenticationY when using a configuration fileSet to "true" to use configuration file authentication. Defaults to "false"."true"
configFilePathY when using a configuration fileAbsolute path to the OCI configuration file."/home/app/.oci/config"
configFileProfileNOptional profile name in the configuration file. The metadata default is empty; use "DEFAULT" to select that profile explicitly."DEFAULT"

Size values can be provided as a string containing the number of bytes (for example, "16777216") or as a size with a unit such as "16Mi".