Closed elison-chen closed 6 years ago
Hi @elison-chen . Renaming is not supported for this reason: A function can be deployed to different aliases and each of the alias stack references its function arn to protect it from deletion / or renaming in your case. If a function would be renamed its arn would change and thus all aliases referencing that function would break.
Imo the best way is to deprecate a function add a new one (with a new name) and remove the old one from the aliases one after the other. The removal does not have to happen all at once - the function will be removed as soon as the last alias drops it.
@HyperBrain Thank you for the quick reply and solution :)
I get a serverless error when renaming Lambda functions.
For example I have the Lambda function:
Then I want to change the name (prepending 'gg-')
When I run my deploy I get the following error:
What can I do to rename the function? Is it supported?