diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/environmentVariablesHelper.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/environmentVariablesHelper.ts index a9d5ffcf049..42c757db084 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/environmentVariablesHelper.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/environmentVariablesHelper.ts @@ -248,7 +248,7 @@ const deleteEnvironmentVariable = (resourceName: string, targetedKey: string): v return item.cloudFormationParameterName !== cameledKey && item.environmentVariableName !== targetedKey; }); _.unset(newReferences, targetedKey); - _.unset(newParameters, targetedKey); + _.unset(newParameters, cameledKey); _.unset(newKeyValue, cameledKey); setStoredList(resourceName, newList);