Skip to content
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

(DynamoEventSourceProps): Need to update the AWS documentation #33744

Open
camyorke opened this issue Mar 12, 2025 · 0 comments
Open

(DynamoEventSourceProps): Need to update the AWS documentation #33744

camyorke opened this issue Mar 12, 2025 · 0 comments
Labels
@aws-cdk/aws-lambda-event-sources documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.

Comments

@camyorke
Copy link

Describe the issue

Please update the AWS documentation for CDK DynamoEventSourceProps. The current documentation could be clearer about implementing filters for DynamoDB event sources.

The current recommended approach is indeed to use FilterCriteria rather than the raw filter patterns. Here's an example on implementation of filters for DynamoDB event sources using CDK v2:

import { FilterCriteria, FilterRule } from 'aws-cdk-lib/aws-lambda';

const dynamoEventSource = new DynamoEventSource(table, {
  filters: [
    FilterCriteria.filter({
      dynamodb: {
        NewImage: {
          AccountManager: {
            S: ['Pat Candella']
          }
        }
      }
    })
  ]
});

The FilterCriteria class provides a more type-safe and maintainable way to define filters.

Please update the documentation to reflect:

  1. Update the DynamoEventSourceProps documentation to clearly show FilterCriteria usage
  2. Add practical examples of filter implementations
  3. Deprecate or clarify the { [string]: any }[] type notation
  4. Provide direct links to the filtering documentation

The documentation is unclear which leads to lot of search and clicking various links to understand how the filter works.

Links

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_event_sources.DynamoEventSourceProps.html
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_event_sources.DynamoEventSource.html
https://docs.aws.amazon.com/lambda/latest/dg/with-ddb-filtering.html#filtering-ddb

@camyorke camyorke added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-event-sources documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant