Skip to content

MI-291: Add Resource Prefix Aspect#1627

Merged
kai-nguyen-aligent merged 3 commits intomainfrom
feat/MI-291-resource-prefix-aspect
Mar 13, 2026
Merged

MI-291: Add Resource Prefix Aspect#1627
kai-nguyen-aligent merged 3 commits intomainfrom
feat/MI-291-resource-prefix-aspect

Conversation

@kai-nguyen-aligent
Copy link
Contributor

Description of the proposed changes

In old Serverless Framework stacks, we use prefixes to restrict access to resources. This work well for Serverless Framework as we implicitly set the resource names. However, it does not work for CDK stacks due to the fact that CDK automatically name resources for us. We planned to use resource tags instead but many resources are not ABAC (tag-based IAM auth) supported. Eg: Lambda, SQS, SNS, API Gateway. As a result, we continue using prefixes instead of tags. This aspect is developed to support:

  • Add a prefix to resource name. When a resource has no explicit name, converts the CDK logical ID (e.g. OrdersTableCB1764FD) to kebab case (orders-table-cb1764-fd) and prefixes it.
  • Throw errors if the resource name is too long.

⚠️ Please make sure the changes adhere to the guidelines mentioned here

Notes to reviewers

🛈 When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback

@kai-nguyen-aligent kai-nguyen-aligent requested a review from a team as a code owner March 12, 2026 04:31
@github-actions
Copy link
Contributor

Changeset detected - Thanks for adding release notes!

Copy link
Member

@TheOrangePuff TheOrangePuff left a comment

Choose a reason for hiding this comment

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

Cool idea, looks good to me!

@kai-nguyen-aligent kai-nguyen-aligent merged commit 0f4bf8d into main Mar 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants