Skip to content

Conversation

ritoban23
Copy link

Issue #35736

Closes #35736.

Reason for this change

SNS Topic documentation lacked detail compared to SQS Queue docs. Methods like grantPublish() and grantSubscribe() didn't specify which permissions were granted.

Description of changes

Enhanced JSDoc comments in packages/aws-cdk-lib/aws-sns/lib/topic-base.ts to match SQS documentation style:

  • grantPublish(): Documents sns:Publish permission and KMS permissions (kms:Decrypt, kms:GenerateDataKey*) for encrypted topics
  • grantSubscribe(): Documents sns:Subscribe permission
  • addSubscription(): Explains CloudFormation AWS::SNS::Subscription resource creation

Describe any new or updated permissions being added

No new permissions added - only documenting existing ones.

Description of how you validated changes

  • JSDoc format matches existing SQS patterns

Checklist


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

Enhanced JSDoc comments for grantPublish(), grantSubscribe(), and addSubscription() methods to explicitly document the IAM and KMS permissions granted, similar to the level of detail in SQS Queue documentation.

- grantPublish() now documents sns:Publish permission and KMS permissions (kms:Decrypt, kms:GenerateDataKey*) for encrypted topics

- grantSubscribe() now documents sns:Subscribe permission

- addSubscription() now describes the CloudFormation resources created

Fixes aws#35736
@aws-cdk-automation aws-cdk-automation requested a review from a team October 15, 2025 07:31
@github-actions github-actions bot added effort/small Small work item – less than a day of effort p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Oct 15, 2025
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)

@ritoban23 ritoban23 changed the title docs(aws-sns): add detailed permissions documentation to Topic methods docs(sns): add detailed permissions documentation to Topic methods Oct 15, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review October 15, 2025 07:37

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

Copy link

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Looks good from my side (I'm not an AWS CDK developer, but I requested this change in #35736). Thank you!

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 p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sns: Add details to aws_cdk.aws_sns/Topic.html documentation

3 participants