Skip to content
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

AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException #402

Closed
michaelbwebb opened this issue Mar 26, 2021 · 5 comments
Labels
guidance Question that needs advice or information.

Comments

@michaelbwebb
Copy link
Contributor

❓ Guidance Question

The Question

AWSCDK and AWSCLI have both been installed, and when deploying the CDK application I get the following error message:

8:37:22 AM | CREATE_FAILED | AWS::Cognito::UserPoolDomain | ICS_USERS_POOL_DOMAIN
Domain already associated with another user pool. (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException; Request ID: f3f0b188-1063-4f83-a884-e810588a749c; Proxy: null)
8:37:24 AM | ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | ImageContentSearch

However I do not have any domains configured so unsure as to why this error is being generated.

Environment

  • CDK CLI Version: 1.94.1 (build 60d8f91)
  • Example: Image Search Demo Application
  • OS: MacOS
  • Language: Python
@michaelbwebb michaelbwebb added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Mar 26, 2021
@NGL321 NGL321 self-assigned this May 17, 2021
@NGL321 NGL321 removed their assignment Jul 19, 2021
@NGL321 NGL321 removed the needs-triage This issue or PR still needs to be triaged. label Jul 23, 2021
@gshpychka
Copy link

@NGL321 any idea why this can happen?

@poul-kg
Copy link

poul-kg commented Sep 15, 2021

@BrandonMichaelWebb depends on how you're specifying your domain name, if you're doing it via domainPrefix than make sure it's globally unique. I had the same problem today, as I was trying to use development as my domainPrefix and looks like that https://development.auth.ap-southeast-2.amazoncognito.com domain is already taken by someone. So I've updated my domainPrefix to something like aaaa-development and it worked.

@elginlam-amazon
Copy link

You can use the node.addr property to create a unique domainPrefix.

cognitoDomain: {
                domainPrefix: `${this.node.addr}`
}

@peterwoodworth
Copy link
Contributor

Yes - the domain must be globally unique or you may run into this failure. Thanks for the answer @poul-kg

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

mergify bot pushed a commit to aws/aws-cdk that referenced this issue Mar 28, 2022
fixes #19434 

updated integ test domain value, because old value was [failing deployment](aws-samples/aws-cdk-examples#402)

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [x] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
StevePotter pushed a commit to StevePotter/aws-cdk that referenced this issue Apr 27, 2022
)

fixes aws#19434 

updated integ test domain value, because old value was [failing deployment](aws-samples/aws-cdk-examples#402)

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [x] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

6 participants