'roleName' failed to satisfy constraint: Member must have length less than or equal to 64
charleswhchan opened this issue · comments
serverless.yml:
plugins:
- serverless-dynamodb-autoscaling
custom:
capacities:
- table: subscriptionsTable
index:
- SubscriptionsUserIdIndex
read:
minimum: 1
maximum: 100
usage: 0.7
write:
minimum: 1
maximum: 100
usage: 0.7
output:
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: DynamoDBAutoscaleRolesubscriptionsTableSubscriptionsUserIdIndexdev - 1 validation error detected: Value 'DynamoDBAutoscaleRolesubscriptionsTableSubscriptionsUserIdIndexdev' at 'roleName' failed to satisfy constraint: Member must have length less than or equal to 64.
I think the error is indicating the role name must be <=64 characters. When the role name is generated, is there a way to shorten it? Or use the existing DynamoDBAutoscaleRole
?
Thank you for always bringing up cases where the plugin does not work ;) For a first fix, I just use a md5
checksum instead of the name, if the generate name would be longer than 64 characters. See #12 for details …
@sbstjn: You are welcome! I am simply reporting the issues found when using this plugin in my day job. This is a great plugin for the serverless community and we all thank you for that.
I have reviewed the changed and added a suggestion. Looks good otherwise! 👍
Released as v0.3.2