如何在serverless.yml中为DynamoDb设置标签

时间:2017-06-27 09:53:22

标签: amazon-dynamodb aws-lambda serverless-framework

我想为Dynamo DB设置标签,我们是否有像serverless那样的无服务器配置

functions:
  createUsers:
    tags:
      key: value

1 个答案:

答案 0 :(得分:1)

resources:
  Resources:
    DynamoDbTable:
      Type: 'AWS::DynamoDB::Table'
      DeletionPolicy: Retain
      Properties:

    TableName: 'table'
    AttributeDefinitions:
      -
        AttributeName: id
        AttributeType: S
        KeySchema:
          -
            AttributeName: id
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        Tags:
            - 
              Key: 'tagKey'
              Value: 'tagValue'