Skip to content

Instantly share code, notes, and snippets.

## Example event wrapped in EventBridge Envelope:
{
"id": "6a7e8feb-b491-4cf7-a9f1-bf3703467718",
"detail-type": "My Test Event",
"source": "my.event",
"account": "111122223333",
"time": "2017-12-22T18:43:48Z",
"region": "us-west-1",
"detail": {
"eventID": "025f12bc455900835ed7abfc08ecf9be",
AWSTemplateFormatVersion: '2010-09-09'
Description: >
S3 Event Notifications to EventBridge
Resources:
EventBucket:
Type: AWS::S3::Bucket
Properties:
NotificationConfiguration:
# New configuration to enable EventBridge for S3 Event Notifications
@nickste
nickste / BuilderSessionCheatSheet.md
Last active December 4, 2019 19:11
Builder Session Cheatsheet

Event Driven Architectures - Builder Session Cheat Sheet

Order Lambda Function

import json
import boto3

def lambda_handler(event, context):
 order = {
@nickste
nickste / keybase.md
Created November 18, 2019 00:49
Keybase

Keybase proof

I hereby claim:

  • I am nickste on github.
  • I am nickste (https://keybase.io/nickste) on keybase.
  • I have a public key ASBgDtWc4GUUViphV7MYNWtDJCLSMRPrDJYsb5Kni14vtwo

To claim this, I am signing this object:

EventBridge Deep Dive - Webinar Cheat Sheet

This cheat sheet was created as a reference for some of the code and commands used in the Amazon EventBridge Deep Dive webinar.

Rules

Testing a Rule Pattern:

aws events test-event-pattern --event-pattern "{\"source\": [\"Order Service\"],\"detail-type\":[\"New Order\"]}" --event '{"id": "e00c66cb-fe7a-4fcc-81ad-58eb60f5d96b", "detail-type": "New Order", "source": "Order Service", "account": "123456789012", "time": "2016-01-10T01:29:23Z", "region": "us-east-1", "detail": "{\"orderNumber\": \"123456\",\"productId\": \"shoe_007\",\"price\": 130,\"customer\": {\"name\": \"Nick Smit\",\"customerId\": \"987654321\",\"address\": \"2121 7th Ave, Seattle, WA 98121\"}}\",\"EventBusName\": \"orders\"}"}' --profile webinar