https://serverless-stack.com/ logo
#sst
Title
# sst
t

Tyler Flint

03/31/2021, 3:16 AM
personally I’d love to remove the stack name from everything but I am curious why there’s an inconsistency there
f

Frank

03/31/2021, 3:33 AM
@Tyler Flint that’s a good question. Most of resources created by SST have the naming convention of
$stage-$app-$id
with the exception of
sst.Function
and
sst.Bucket
We are letting CloudFormation to auto generating resource names for
Function
and
Bucket
because we want them to be unique. • For
Function
, if we hardcode the function name, the CloudWatch log group name will also be hardcoded. And because CloudWatch log groups are retained after you remove them, so if you remove the stack and redeploy, the deployment will fail with the error
log group with the same id already exist.
• For
Bucket
, the name needs to be globally unique. So it’s safer to let CloudFormation to auto generate them.
And when CloudFormation auto generates a name, it often has the stack name in them.
Let me know if that makes sense.
That said, the auto generated
Function
names are pretty ugly, and we are thinking of fixing it - https://github.com/serverless-stack/serverless-stack/discussions/236 I’d love to have you chime in the thread and share your ideas.
t

Tyler Flint

03/31/2021, 11:18 AM
That makes sense. Thanks for the clarification!