Skip to content

Instantly share code, notes, and snippets.

@brysontyrrell
Created August 31, 2020 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brysontyrrell/ea70af8d2ab18fb888460928a37186c6 to your computer and use it in GitHub Desktop.
Save brysontyrrell/ea70af8d2ab18fb888460928a37186c6 to your computer and use it in GitHub Desktop.
MyFunction:
Type: AWS::Serverless::Function
Properties:
Runtime: python3.8
CodeUri: ./src/my_function
Handler: index.lambda_handler
Events:
TableChanges:
Type: EventBridgeRule
Properties:
EventBusName: !Ref EventBus
InputPath: $.detail
Pattern:
source:
- my-service.database
resources:
- !GetAtt MyTable.Arn
detail-type:
- INSERT
- MODIFY
detail:
dynamodb:
Keys:
pk:
S: [{ "prefix": "OID#" }]
sk:
S: [{ "prefix": "UID#" }]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment