Prefix CloudFormation export names with DEP_NAME#133
Draft
OscarGonzalez-FortyAU wants to merge 1 commit intogaiin-platform:mainfrom
Draft
Prefix CloudFormation export names with DEP_NAME#133OscarGonzalez-FortyAU wants to merge 1 commit intogaiin-platform:mainfrom
OscarGonzalez-FortyAU wants to merge 1 commit intogaiin-platform:mainfrom
Conversation
jasonbrd
pushed a commit
to jasonbrd/amplify-genai-backend
that referenced
this pull request
Jun 5, 2025
Code Interpreter Image Support
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the
Outputssection in our serverless.yml to prefix all CloudFormation export names with a deployment-specific identifier derived from ${self:custom.stageVars.DEP_NAME}.For example, an export previously named:
${sls:stage}-RestApiIdWill now be named:
${self:custom.stageVars.DEP_NAME}-${sls:stage}-RestApiIdThis change enhances namespacing, allowing multiple service instances to coexist without CloudFormation export name collisions.
Important Deployment Note for Existing Environments:
Attempting to directly deploy this version of the producer stack (which now only defines the new, prefixed export names) into an environment where consumer stacks still reference the old, unprefixed names will result in a deployment failure for this producer stack.
CloudFormation will prevent the deletion of the old export names because they are still in use by other stacks. Consequently, the new naming convention will not be applied by this deployment attempt, and while currently running consumer services won't be immediately broken by this specific failed deployment of the producer, the producer stack itself cannot be updated to the new naming standard without a specific rollout strategy.
Marked as a draft PR for this reason.
To successfully implement this naming update, the "double reference" deployment strategy is required for existing environments.
Ref.: https://github.com/orgs/gaiin-platform/discussions/7