serverless-dynamodb-local icon indicating copy to clipboard operation
serverless-dynamodb-local copied to clipboard

Migrate won't resolve a generated TableName

Open sethetter opened this issue 8 years ago • 5 comments

When providing raw CloudFormation code in the resources section of serverless.yml, you are able to leave out the TableName and have it default to the arn that serverless will assign it based on the format outlined here.

This is a great approach to defining table names so that your multiple stages will have their own tables, etc. Though, when trying to run sls dynamodb migrate it tells me that a missing TableName param is required.

Is this an error? Or is this a feature that needs to be added?

sethetter avatar Jul 06 '17 15:07 sethetter

Have you heard anything on this? I don't think it would be hard to add this feature and I can't really see any downsides to having it.

thimmig2 avatar Sep 22 '17 15:09 thimmig2

FWIW, I did this. I asked about it on gitter before submitting a PR, but haven't heard anything yet.

https://github.com/kevinsperrine/serverless-dynamodb-local/commit/9438c4d92557b9f35766bf37a2e2a7d8798d4b61

kevinsperrine avatar Aug 05 '18 19:08 kevinsperrine

Any news on this? kevinsperrine's commit looks like it will work. If no table name is present, it generates one. I mean it'd be nice to somehow tap into whatever serverless does to generate table names, but also doesn't really matter since the point of generating table names is you don't care.

vectorjohn avatar Dec 16 '19 21:12 vectorjohn

Is the above PR acceptable? Not sure who to tag... @rehrumesh ?

brettstack avatar Apr 20 '20 21:04 brettstack

Come on maintainers!! Please accept this above PR.

nakshathru avatar May 16 '20 23:05 nakshathru