Skip to content

Commit 474df3b

Browse files
committed
updated readme
1 parent 2f22759 commit 474df3b

1 file changed

Lines changed: 28 additions & 69 deletions

File tree

msk-lambda-iam-go-sam/README.md

Lines changed: 28 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -125,75 +125,34 @@ sam local invoke --event=events/event.json
125125

126126
You should see a response similar to the below
127127

128-
`START RequestId: 5c10310a-abf9-416e-b017-697d2c3ba097 Version: $LATEST
129-
Received an event: {'eventSource': 'aws:kafka', 'eventSourceArn': 'arn:aws:kafka:us-west-2:123456789012:cluster/MSKWorkshopCluster/a93759a9-c9d0-4952-984c-492c6bfa2be8-13', 'bootstrapServers': 'b-1.mskworkshopcluster.z9kc4f.c13.kafka.us-west-2.amazonaws.com:9098,b-3.mskworkshopcluster.z9kc4f.c13.kafka.us-west-2.amazonaws.com:9098,b-2.mskworkshopcluster.z9kc4f.c13.kafka.us-west-2.amazonaws.com:9098', 'records': {'myTopic-0': [{'topic': 'myTopic', 'partition': 0, 'offset': 383, 'timestamp': 1678484822068, 'timestampType': 'CREATE_TIME', 'value': 'bTE=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 384, 'timestamp': 1678484823448, 'timestampType': 'CREATE_TIME', 'value': 'bTI=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 385, 'timestamp': 1678484824763, 'timestampType': 'CREATE_TIME', 'value': 'bTM=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 386, 'timestamp': 1678484825902, 'timestampType': 'CREATE_TIME', 'value': 'bTQ=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 387, 'timestamp': 1678484827810, 'timestampType': 'CREATE_TIME', 'value': 'bTU=', 'headers': []}]}}
130-
Event Source: aws:kafka
131-
Event Source ARN: arn:aws:kafka:us-west-2:123456789012:cluster/MSKWorkshopCluster/a93759a9-c9d0-4952-984c-492c6bfa2be8-13
132-
Bootstrap Servers: b-1.mskworkshopcluster.z9kc4f.c13.kafka.us-west-2.amazonaws.com:9098,b-3.mskworkshopcluster.z9kc4f.c13.kafka.us-west-2.amazonaws.com:9098,b-2.mskworkshopcluster.z9kc4f.c13.kafka.us-west-2.amazonaws.com:9098
133-
Records: {'myTopic-0': [{'topic': 'myTopic', 'partition': 0, 'offset': 383, 'timestamp': 1678484822068, 'timestampType': 'CREATE_TIME', 'value': 'bTE=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 384, 'timestamp': 1678484823448, 'timestampType': 'CREATE_TIME', 'value': 'bTI=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 385, 'timestamp': 1678484824763, 'timestampType': 'CREATE_TIME', 'value': 'bTM=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 386, 'timestamp': 1678484825902, 'timestampType': 'CREATE_TIME', 'value': 'bTQ=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 387, 'timestamp': 1678484827810, 'timestampType': 'CREATE_TIME', 'value': 'bTU=', 'headers': []}]}
134-
Current Record: [{'topic': 'myTopic', 'partition': 0, 'offset': 383, 'timestamp': 1678484822068, 'timestampType': 'CREATE_TIME', 'value': 'bTE=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 384, 'timestamp': 1678484823448, 'timestampType': 'CREATE_TIME', 'value': 'bTI=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 385, 'timestamp': 1678484824763, 'timestampType': 'CREATE_TIME', 'value': 'bTM=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 386, 'timestamp': 1678484825902, 'timestampType': 'CREATE_TIME', 'value': 'bTQ=', 'headers': []}, {'topic': 'myTopic', 'partition': 0, 'offset': 387, 'timestamp': 1678484827810, 'timestampType': 'CREATE_TIME', 'value': 'bTU=', 'headers': []}]`
135-
********************
136-
Now printing details of record number: 1
137-
Topic: myTopic
138-
Partition: 0
139-
Offset: 383
140-
Topic: myTopic
141-
Timestamp: 1678484822068
142-
TimestampType: CREATE_TIME
143-
Key = null
144-
Value = m1
145-
Now finished printing details of record number: 1
146-
********************
147-
********************
148-
Now printing details of record number: 2
149-
Topic: myTopic
150-
Partition: 0
151-
Offset: 384
152-
Topic: myTopic
153-
Timestamp: 1678484823448
154-
TimestampType: CREATE_TIME
155-
Key = null
156-
Value = m2
157-
Now finished printing details of record number: 2
158-
********************
159-
********************
160-
Now printing details of record number: 3
161-
Topic: myTopic
162-
Partition: 0
163-
Offset: 385
164-
Topic: myTopic
165-
Timestamp: 1678484824763
166-
TimestampType: CREATE_TIME
167-
Key = null
168-
Value = m3
169-
Now finished printing details of record number: 3
170-
********************
171-
********************
172-
Now printing details of record number: 4
173-
Topic: myTopic
174-
Partition: 0
175-
Offset: 386
176-
Topic: myTopic
177-
Timestamp: 1678484825902
178-
TimestampType: CREATE_TIME
179-
Key = null
180-
Value = m4
181-
Now finished printing details of record number: 4
182-
********************
183-
********************
184-
Now printing details of record number: 5
185-
Topic: myTopic
186-
Partition: 0
187-
Offset: 387
188-
Topic: myTopic
189-
Timestamp: 1678484827810
190-
TimestampType: CREATE_TIME
191-
Key = null
192-
Value = m5
193-
Now finished printing details of record number: 5
194-
********************
195-
END RequestId: 5c10310a-abf9-416e-b017-697d2c3ba097
196-
REPORT RequestId: 5c10310a-abf9-416e-b017-697d2c3ba097 Init Duration: 6.68 ms Duration: 1502.83 ms Billed Duration: 1503 ms Memory Size: 128 MB Max Memory Used: 128 MB
128+
START RequestId: ec2a36a6-5b5e-40c8-bff6-e6237babd613 Version: $LATEST
129+
EventSource = aws:kafka
130+
EventSourceARN = arn:aws:kafka:us-west-2:123456789012:cluster/MSKWorkshopCluster/a93759a9-c9d0-4952-984c-492c6bfa2be8-13
131+
This Key = myTopic-0
132+
**********
133+
Start of message 1
134+
Topic = myTopic
135+
Partition = 0
136+
Offset = 250
137+
Timestamp = 2023-03-06 03:08:30.111 +0000 UTC
138+
TimestampType = CREATE_TIME
139+
Key = null
140+
Value = f
141+
End of message 1
142+
**********
143+
**********
144+
Start of message 2
145+
Topic = myTopic
146+
Partition = 0
147+
Offset = 251
148+
Timestamp = 2023-03-06 03:08:31.086 +0000 UTC
149+
TimestampType = CREATE_TIME
150+
Key = null
151+
Value = g
152+
End of message 2
153+
**********
154+
END RequestId: ec2a36a6-5b5e-40c8-bff6-e6237babd613
155+
REPORT RequestId: ec2a36a6-5b5e-40c8-bff6-e6237babd613 Init Duration: 1.38 ms Duration: 651.86 ms Billed Duration: 652 ms Memory Size: 128 MB Max Memory Used: 128 MB
197156

198157
## Cleanup
199158

0 commit comments

Comments
 (0)