Carlos Daniel
01/03/2022, 2:46 AMindex.js
of my application. I have an app called copy-ddb-table, and I was creating a stack called stack on it, so the full name of my stack (when running locally) was supposed to be something like local-copy-ddb-table-stack
, right? But what had happened was, when I passed the property stackName to my stack (line 11), it actually has changed the whole stack name. So instead of having a stack called local-copy-ddb-table-stack
, I was having a stack called local-copy-ddb-table
because is the string generated from my template string.
And the bug is, since the stack name generated by the app was different than the stack name on the props, I received an error when running the sst start
(screenshot 2).Carlos Daniel
01/03/2022, 2:46 AMFrank
Frank
Frank
Carlos Daniel
01/03/2022, 12:26 PMCarlos Daniel
01/03/2022, 12:29 PMFrank
stackName
prop is actually meant to be used to override the default stack name.Frank
Carlos Daniel
01/03/2022, 10:34 PMprops.stackName
, I only meant to pass the string to my Stack but didn’t mean to change the actual stack name or override anything.Carlos Daniel
01/03/2022, 10:36 PMFrank
props
to super()
then CDK uses that as the actual stack name.Frank
new LambdaStack(app, 'stack', ${app.stage}-${app.name})
Carlos Daniel
01/04/2022, 9:21 PMFrank
Carlos Daniel
01/25/2022, 12:49 AM