DEPRECATED-lambda-cfn icon indicating copy to clipboard operation
DEPRECATED-lambda-cfn copied to clipboard

Reducing the effects of changing the function name

Open zmully opened this issue 8 years ago • 0 comments

It is not obvious the consequences of updating the function name specified in the function.template.js for a running function. Because this name is used within the CloudFormation template as a prefix for resources, changing the function name also changes the names these resources, and CloudFormation treats the renaming as a requests for new resources. It'll delete all old resources and create new ones, and many of the new resources will have different ARNs and URLs (like SNS topics, API Gateway URLs). This can wreak havoc if there are external dependencies configured with the old values.

With the one rule, one stack architecture, I believe it may be possible to remove the function name prefixing, and remove the requirement for a function name declaration within the template entirely. This would prevent a mistaken name change from drastically altering running stack.

zmully avatar Sep 05 '17 21:09 zmully