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. 请参阅本指南,了解如何创建和应用状态存储配置。

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. namespace: <NAMESPACE>
  6. spec:
  7. type: state.aws.dynamodb
  8. version: v1
  9. metadata:
  10. - name: table
  11. value: "mytable"
  12. - name: accessKey
  13. value: "abcd" # Optional
  14. - name: secretKey
  15. value: "abcd" # Optional
  16. - name: endpoint
  17. value: "http://localhost:8080" # Optional
  18. - name: region
  19. value: "eu-west-1" # Optional
  20. - name: sessionToken
  21. value: "abcd" # Optional

Warning

以上示例将密钥明文存储, It is recommended to use a secret store for the secrets as described here.

元数据字段规范

字段必填详情Example
tableYname of the DynamoDB table to use“mytable”
accessKeyN具有SNS和SQS适当权限的AWS账户的ID。 可以用secretKeyRef来引用密钥。“AKIAIOSFODNN7EXAMPLE”
secretKeyNAWS用户的密钥。 可以用secretKeyRef来引用密钥。“wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY”
regionNAWS区域到实例。 有效区域请参见本页面: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
sessionTokenN要使用的 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

相关链接