Skip to content

feat(sns): add notExistsCondition method #34712

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

jaw111
Copy link
Contributor

@jaw111 jaw111 commented Jun 13, 2025

Issue # (if applicable)

Closes #34707

Reason for this change

Set subscription filter with exists false for a property.

Description of changes

Add new notExistsCondition() method.

Describe any new or updated permissions being added

None.

Description of how you validated changes

Extended existing integration test.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added feature-request A feature should be added or improved. p2 labels Jun 13, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team June 13, 2025 11:10
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Jun 13, 2025
@jaw111 jaw111 marked this pull request as draft June 13, 2025 11:10
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@jaw111 jaw111 changed the title add existsCondition parameter on existsFilter method feat(aws-sns): add existsCondition parameter on existsFilter method Jun 13, 2025
@jaw111 jaw111 changed the title feat(aws-sns): add existsCondition parameter on existsFilter method feat(sns): add existsCondition parameter on existsFilter method Jun 13, 2025
@jaw111 jaw111 force-pushed the 34707-sns-subscription-filter-exists branch from cd6ddb2 to 4f4eafd Compare June 13, 2025 14:10
@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Jun 14, 2025
@jaw111 jaw111 changed the title feat(sns): add existsCondition parameter on existsFilter method feat(sns): add notExistsCondition method Jun 18, 2025
@github-actions github-actions bot added the effort/small Small work item – less than a day of effort label Jun 18, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review June 18, 2025 20:29

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@jaw111 jaw111 force-pushed the 34707-sns-subscription-filter-exists branch from f5dfe11 to 3ab6c4b Compare June 18, 2025 20:42
@jaw111 jaw111 marked this pull request as ready for review June 18, 2025 21:00
@aws-cdk-automation aws-cdk-automation removed the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Jun 19, 2025
denylist: ['white', 'orange'],
})),
}),
price: sns.Filter.filter(sns.SubscriptionFilter.numericFilter({
Copy link
Contributor Author

@jaw111 jaw111 Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarification Request:

Does it make sense to specify multiple numeric filters that contradict each other? I assume the message has to match all filter rules to be sent to the SQS queue (logic is AND not OR), but the allowed values 100 and 200 will not satisfy the other numeric filters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reading the documentation, it appears the OR logic would apply. This means the filter would match any numeric value due to the greaterThan: 500 and lessThan: 1000 constraints.

So, it depends on what the intended purpose of such an integration test is. Should it just check the CloudFormation stack is built and deployed, or also test the behavior of the filter does what is expected and messages get filtered accordingly to subscribers?

@jaw111 jaw111 force-pushed the 34707-sns-subscription-filter-exists branch 4 times, most recently from e25ebe1 to b2d43cd Compare June 24, 2025 09:37
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 24, 2025
@jaw111 jaw111 force-pushed the 34707-sns-subscription-filter-exists branch from b2d43cd to 0143a4c Compare June 24, 2025 12:01
@jaw111 jaw111 force-pushed the 34707-sns-subscription-filter-exists branch from 0143a4c to 6c0eb9d Compare June 24, 2025 13:55
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 6c0eb9d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-sns-subscriptions: add support for not exists filter in a subscription filter
2 participants