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 6bb5887503f..a9d5ffcf049 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 @@ -159,7 +159,7 @@ export const askEnvironmentVariableCarryOut = async ( }; export const ensureEnvironmentVariableValues = async (context: $TSContext) => { - const yesFlagSet = context?.exeInfo?.inputParams?.yes; + const yesFlagSet = context?.exeInfo?.inputParams?.yes || context?.input?.options?.yes; const currentEnvName = stateManager.getLocalEnvInfo()?.envName; const teamProviderInfo = stateManager.getTeamProviderInfo(undefined, { throwIfNotExist: false,