@@ -64,16 +64,24 @@ We provide built-in envelopes for popular AWS Lambda event sources to easily dec
64
64
65
65
These are all built-in envelopes you can use along with their expression as a reference:
66
66
67
- | Envelope | JMESPath expression |
68
- | --------------------------------- | ------------------------------------------------------------- |
69
- | ** ` API_GATEWAY_REST ` ** | ` powertools_json(body) ` |
70
- | ** ` API_GATEWAY_HTTP ` ** | ` API_GATEWAY_REST ` |
71
- | ** ` SQS ` ** | ` Records[*].powertools_json(body) ` |
72
- | ** ` SNS ` ** | `Records[ 0] .Sns.Message | powertools_json(@)` |
73
- | ** ` EVENTBRIDGE ` ** | ` detail ` |
74
- | ** ` CLOUDWATCH_EVENTS_SCHEDULED ` ** | ` EVENTBRIDGE ` |
75
- | ** ` KINESIS_DATA_STREAM ` ** | ` Records[*].kinesis.powertools_json(powertools_base64(data)) ` |
76
- | ** ` CLOUDWATCH_LOGS ` ** | `awslogs.powertools_base64_gzip(data) | powertools_json(@).logEvents[ * ] ` |
67
+ | Envelope | JMESPath expression |
68
+ | --------------------------------- | ------------------------------------------------------------------------------------------ |
69
+ | ** ` API_GATEWAY_HTTP ` ** | ` powertools_json(body) ` |
70
+ | ** ` API_GATEWAY_REST ` ** | ` powertools_json(body) ` |
71
+ | ** ` CLOUDWATCH_EVENTS_SCHEDULED ` ** | ` detail ` |
72
+ | ** ` CLOUDWATCH_LOGS ` ** | `awslogs.powertools_base64_gzip(data) | powertools_json(@).logEvents[ * ] ` |
73
+ | ** ` EVENTBRIDGE ` ** | ` detail ` |
74
+ | ** ` KINESIS_DATA_STREAM ` ** | ` Records[*].kinesis.powertools_json(powertools_base64(data)) ` |
75
+ | ** ` S3_EVENTBRIDGE_SQS ` ** | ` Records[*].powertools_json(body).detail ` |
76
+ | ** ` S3_KINESIS_FIREHOSE ` ** | ` records[*].powertools_json(powertools_base64(data)).Records[0] ` |
77
+ | ** ` S3_SNS_KINESIS_FIREHOSE ` ** | ` records[*].powertools_json(powertools_base64(data)).powertools_json(Message).Records[0] ` |
78
+ | ** ` S3_SNS_SQS ` ** | ` Records[*].powertools_json(body).powertools_json(Message).Records[0] ` |
79
+ | ** ` S3_SQS ` ** | ` Records[*].powertools_json(body).Records[0] ` |
80
+ | ** ` SNS ` ** | `Records[ 0] .Sns.Message | powertools_json(@)` |
81
+ | ** ` SQS ` ** | ` Records[*].powertools_json(body) ` |
82
+
83
+ ???+ tip "Using SNS?"
84
+ If you don't require SNS metadata, enable [ raw message delivery] ( https://docs.aws.amazon.com/sns/latest/dg/sns-large-payload-raw-message-delivery.html ) {target="_ blank"}. It will reduce multiple payload layers and size, when using SNS in combination with other services _ (e.g., SQS, S3, etc)_ .
77
85
78
86
## Advanced
79
87
0 commit comments