The documentation you are viewing is for Dapr v1.9 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 state.aws.dynamodb. 请参阅本指南,了解如何创建和应用状态存储配置。

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: <NAME>
  namespace: <NAMESPACE>
spec:
  type: state.aws.dynamodb
  version: v1
  metadata:
  - 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

元数据字段规范

字段 必填 详情 Example
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区域到实例。 有效区域请参见本页面:https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html。 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

相关链接