#✅ - Adding Admin Actions to an existing Amplify project

11 messages · Page 1 of 1 (latest)

soft haven
#

I have a team that has developed a mobile application using API, Auth and Storage. The client now wants to add user administration functions to the app. I found https://docs.amplify.aws/cli/auth/admin/ that describes support of admin actions API. Looks like I cannot modify the existing auth. Fine...not a lot of users in the app now... I tried to remove auth, but there's a dependency on the AppSync service.

Would it be faster to rebuild the entire backend?

stark remnant
#

Hey 👋 are you currently using an imported auth resource? That is likely why it cannot be modified

soft haven
#

Yes.

stark remnant
#

If you want to remove auth you'll first want to disconnect it from the GraphQL API resource, which will also force you to remove the associated auth rules because of the compilation that is auto-invoked after update api

#

you can also add these admin actions manually to a REST API and restrict to a specific group from there

soft haven
#

So I remove api remove then auth remove then auth add with the admin actions and api add. Correct?

stark remnant
#

in your status output it shows API as CREATE so it should be safe to remove entirely. If your API was already deployed I would not have suggested removing as that would delete the underlying DynamoDB tables

#

you can also run amplify update api > Authorization modes > remove Cognito User Pools
then amplify remove auth
and amplify add auth > Manual configuration > step through and add Admin API

soft haven
#

That's because I just create a new env and hadn't pushed it yet

solid swallowBOT
#

✅ - Adding Admin Actions to an existing Amplify project