-
Notifications
You must be signed in to change notification settings - Fork 27
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
Create one scaling dedicated IAM role per project (not table) #31
Comments
Good point 👍 |
It would also be useful to allow use of a role defined outside the stack. |
I addressed this in plain JS version of this module at https://github.com/medikoo/serverless-plugin-dynamodb-autoscaling (still role name remains fixed at this point) |
@sbstjn - Just had a very quick check of the source. Wouldn't changing this line fix it? (Unless there is a reason to have an option to either have 1 role or multiple roles?)
to
|
This only works if you update/create the role to have permission for every table. I try to have the role permissions as restricted as possible and to avoid |
Basically those two approaches are very different regarding (un-)restricted access: |
Yep, I had a play and could see it wasn't going to be so simple unfortunately. I have little knowledge of CloudFormation. But could you create a single role that has access only to the tables that have been added to the e.g. loop through all the tables, build a list, and give that list of resources to the Thanks for the great work btw, I spent a while trying to get the config working manually, gave up and this just worked in seconds! |
serverless-plugin-dynamodb-autoscaling now reuses existing project's IAM role (so no single IAM role resource is created). Project's IAM role provides lambdas with access to dynamo tables, and range of access is decided by owner of a project. Same range of access is automatically provided to autoscaling resources. |
Thank you @medikoo ... just switched to your plugin, looks great & I like your configuration approach. There were so many roles being created across all of my dynamoDb's & stages that I couldn't assign the proper roles to the Cognito identity pool, the list was so long! Your work really helped us, thanks again. |
In my case, I haven't permission to create roles and I just can't use the plugin. Is there any way to workaroung on it by using this plugin ? |
Currently, project creates scaling role per table, which inconveniently increases resources count of CloudFormation stack, e.g. with larger number of tables it's more likely to reach 200 resources limit which is not shiftable.
As it's scalable targets that states which roles they're going to use, the
ScalingRole
can safely be configured as one global resource, it's also how it's exampled in AWS CloudFormation documentationThe text was updated successfully, but these errors were encountered: