Just curious if anyone knows how to do more comple...
# help
g
Just curious if anyone knows how to do more complex type filters on event bus rules if possible. I use dynamodb streams to send item updates to eventbridge and want to create some rules that look at the dynamodb keys I send in the detail. This is an example of what the detail object would look like:
Copy code
Keys: {
  pk: "Charity#something",
  sk: "Charity#"
},
Record: { ...fullItem },
Changes: [...whatKeysChanged]
I want an eventbus rule to look at detail.Keys and make sure "pk" starts with "Charity#" and "sk" is equal to "Charity#" but not entirely sure how the eventPattern works for details.
If that doesnt make sense hopefully this little snippet of what I am editing will:
Copy code
eventPattern: {
	source: ['softgiving.dynamodb'],
	detailType: ['INSERT', 'MODIFY', 'REMOVE'],
	detail: {
		Keys: {
			pk: 'starts with "Charity#"',
			sk: 'equals "Charity#"'
		}
	}
}
f
👍