File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
packages/parser/src/schemas Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 1
- import { fromBase64 } from '@aws-lambda-powertools/commons/utils/base64' ;
2
1
import { Base64Encoded } from 'src/helpers/index.js' ;
3
2
import { z } from 'zod' ;
4
3
import type { KinesisDataStreamEvent } from '../types/schema.js' ;
@@ -27,13 +26,7 @@ const KinesisDynamoDBStreamSchema = z.object({
27
26
Records : z . array (
28
27
KinesisDataStreamRecord . extend ( {
29
28
kinesis : KinesisDataStreamRecordPayload . extend ( {
30
- data : z
31
- . string ( )
32
- . transform ( ( data ) => {
33
- const decoded = decoder . decode ( fromBase64 ( data , 'base64' ) ) ;
34
- return JSON . parse ( decoded ) ;
35
- } )
36
- . pipe ( DynamoDBStreamToKinesisRecord ) ,
29
+ data : Base64Encoded ( z . any ( ) ) . pipe ( DynamoDBStreamToKinesisRecord ) ,
37
30
} ) ,
38
31
} )
39
32
) ,
You can’t perform that action at this time.
0 commit comments