- Newest
- Most votes
- Most comments
The errors you're encountering are related to resource limits in Amazon Cognito, but not specifically to the number of app clients.
The "[LimitExceededException] Failed to create resource server 'default-m2m-resource-server'" error indicates that you've reached the maximum number of resource servers that can be created in your user pool. Amazon Cognito uses resource servers to define custom OAuth 2.0 scopes for machine-to-machine (M2M) authorization.
The "[ScopeDoesNotExistException] Failed to create app client 'test-app'" error suggests that the app client creation is failing because it's trying to reference custom scopes that don't exist or can't be created due to the resource server limit.
While you may be well under the limit of 1,000 app clients, there are separate quotas for resource servers and custom scopes. When creating M2M app clients, Amazon Cognito attempts to create or reference resource servers with custom scopes to support the client credentials flow.
To resolve this issue, you can:
- Check your current resource server usage and see if you've reached the limit
- Request a quota increase for resource servers through the AWS Service Quotas console
- Consider consolidating existing resource servers by using the same resource server for multiple app clients with different scope configurations
- Review your custom scope implementation to ensure you're using scope-based multi-tenancy efficiently
For the quota increase, navigate to the AWS Service Quotas console, find the relevant quota for Amazon Cognito resource servers, select "Request quota increase," enter your desired new value, and submit the request.
Sources
Error: Limit exceeded - AWS Resource Access Manager
CreateResourceServer - Amazon Cognito User Pools
Custom scope multi-tenancy best practices - Amazon Cognito
Scopes, M2M, and APIs with resource servers - Amazon Cognito
Relevant content
- asked 3 years ago
- asked 2 years ago
