amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Amplify push doesn't recognize functions environment variables changes

Open ggorge-etiqa opened this issue 1 year ago • 3 comments

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v18.17.1

Amplify CLI Version

12.6.0

What operating system are you using?

Ubuntu

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Describe the bug

$ amplify function update

? Which setting do you want to update? Environment variables configuration
? Select what you want to do with environment variables: Update existing environment variables
? Which environment variable do you want to update: MY_TABLE
? Enter the environment variable name: MY_TABLE
? Enter the environment variable value: tablenamehere
? Select what you want to do with environment variables: I'm done
? Do you want to edit the local lambda function now? N

$ git status shows

modified:   amplify/team-provider-info.json

$ amplify function push --force shows No Change

The variable is not updated in AWS Lambda function.

Expected behavior

I'm expecting that changing a function environment variable can be pushable, at least with amplify function push --force.

Reproduction steps

  1. create a function with an environment variable with a wrong value
  2. run $ amplify function update to change the variable value
  3. try to push the function with amplify push function --force

Project Identifier

No response

Log output

No response

Additional information

No response

Before submitting, please confirm:

  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • [X] I have removed any sensitive information from my code snippets and submission.

ggorge-etiqa avatar Oct 12 '23 08:10 ggorge-etiqa