From 0826cfa3fb44c91e37d26eec8c82bf615e6eb075 Mon Sep 17 00:00:00 2001 From: Luis Duarte Date: Fri, 1 Nov 2024 11:55:27 +0000 Subject: [PATCH] Fetch AutoDeleteOldAlias from Metadata instead of Properties --- samcli/lib/sync/flows/function_sync_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samcli/lib/sync/flows/function_sync_flow.py b/samcli/lib/sync/flows/function_sync_flow.py index 449b4f0aa4..8fb1d97225 100644 --- a/samcli/lib/sync/flows/function_sync_flow.py +++ b/samcli/lib/sync/flows/function_sync_flow.py @@ -109,7 +109,7 @@ def gather_dependencies(self) -> List[SyncFlow]: raise FunctionNotFound(f"Unable to find function {self._function_identifier}") auto_publish_alias_name = function_resource.get("Properties", dict()).get("AutoPublishAlias", None) - auto_delete_old_alias = function_resource.get("Properties", dict()).get("AutoDeleteOldAlias", False) + auto_delete_old_alias = function_resource.get("Metadata", dict()).get("AutoDeleteOldAlias", False) if auto_publish_alias_name: sync_flows.append( AliasVersionSyncFlow(