@@ -120,7 +120,7 @@ for more details.
120
120
=== "Active MQ Example Event"
121
121
122
122
```json hl_lines="6 9 18 21"
123
- --8<-- "examples/event_sources/ events/active_mq_event_example .json"
123
+ --8<-- "tests/ events/activeMQEvent .json"
124
124
```
125
125
126
126
### API Gateway Authorizer
@@ -138,7 +138,7 @@ Use **`APIGatewayAuthorizerRequestEvent`** for type `REQUEST` and **`APIGatewayA
138
138
=== "API Gateway Authorizer Request Example Event"
139
139
140
140
```json hl_lines="3 11"
141
- --8<-- "examples/event_sources /events/apiGatewayAuthorizerRequestEvent.json"
141
+ --8<-- "tests /events/apiGatewayAuthorizerRequestEvent.json"
142
142
```
143
143
144
144
=== "app_token.py"
@@ -150,7 +150,7 @@ Use **`APIGatewayAuthorizerRequestEvent`** for type `REQUEST` and **`APIGatewayA
150
150
=== "API Gateway Authorizer Token Example Event"
151
151
152
152
```json hl_lines="2 3"
153
- --8<-- "examples/event_sources /events/apiGatewayAuthorizerTokenEvent.json"
153
+ --8<-- "tests /events/apiGatewayAuthorizerTokenEvent.json"
154
154
```
155
155
156
156
### API Gateway Authorizer V2
@@ -167,7 +167,7 @@ See also [this blog post](https://aws.amazon.com/blogs/compute/introducing-iam-a
167
167
=== "API Gateway Authorizer V2 Example Event"
168
168
169
169
```json
170
- --8<-- "examples/event_sources /events/apiGatewayAuthorizerV2Event.json"
170
+ --8<-- "tests /events/apiGatewayAuthorizerV2Event.json"
171
171
```
172
172
173
173
### API Gateway Proxy
@@ -199,7 +199,7 @@ It is used for HTTP API using v2 proxy event.
199
199
=== "API Gateway Proxy V2 Example Event"
200
200
201
201
```json
202
- --8<-- "examples/event_sources /events/apiGatewayProxyV2Event.json"
202
+ --8<-- "tests /events/apiGatewayProxyV2Event.json"
203
203
```
204
204
205
205
### Application Load Balancer
@@ -215,7 +215,7 @@ Is it used for [Application load balancer](https://docs.aws.amazon.com/elasticlo
215
215
=== "Application Load Balancer Example Event"
216
216
217
217
```json hl_lines="7 8"
218
- --8<-- "examples/event_sources /events/albEvent.json"
218
+ --8<-- "tests /events/albEvent.json"
219
219
```
220
220
221
221
### AppSync Authorizer
@@ -233,7 +233,7 @@ or read the Amplify documentation on using [AWS Lambda for authorization](https:
233
233
=== "AppSync Authorizer Example Event"
234
234
235
235
```json
236
- --8<-- "examples/event_sources /events/appSyncAuthorizerEvent.json"
236
+ --8<-- "tests /events/appSyncAuthorizerEvent.json"
237
237
```
238
238
239
239
### AppSync Resolver
@@ -252,7 +252,7 @@ The example serves as an AppSync resolver for the `locations` field of the `Merc
252
252
=== "AppSync Resolver Example Event"
253
253
254
254
```json
255
- --8<-- "examples/event_sources /events/appSyncResolverEvent.json"
255
+ --8<-- "tests /events/appSyncResolverEvent.json"
256
256
```
257
257
258
258
### AWS Config Rule
@@ -266,7 +266,7 @@ The example utilizes AWSConfigRuleEvent to parse the incoming event. The functio
266
266
267
267
=== "ScheduledNotification Example Event"
268
268
```json
269
- --8<-- "examples/event_sources/src/aws_config_rule_scheduled .json"
269
+ --8<-- "tests/events/awsConfigRuleScheduled .json"
270
270
```
271
271
272
272
### Bedrock Agent
@@ -281,7 +281,7 @@ The example handles [Bedrock Agent event](https://aws.amazon.com/bedrock/agents/
281
281
282
282
=== "Bedrock Agent Example Event"
283
283
```json
284
- --8<-- "examples/event_sources /events/bedrockAgentEvent.json"
284
+ --8<-- "tests /events/bedrockAgentEvent.json"
285
285
```
286
286
287
287
### CloudFormation Custom Resource
@@ -296,7 +296,7 @@ The example focuses on the `Create` request type, generating a unique physical r
296
296
297
297
=== "CloudFormation Custom Resource Example Event"
298
298
```json
299
- --8<-- "examples/event_sources /events/cloudformationCustomResourceCreate.json"
299
+ --8<-- "tests /events/cloudformationCustomResourceCreate.json"
300
300
```
301
301
302
302
### CloudWatch Dashboard Custom Widget
@@ -311,7 +311,7 @@ Thie example for `CloudWatchDashboardCustomWidgetEvent` logs the dashboard name,
311
311
312
312
=== "CloudWatch Dashboard Example Event"
313
313
```json
314
- --8<-- "examples/event_sources /events/cloudWatchDashboardEvent.json"
314
+ --8<-- "tests /events/cloudWatchDashboardEvent.json"
315
315
```
316
316
317
317
### CloudWatch Alarm State Change Action
@@ -327,7 +327,7 @@ You can use the `CloudWathAlarmEvent` data class to access the fields containing
327
327
328
328
=== "CloudWatch Alarm Example Event"
329
329
```json
330
- --8<-- "examples/event_sources /events/cloudWatchAlarmEventSingleMetric.json"
330
+ --8<-- "tests /events/cloudWatchAlarmEventSingleMetric.json"
331
331
```
332
332
333
333
### CloudWatch Logs
@@ -343,7 +343,7 @@ decompress and parse json data from the event.
343
343
344
344
=== "CloudWatch Logs Example Event"
345
345
```json
346
- --8<-- "examples/event_sources /events/cloudWatchLogEvent.json"
346
+ --8<-- "tests /events/cloudWatchLogEvent.json"
347
347
```
348
348
349
349
#### Kinesis integration
@@ -358,7 +358,7 @@ decompress and parse json data from the event.
358
358
359
359
=== "Kinesis Stream CloudWatch Logs Example Event"
360
360
```json
361
- --8<-- "examples/event_sources /events/kinesisStreamCloudWatchLogsEvent.json"
361
+ --8<-- "tests /events/kinesisStreamCloudWatchLogsEvent.json"
362
362
```
363
363
364
364
Alternatively, you can use ` extract_cloudwatch_logs_from_record ` to seamless integrate with the [ Batch utility] ( ./batch.md ) {target="_ blank"} for more robust log processing.
@@ -371,7 +371,7 @@ Alternatively, you can use `extract_cloudwatch_logs_from_record` to seamless int
371
371
372
372
=== "Kinesis Stream CloudWatch Logs Example Event"
373
373
```json
374
- --8<-- "examples/event_sources /events/kinesisStreamCloudWatchLogsEvent.json"
374
+ --8<-- "tests /events/kinesisStreamCloudWatchLogsEvent.json"
375
375
```
376
376
377
377
### CodeDeploy LifeCycle Hook
@@ -388,7 +388,7 @@ to test applications at different stages of deployment.
388
388
389
389
=== "CodeDeploy LifeCycle Hook Example Event"
390
390
```json
391
- --8<-- "examples/event_sources /events/codeDeployLifecycleHookEvent.json"
391
+ --8<-- "tests /events/codeDeployLifecycleHookEvent.json"
392
392
```
393
393
394
394
### CodePipeline Job
@@ -401,7 +401,7 @@ Data classes and utility functions to help create continuous delivery pipelines
401
401
```
402
402
=== "CodePipeline Job Example Event"
403
403
```json hl_lines="3 19"
404
- --8<-- "examples/event_sources /events/codePipelineEvent.json"
404
+ --8<-- "tests /events/codePipelineEvent.json"
405
405
```
406
406
407
407
### Cognito User Pool
@@ -437,7 +437,7 @@ Some examples for the Cognito User Pools Lambda triggers sources:
437
437
438
438
=== "Cognito Post Confirmation Example Event"
439
439
```json hl_lines="12-14"
440
- --8<-- "examples/event_sources /events/cognitoPostConfirmationEvent.json"
440
+ --8<-- "tests /events/cognitoPostConfirmationEvent.json"
441
441
```
442
442
443
443
#### Define Auth Challenge Example
@@ -455,7 +455,7 @@ This example is based on the AWS Cognito docs for [Define Auth Challenge Lambda
455
455
456
456
=== "Cognito Define Auth Challengen Example Event"
457
457
```json
458
- --8<-- "examples/event_sources /events/cognitoDefineAuthChallengeEvent.json"
458
+ --8<-- "tests /events/cognitoDefineAuthChallengeEvent.json"
459
459
```
460
460
461
461
#### Create Auth Challenge Example
@@ -468,9 +468,9 @@ This example is based on the AWS Cognito docs for [Create Auth Challenge Lambda
468
468
--8<-- "examples/event_sources/src/cognito_create_auth.py"
469
469
```
470
470
471
- === "Cognito Define Auth Challengen Example Event"
471
+ === "Cognito Create Auth Challengen Example Event"
472
472
```json
473
- --8<-- "examples/event_sources /events/cognitoCreateAuthChallengeEvent.json"
473
+ --8<-- "tests /events/cognitoCreateAuthChallengeEvent.json"
474
474
```
475
475
476
476
#### Verify Auth Challenge Response Example
@@ -485,7 +485,7 @@ This example is based on the AWS Cognito docs for [Verify Auth Challenge Respons
485
485
486
486
=== "Cognito Verify Auth Challengen Example Event"
487
487
```json
488
- --8<-- "examples/event_sources /events/cognitoVerifyAuthChallengeResponseEvent.json"
488
+ --8<-- "tests /events/cognitoVerifyAuthChallengeResponseEvent.json"
489
489
```
490
490
491
491
### Connect Contact Flow
@@ -500,7 +500,7 @@ The example integrates with [Amazon Connect](https://docs.aws.amazon.com/connect
500
500
501
501
=== "Connect Contact Flow Example Event"
502
502
```json
503
- --8<-- "examples/event_sources /events/connectContactFlowEventAll.json"
503
+ --8<-- "tests /events/connectContactFlowEventAll.json"
504
504
```
505
505
506
506
### DynamoDB Streams
@@ -519,7 +519,7 @@ The class automatically deserializes DynamoDB types into their equivalent Python
519
519
```
520
520
=== "DynamoDB Streams Example Event"
521
521
```json
522
- --8<-- "examples/event_sources /events/dynamoStreamEvent.json"
522
+ --8<-- "tests /events/dynamoStreamEvent.json"
523
523
```
524
524
525
525
### EventBridge
@@ -534,7 +534,7 @@ The class automatically deserializes DynamoDB types into their equivalent Python
534
534
535
535
=== "EventBridge Example Event"
536
536
```json
537
- --8<-- "examples/event_sources /events/eventBridgeEvent.json"
537
+ --8<-- "tests /events/eventBridgeEvent.json"
538
538
```
539
539
540
540
### Kafka
@@ -549,7 +549,7 @@ This example is based on the AWS docs for [Amazon MSK](https://docs.aws.amazon.c
549
549
550
550
=== "Kafka Example Event"
551
551
```json
552
- --8<-- "examples/event_sources /events/kafkaEventMsk.json"
552
+ --8<-- "tests /events/kafkaEventMsk.json"
553
553
```
554
554
555
555
### Kinesis streams
@@ -565,7 +565,7 @@ or plain text, depending on the original payload.
565
565
566
566
=== "Kinesis streams Example Event"
567
567
```json
568
- --8<-- "examples/event_sources /events/kinesisStreamEvent.json"
568
+ --8<-- "tests /events/kinesisStreamEvent.json"
569
569
```
570
570
571
571
### Kinesis Firehose delivery stream
@@ -605,7 +605,7 @@ To do that, you can use `KinesisFirehoseDataTransformationResponse` class along
605
605
606
606
=== "kinesisFirehoseEvent.json"
607
607
```json
608
- --8<-- "examples/event_sources /events/kinesisFirehoseKinesisEvent.json"
608
+ --8<-- "tests /events/kinesisFirehoseKinesisEvent.json"
609
609
```
610
610
611
611
### Lambda Function URL
@@ -620,7 +620,7 @@ To do that, you can use `KinesisFirehoseDataTransformationResponse` class along
620
620
621
621
=== "Lambda Function URL Example Event"
622
622
```json
623
- --8<-- "examples/event_sources /events/lambdaFunctionUrlEvent.json"
623
+ --8<-- "tests /events/lambdaFunctionUrlEvent.json"
624
624
```
625
625
626
626
### Rabbit MQ
@@ -637,7 +637,7 @@ for more details.
637
637
638
638
=== "Rabbit MQ Example Event"
639
639
```json
640
- --8<-- "examples/event_sources /events/rabbitMQEvent.json"
640
+ --8<-- "tests /events/rabbitMQEvent.json"
641
641
```
642
642
643
643
### S3
@@ -652,7 +652,7 @@ Integration with Amazon S3 enables automatic, serverless processing of object-le
652
652
653
653
=== "S3 Example Event"
654
654
```json
655
- --8<-- "examples/event_sources /events/s3Event.json"
655
+ --8<-- "tests /events/s3Event.json"
656
656
```
657
657
658
658
### S3 Batch Operations
@@ -668,7 +668,7 @@ This example is based on the AWS S3 Batch Operations documentation [Example Lamb
668
668
=== "S3 Batch Operations Example Event"
669
669
670
670
```json
671
- --8<-- "examples/event_sources /events/s3BatchOperationEventSchemaV2.json"
671
+ --8<-- "tests /events/s3BatchOperationEventSchemaV2.json"
672
672
```
673
673
674
674
### S3 Object Lambda
@@ -700,7 +700,7 @@ This example is based on the AWS Blog post [Introducing Amazon S3 Object Lambda
700
700
=== "S3 EventBridge Notification Example Event"
701
701
702
702
```json
703
- --8<-- "examples/event_sources /events/s3EventBridgeNotificationObjectCreatedEvent.json"
703
+ --8<-- "tests /events/s3EventBridgeNotificationObjectCreatedEvent.json"
704
704
```
705
705
706
706
### Secrets Manager
@@ -782,7 +782,7 @@ You can register your Lambda functions as targets within an Amazon VPC Lattice s
782
782
=== "Lattice Example Event"
783
783
784
784
```json
785
- --8<-- "examples/event_sources/src /vpc_lattice_v2_payload.json"
785
+ --8<-- "examples/event_sources/events /vpc_lattice_v2_payload.json"
786
786
```
787
787
788
788
### VPC Lattice V1
@@ -800,7 +800,7 @@ You can register your Lambda functions as targets within an Amazon VPC Lattice s
800
800
=== "Lattice Example Event"
801
801
802
802
```json
803
- --8<-- "examples/event_sources/src /vpc_lattice_payload.json"
803
+ --8<-- "examples/event_sources/events /vpc_lattice_payload.json"
804
804
```
805
805
806
806
## Advanced
@@ -820,9 +820,9 @@ However, certain events may contain sensitive fields such as `secret_access_key`
820
820
821
821
=== "debugging_event.json"
822
822
```json hl_lines="28 29"
823
- --8<-- "examples/event_sources/src /debugging_event.json"
823
+ --8<-- "examples/event_sources/events /debugging_event.json"
824
824
```
825
825
=== "debugging_output.json"
826
826
```json hl_lines="16 17 18"
827
- --8<-- "examples/event_sources/src /debugging_output.json"
827
+ --8<-- "examples/event_sources/events /debugging_output.json"
828
828
```
0 commit comments