Skip to content

Instantly share code, notes, and snippets.

@5t33
Last active July 31, 2023 05:01
Show Gist options
  • Save 5t33/72951ffdc3dd5066aad3f0e2baea88b3 to your computer and use it in GitHub Desktop.
Save 5t33/72951ffdc3dd5066aad3f0e2baea88b3 to your computer and use it in GitHub Desktop.
cfn-pipe.yaml
Pipe:
Type: AWS::Pipes::Pipe
Properties:
Name: kinesis-to-eventbridge
Description: 'Pipe to connect Kinesis stream to EventBridge event bus'
RoleArn: !GetAtt PipeRole.Arn
Source: !Sub arn:aws:kinesis:us-west-2:${AWS::AccountId}:stream/my-org-app-event-stream-${Environment}
SourceParameters:
FilterCriteria:
Filters:
- Pattern: '{"data":{"event_type":["SignUpEvent"]}}'
- Pattern: '{"data":{"event_type":["SignInEvent"]}}'
KinesisStreamParameters:
StartingPosition: LATEST
BatchSize: 1
DeadLetterConfig:
Arn: !GetAtt PipeDLQueue.Arn
Target: !Sub 'arn:aws:events:us-west-2:${AWS::AccountId}:event-bus/my-org-events-${Environment}'
Enrichment: !GetAtt TransformerLambda.Arn
EnrichmentParameters:
InputTemplate: '{ "data": <$.data> }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment