使用StreamConsumer通过Cloudformation将Kinesis Stream连接到DynamoDb的问题

问题描述 投票:0回答:1

使用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,但现在我想使此配置正常工作。

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

  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个回答
0
投票

它正在寻找arn,而不是参考。您可以很容易地获得它:

!GetAtt KinesisSTream.arn

:)

© www.soinside.com 2019 - 2024. All rights reserved.