-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How on earth do I get aws_cognito_identity_pool_id to auto-populate in aws-exports.js? #7184
Comments
Hi @Trevor-mc2 the |
Oh yes, for sure. I have definitely regenerated But the aws_cognito_identity_pool_id associated with my user pool still isn't being automagically added to Thanks. |
Okay, so.. what part of the Amplify setup process links the id pool with the user pool? I had this working once, but the Amplify defaults for username were case-sensitive, so I had to delete that auth setup and create a new one. And now I don't get an id pool id injected into my aws-exports.js file. Is there a way to add that user-pool-to-identity-pool association in an Amplify config file someplace? Ideally without having to delete my entire user pool and re-create it from scratch (again) with the Amplify CLI? Thanks. Appreciate you getting back to me, @edwardfoyle |
So.. I was exploring the options in
That "undefined" IdentityPool value explains why my app no longer has an identity pool defined in ... ... ... I'm running the very latest version of Amplify CLI: 4.50.0. ... ... So... How on earth do I get the auth config set correctly? Nothing in the current |
Oh interesting. When I created a new Amplify project from scratch, the yml template for the Auth did contain a section that defined an identity pool:
"Always created"... Hah. Haha. Now, looking at my current system's Auth template, I see no such thing. No mention of identity pools. That template looks real old, though... it looks nothing like the one that Amplify just generated for my new project. My original template file starts with edit: the new template also says |
@Trevor-mc2 when you set up auth, did you select
You can also update this by running It sounds like the auth resource is configured with just a User Pool and doing the above should add an identity pool as well |
O. M. G. I had never tried the default Auth configuration. 🤦♂️ Nor had I tried enabling AWS IAM controls for my user pool. A million thanks. That's what ended up working for me. Thanks so much for the assist! I'm all good now. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Amplify CLI Version
4.49.0
What AWS Services are you utilizing?
Amplify, Dynamo, S3
Provide additional details e.g. code snippets
Calling Storage.put in my app is failing because aws_cognito_identity_pool_id isn't defined in my aws-exports.js file. I can manually edit my local aws-exports.js to define the correct aws_cognito_identity_pool_id, and calling s3 works fine after that (locally), but editing an auto-generated file like aws-exports.js is obviously not ideal. I don't want to have to check it in.
I tried importing an existing auth into my development environment, but doing that forces me to "remove" the existing auth, which deletes all the templates that define how to create my app's auth scheme. And it looks like I will have to manually reconfigure the auth for my other environments if I go that route, too.
Is there a config file or template someplace where I can simply add the correct identity pool id that I want the app to use with my existing user pool.. without blowing away the definition of my existing user pool? So it'll automagically show up in aws-exports.js when it gets auto-generated? That would be ideal.
Thanks.
The text was updated successfully, but these errors were encountered: