Amplify-js: Cognito: Dynamically creating groups from the cli & adding users to groups

Created on 12 Apr 2019  路  4Comments  路  Source: aws-amplify/amplify-js

* What AWS Services are you utilizing? *
AWS Cognito

* Provide additional details e.g. code snippets *
I haven't been able to figure out if it's possible to create groups within cognito user pools from this CLI. I also want to be able to add users who sign up to those groups.

Does this library provide any functionality for these types of things dealing with groups? Or should I be looking somewhere else? Thanks.

Most helpful comment

I think this is a feature request, but you can use the aws-cli cognito-idp service to create groups.

https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/create-group.html

If you want to add users to your group on sign-up, you probably want to do that in one of the Cognito Lambda triggers using the AWS SDK.

https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/admin-add-user-to-group.html

All 4 comments

I think this is a feature request, but you can use the aws-cli cognito-idp service to create groups.

https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/create-group.html

If you want to add users to your group on sign-up, you probably want to do that in one of the Cognito Lambda triggers using the AWS SDK.

https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/admin-add-user-to-group.html

@jkeys-ecg-nmsu Thanks. That seems to answer my question exactly so I'm going to close this.

I think this is a feature request, but you can use the aws-cli cognito-idp service to create groups.

https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/create-group.html

Do you know if this is a currently active feature request, or should we ask for it somewhere?

@Bulletninja I believe it's possible with the new Admin API, but I haven't personally used it. Tagging one of the Amplify JS devs, hopefully that will ping someone who can answer this. @jordanranz

Was this page helpful?
0 / 5 - 0 ratings