Description
Description:
Per the documentation, AutoPublishAlias only supports publishing another function version when the CodeUri changes. While having AutoPublishAlias in its current state is still beneficial, I have found this has caused much confusion and even bugs that took quite some time to track down. Specifically, when things such as environment variables are changed on the stack.
The "gotcha" that occurs is because an environment variable might be passed as a stack parameter (for instance). When doing a stack update and updating the parameter, everything appears to execute cleanly. The stack change set picks up that the function needs to be updated, etc and the update is marked as successful. This causes the false belief that your update got applied successfully, only on close inspection of the lambda function do you discover that the lambda function was updated, but a new version was not tied to the alias.
I am curious if there is plans to remove this limitation? While the documentation does spell this out clearly, unless someone updating the stack knows that function(s) in the stack are using the AutoPublishAlias
feature and knows about this caveat - they they might think an update was successful with no other action needed.