You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an error when pushing a userPoolGroups stack
MYGROUP already exists in stack arn:aws:cloudformation:us-west-2:...
I previously deployed an amplify userPoolGroup stack using amplify CLI 9 which allowed direct changes to the cloud formation template. We added several userPoolGroups to the template using logicalIDs that didn't append "Group".
This appears to an issue as when deploying in amplify cli 12 it generates CF templates with "Group" appended to all user pool group logicalIDs (so [MyGroupName]Group)
For the groups we created in amplify CLI 9 that have "Group" appended it correctly registers as an update to an existing user pool group, however for the few that have the different logicalIDs it fails since it views them as new user pool groups, and encounters an error when attempting to create them.
Is it possible to modify the logicalID using override.ts or some other method?
I have tried using override.ts but I haven't found a way to change the logicalID, based on the typescript types it doesn't seem to be an available field.
If the logicalID cannot be changed, is there another method I can use to deploy that doesn't remove the existing groups which are in use?
The text was updated successfully, but these errors were encountered:
I found the function overrideLogicalId which worked
functionremoveGroupSuffixFromUserPoolLogicalID(resources: AmplifyUserPoolGroupStackTemplate,group: string,){if(resources.userPoolGroup&&resources.userPoolGroup[group]){console.log(`removeGroupSuffixFromUserPoolLogicalID for ${group}`);resources.userPoolGroup[group].overrideLogicalId(group);}else{console.log(`cannot removeGroupSuffixFromUserPoolLogicalID, no userPoolGroup for ${group}`);}}exportfunctionoverride(resources: AmplifyUserPoolGroupStackTemplate,amplifyProjectInfo: AmplifyProjectInfo,){// these groups were created in Amplify CLI 9 using a name different than the generated group name.removeGroupSuffixFromUserPoolLogicalID(resources,'MYGROUP');}
Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Amplify CLI Version
12
Question
Hello!
I am encountering an error when pushing a userPoolGroups stack
I previously deployed an amplify userPoolGroup stack using amplify CLI 9 which allowed direct changes to the cloud formation template. We added several userPoolGroups to the template using logicalIDs that didn't append "Group".
This appears to an issue as when deploying in amplify cli 12 it generates CF templates with "Group" appended to all user pool group logicalIDs (so [MyGroupName]Group)
For the groups we created in amplify CLI 9 that have "Group" appended it correctly registers as an update to an existing user pool group, however for the few that have the different logicalIDs it fails since it views them as new user pool groups, and encounters an error when attempting to create them.
Is it possible to modify the logicalID using
override.ts
or some other method?previous template we deployed via cli 9
generated by amplify-cli 12 during
amplify push
I have tried using
override.ts
but I haven't found a way to change the logicalID, based on the typescript types it doesn't seem to be an available field.If the logicalID cannot be changed, is there another method I can use to deploy that doesn't remove the existing groups which are in use?
The text was updated successfully, but these errors were encountered: