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

Adding existing UserPool and Appsync API to amplify project

Open ChrisWun opened this issue 8 years ago • 30 comments

** Which Category is your question related to? ** Usage / Feature Request

** What AWS Services are you utilizing? ** AWS Appsync, Cognito UserPools

** Provide additional details e.g. code snippets ** I would like to add existing UserPools and APIs to the local amplify project. For amplify codegen this is possible by the command amplify add codegen --apiId xyz Are there similar commands for amplify auth and amplify api? If not, I would wish for something like that.

ChrisWun avatar Oct 09 '18 11:10 ChrisWun

The Amplify CLI does not currently have this functionality, but it is certainly a good suggestion with many use cases, so I'm tagging this as a feature request.

haverchuck avatar Oct 10 '18 14:10 haverchuck

+1 for this feature. It would be extremely useful.

budkin76 avatar Oct 16 '18 00:10 budkin76

For when will the feature be?

jabzumnd avatar Oct 31 '18 00:10 jabzumnd

+1

MiMo42 avatar Dec 11 '18 19:12 MiMo42

+1

Chandher05 avatar Dec 17 '18 06:12 Chandher05

+1

genunity avatar Jan 04 '19 03:01 genunity

+1 I'm migrating from Mobilehub to Amplify and it doesn't look like amplify allows me to hook up to my existing userpool. If someone can point me in the right direction, it would be much appreciated.

supermikol avatar Jan 09 '19 19:01 supermikol

+1 to add existing API Gateway, AppSync, MongoDB, AuroraDB, Coginto UserPool, Coginto Identity pool and Coginto AppClient.

fullStackDataSolutions avatar Jan 11 '19 19:01 fullStackDataSolutions

+1

bmilesp avatar Jan 27 '19 21:01 bmilesp

+1 I'm migrating from Mobilehub to Amplify and it doesn't look like amplify allows me to hook up to my existing userpool. If someone can point me in the right direction, it would be much appreciated.

You can manually add user pools, you just need to figure your app with proper resource data. EI, replace IDs with the one for your existing resources.

fullStackDataSolutions avatar Feb 07 '19 20:02 fullStackDataSolutions

+1

fbiel avatar Feb 11 '19 13:02 fbiel

+1

pblankley avatar Feb 14 '19 14:02 pblankley

+1

phil-andrews avatar Mar 16 '19 11:03 phil-andrews

+1

rush86999 avatar Mar 17 '19 17:03 rush86999

BTW, There is a way to add existing Cognito User Pools to your vue app. Please visit https://aws-amplify.github.io/docs/js/start?platform=vue and scroll to bottom till you reach Existing AWS Resources.

TLDR;
In your App.js instead of doing Amplify.configure(awsmobile), do:

Amplify.configure({
    Auth: {
        // REQUIRED - Amazon Cognito Identity Pool ID
        identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab', 
        // REQUIRED - Amazon Cognito Region
        region: 'XX-XXXX-X', 
        // OPTIONAL - Amazon Cognito User Pool ID
        userPoolId: 'XX-XXXX-X_abcd1234',
        // OPTIONAL - Amazon Cognito Web Client ID
        userPoolWebClientId: 'XX-XXXX-X_abcd1234', 
    }
});

c2tarun avatar Apr 22 '19 00:04 c2tarun

+1

sccheruku avatar Apr 29 '19 17:04 sccheruku

Any updates on this issue?

borisdering avatar Jul 11 '19 11:07 borisdering

+1 Any update on this?

im-dnsosso avatar Oct 31 '19 09:10 im-dnsosso

+1 I have to say from all AWS service that I am using (AppSync, DynamoDb, Cognito, Android-sdk) the amplify cli is by far the most obscure. Maybe it would be a better workflow to do the schema transformation directly in the AWS console and only download the ready to use configuration, similar to the amplify add codegen command. In my point of view, this would be much more consistent.

Rodiot89 avatar Nov 14 '19 09:11 Rodiot89

+1 Our whole team tried to figure out how to take our existing AppSync (which works great with React JS on the web) and build an Amplify iOS/Android app that consumes it... the solution definitely seems occluded. It is as though the entire Amplify product is focused solely on greenfield apps and not really thought through for existing use cases...

Sorry thats more of a criticism than anything, as I don't really have much to offer in the way of a solution.

Genkilabs avatar Jan 23 '20 16:01 Genkilabs