-
Notifications
You must be signed in to change notification settings - Fork 154
Feature request: parser helper to work with DynamoDB data structure #3194
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
Comments
I see a |
Hi @arnabrahman, you can work on this. I think @am29d's working on another issue. Thanks for asking and nice to see you here! |
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.13.1 version! |
Use case
When working with Amazon DynamoDB Stream events, the service sends the DynamoDB items in the database-specific format rather than regular JSON objects.
For example, a
string
might be represented as{ "S": "foo" }
rather than justfoo
. This makes parsing the actual changes within an event hard to parse and validate since it requires customers writing a Zod schema with this in mind.We should work on adding a helper that eases the authoring of schemas by abstracting away the transformation (unmarshalling).
Solution/User Experience
The helper will need to depend on the
@aws-sdk/util-dynamodb
package, which should be an optional peer dependency for the Parser utility.For this reason, we'll need to be intentional in how we expose the helper to avoid forcing the dependency on every Parser customer.
Which would then be used as:
Note that we are also introducing a new sub-path export dedicated to this feature. By exporting the helper in its own path rather than in the main
@aws-lambda-powertools/parser/helpers
path we can make sure that only customers who actually want to use the helper need to install the extra peer dependency.Alternative solutions
No response
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: