Photo by Denis Cherkashin on Unsplash
Background
The other day, I was answering some questions a coworker had about EventBridge. He then jokingly said “I wonder if I can use emojis for an event pattern because they are UTF-8.”
After that conversation, I couldn’t stop thinking about it. So I threw together a quick CDK stack and it works!
Try it yourself
I’ve made my quick CDK stack public on Github. You’re welcome to test with mine.
This stack contains
- A rule with emojis only in the Event Pattern on the defaultevent bus
- A Lambda as the target of the rule that will be invoked and logs the event
Steps
- Clone the repo
- Configure your AWS credentials locally if you have not yet
- 
npm i && npm run cdk deployto deploy the stack
- Put events on the default event bus with either the CLI, and AWS SDK, or in the AWS console. The event pattern is detailType: ['💩']andsource: ['🐶'].
- Check the Lambda’s CloudWatch logs to see that it has been invoked
Closing
You can also update the code to contain other emojis as well. From my testing, I found having multiple emojis in a single event pattern works as well.
Not 100% practical in all cases, but thought I would share these findings publicly. Now go forth and update your EventBridge event patterns. 🎉
 



 
    
Top comments (0)