sbstjn / serverless-dynamodb-autoscaling

Serverless Plugin for Amazon DynamoDB Auto Scaling configuration.
https://sbstjn.com/serverless-dynamodb-auto-scaling-with-cloudformation.html
MIT License
148 stars 27 forks source link

Get table name from Resources #37

Closed dbeja closed 6 years ago

dbeja commented 6 years ago

Hi,

I'm trying to get the table name from Resources section with Ref but doesn't work.

I have this configuration in serverless.yml:

custom:
  capacities:
    - table: { Ref: tblUser }
      read:
        minimum: 5
        maximum: 1000
      write:
        minimum: 5
        maximum: 500

resources:
  Resources:
    tblUser:
...

And when I deploy I get this error:

Serverless: Configure DynamoDB Auto Scaling …
Serverless:  - Building configuration for resource "table/[object Object]"
Serverless: Skipping DynamoDB Auto Scaling: data.charAt is not a function!

Thanks!

dbeja commented 6 years ago

Never mind, I just needed to setup like this:

custom:
  capacities:
    - table: tblUser