I am creating 14 user pools and 14 user pool clients through serverless and every time I try to deploy, I’m getting this error
An error occurred: userpoolClient - Rate exceeded (Service: AWSCognitoIdentityProvider; Status Code: 400; Error Code: TooManyRequestsException; Request ID: 5872acf5-d84a-11e8-8b3b-e7b5da027444).
Most of the user pools and their clients are created successfully, because I’ve made sure to use DependsOn, so that each resource is created sequentially and depends on the previous one, but it’s still not reliable enough.
This is an example of a set of resources in my serverless.js (this is repeated 14 times)
"userpool": {
"Type": "AWS::Cognito::UserPool",
"Properties": {
"UserPoolName": "userpool",
"Policies": {
"PasswordPolicy": {
"MinimumLength": 6,
"RequireLowercase": false,
"RequireNumbers": false,
"RequireSymbols": false,
"RequireUppercase": false
}
},
"Schema": [
{
"AttributeDataType": "String",
"Mutable": true,
"Name": "user_id",
"StringAttributeConstraints": {
"MinLength": "1",
"MaxLength": "256"
}
}
]
}
},
"userpoolClient": {
"Type": "AWS::Cognito::UserPoolClient",
"Properties": {
"ClientName": "userpool-client",
"UserPoolId": {
"Ref": "userpool"
},
"ExplicitAuthFlows": [
"ADMIN_NO_SRP_AUTH",
"USER_PASSWORD_AUTH"
],
"ReadAttributes": [
"email",
"email_verified",
"phone_number",
"phone_number_verified",
"custom:user_id"
],
"WriteAttributes": [
"email",
"phone_number"
]
},
"DependsOn": "userpool"
},
Any help would be much appreciated. Is there anything I’m missing from the serverless config?