The documentation you are viewing is for Dapr v1.4 which is an older version of Dapr. For up-to-date documentation, see the latest version.

AWS DynamoDB

Detailed information on the AWS DynamoDB state store component


To setup a DynamoDB state store create a component of type 请参阅本指南,了解如何创建和应用状态存储配置。

kind: Component
  name: <NAME>
  namespace: <NAMESPACE>
  version: v1
  - name: table
    value: "mytable"
  - name: accessKey
    value: "abcd" # Optional
  - name: secretKey
    value: "abcd" # Optional
  - name: endpoint
    value: "http://localhost:8080" # Optional
  - name: region
    value: "eu-west-1" # Optional
  - name: sessionToken
    value: "abcd" # Optional

Primary Key

In order to use DynamoDB as a Dapr state store, the table must have a primary key named key.


字段 必填 详情 示例
table Y name of the DynamoDB table to use "mytable"
accessKey N 具有SNS和SQS适当权限的AWS账户的ID。 可以用secretKeyRef来引用密钥。 "AKIAIOSFODNN7EXAMPLE"
secretKey N AWS用户的密钥。 可以用secretKeyRef来引用密钥。 "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
region N AWS区域到实例。 有效区域请参见本页面:。 Ensure that DynamoDB are available in that region. "us-east-1"
终结点 N 该组件要使用的AWS端点, 仅用于本地开发。 仅用于本地开发。 当对生产环境的AWS,endpoint是不需要的。 "http://localhost:4566"
sessionToken N 要使用的 AWS 会话令牌。 A session token is only required if you are using temporary security credentials. "TOKEN"

Setup AWS DynamoDB

See Authenticating to AWS for information about authentication-related attributes