【问题标题】:Problems using StreamConsumer to connect Kinesis Stream to DynamoDb with Cloudformation使用 StreamConsumer 通过 Cloudformation 将 Kinesis Stream 连接到 DynamoDb 时出现问题
【发布时间】:2019-11-22 15:43:55
【问题描述】:

我想使用 cloudformation 将 Kinesis Stream 直接连接到 DynamoDB 表。看起来这样做的方法是使用 StreamConsumer。下面的 cloudformation 脚本给了我这个错误:

Value 'kinesisstreamtodynamodb' at 'streamARN' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws.*:kinesis:.*:\d{12}:stream/.+ (Service: AmazonKinesis

它不喜欢 StreamARN: !Ref KinesisSTream 属性。

我可能会更改此配置以在 kinesis 流和 dynamodb 表之间使用 lambda,但现在我想让此配置正常工作。

在将运动流连接到 dynamodb 表时我做错了什么?

  KinesisStream:
    Type: AWS::Kinesis::Stream
    Properties:
      Name: kinesisstreamtodynamodb
      ShardCount: 1

  DynamoTable:
    Type: AWS::DynamoDB::Table
    Description: streaming data from kinesis
    Properties:
      TableName: Kinesis-DynamoTable
      AttributeDefinitions:
        - AttributeName: "timestamp"
          AttributeType: "S"
        - AttributeName: "logmessage"
          AttributeType: "S"
      KeySchema:
        - AttributeName: "timestamp"
          KeyType: "HASH"
        - AttributeName: "logmessage"
          KeyType: "RANGE"
      ProvisionedThroughput:
        ReadCapacityUnits: 5
        WriteCapacityUnits: 5

  StreamConsumer:
    Type: "AWS::Kinesis::StreamConsumer"
    Properties:
      StreamARN: !Ref 'KinesisStream'
      ConsumerName: !Ref 'DynamoTable'

【问题讨论】:

    标签: amazon-web-services amazon-dynamodb amazon-cloudformation amazon-kinesis


    【解决方案1】:

    它在寻找 arn,而不是参考。你可以很容易地做到这一点:

    !GetAtt KinesisSTream.arn

    :)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-06-18
      • 1970-01-01
      • 2019-09-06
      • 2020-06-24
      • 2013-10-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多