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

feat(sns): add delivery policy to sns subscriptions #30830

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LaurenceWarne
Copy link
Contributor

@LaurenceWarne LaurenceWarne commented Jul 11, 2024

Issue # (if applicable)

Closes #17576.

Reason for this change

To allow setting of delivery policy for appropriate sns subscriptions.

Description of changes

Subscriptions can now take a new parameter deliveryPolicy which consists of a healthyRetryPolicy, a throttlePolicy, and a requestPolicy (each having the same parameters described here: https://docs.aws.amazon.com/sns/latest/dg/sns-message-delivery-retries.html#creating-delivery-policy).

Description of how you validated changes

New integration test along with unit tests.

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 the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Jul 11, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team July 11, 2024 19:36
@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 labels Jul 11, 2024
* Algorithms which can be used by SNS to calculate the delays associated with all of the retry attempts between the first and last retries in the backoff phase.
*/
export enum BackoffFunction {
/** Arithmetic.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not the best doc I've ever written 😅 , the best indicator of to what these each of these do that I found was an image at the very bottom of the doc page here: https://docs.aws.amazon.com/sns/latest/dg/sns-message-delivery-retries.html - suggestions welcome.

/** The minimum delay for a retry (in seconds). Must be at least 1 and not exceed `maxDelayTarget`.
* @default 20
*/
readonly minDelayTarget: number;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only, this and the next two appear to be mandatory if healthyRetryPolicy is specified, thought I can't find any specific doc for this.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@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 Jul 11, 2024
@pahud
Copy link
Contributor

pahud commented Jul 30, 2024

Hi

This PR has been pending for community review for a while. Please consider posting it on the #contributing channel in cdk.dev. Community members will be on the lookout there as well for possible reviews.

Check How to get your P2 PR community reviewed for more details.

@LaurenceWarne
Copy link
Contributor Author

Thanks, I've posted on the channel.

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.

(sns): Allow delivery retry policy configuration of HTTPS subscription on SNS topic
3 participants