amplify-studio icon indicating copy to clipboard operation
amplify-studio copied to clipboard

`amplify pull` does not fetch Cognito userGroups created from amplify studio

Open Eliav2 opened this issue 1 year ago • 3 comments

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v18.16.1

Amplify CLI Version

12.10.0

What operating system are you using?

windows

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

only from Amplify studio. not via aws services directly.

Describe the bug

  • created new group in 'User management' tab in amplify studio.
  • amplify pull
  • I would expect to see userPoolGroups resource in my project, however I only have
┌──────────┬─────────────────────────┬───────────┬───────────────────┐
│ Category │ Resource name           │ Operation │ Provider plugin   │
├──────────┼─────────────────────────┼───────────┼───────────────────┤
│ Api      │ medspaceacademy         │ No Change │ awscloudformation │
├──────────┼─────────────────────────┼───────────┼───────────────────┤
│ Auth     │ medspaceacademyc70e7951 │ No Change │ awscloudformation │
├──────────┼─────────────────────────┼───────────┼───────────────────┤
│ Storage  │ medspaceQuestions       │ No Change │ awscloudformation │
└──────────┴─────────────────────────┴───────────┴───────────────────┘

this cognito pull is already hosting some real users. I can't delete it and recreate it using the cli. how do I effectively importing it so my local amplify cli would recognize this user pool?

Expected behavior

.

Reproduction steps

.

Project Identifier

.]

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • [X] I have removed any sensitive information from my code snippets and submission.

Eliav2 avatar Jan 20 '24 19:01 Eliav2

Hey @Eliav2, thank you for reaching. we should be able to add the group using Amplify CLI by running amplify update auth and select Create or update Cognito user pool groups which should create a user pool group managed by Amplify CLI. Do remove the user pool group on the Amplify Studio before adding and pushing on AmplifyCLI to prevent any push failures.

ykethan avatar Jan 22 '24 21:01 ykethan

Yes i know that deleting the pool from amplify studio and recreating it from cli would work. But i can't delete this pool. Does there is any way to 'pull' or 'import' this pool so amplify cli would recognize it? After all, i can just create a new user pool directly from amplify studio. If amplify cli can't be aware of user pools created by amplify studio there should be a clear red warning that notify this or just removing this option completely from amplify studio.

Eliav2 avatar Jan 23 '24 06:01 Eliav2

Hey @Eliav2, you should be able to pull the user pool from studio but it appears pulling the user pool groups created on studio is currently not supported. marking this as feature-request and transferring to amplify studio repository for tracking.

ykethan avatar Jan 23 '24 19:01 ykethan