Skip to content

fix(parser): allow Kinesis envelopes to handle non-JSON strings #3531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 27, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: improve docstring
  • Loading branch information
dreamorosi committed Jan 25, 2025
commit 96c8d84c1da87a93c852d8fabac6ec53fcfdc987
6 changes: 5 additions & 1 deletion packages/parser/src/schemas/dynamodb.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { unmarshallDynamoDB } from '@aws-lambda-powertools/commons/utils/unmarshallDynamoDB';
import { z } from 'zod';
import type { KinesisEnvelope } from '../envelopes/kinesis.js';
import type { DynamoDBMarshalled } from '../helpers/dynamodb.js';

const DynamoDBStreamChangeRecordBase = z.object({
Expand Down Expand Up @@ -91,7 +92,10 @@ const DynamoDBStreamRecord = z.object({
});

/**
* Zod schema for Amazon DynamoDB Stream event sent to an Amazon Kinesis stream.
* Zod schema for Amazon DynamoDB Stream event sent to an Amazon Kinesis Stream.
*
* This schema is best used in conjunction with the {@link KinesisEnvelope | `KinesisEnvelope`} when
* you want to work with the DynamoDB stream event coming from an Amazon Kinesis Stream.
*
* By default, we unmarshall the `dynamodb.Keys`, `dynamodb.NewImage`, and `dynamodb.OldImage` fields
* for you.
Expand Down
Loading