aws-amplify / aws-amplify/amplify-cli

amplify pull with function in update status does not recognize env variable and fails on push

Open
#13,327 2 comments 0 reactions 0 assignees View on GitHub
bug functions p4
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### How did you install the Amplify CLI?

_No response_

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

_No response_

### Amplify CLI Version

10.6.0

### What operating system are you using?

Mac

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

no

### Describe the bug

creating a function with env variable and running pull with function in update status will not recognize the env variable when running a update.
adding a new env variable will fail on push due to previous env variable ssm parameter

![image](https://github.com/aws-amplify/amplify-cli/assets/87995712/074c0d57-5496-472c-a6ad-45c3a72f541e)

### Expected behavior

show env variables

### Reproduction steps

1. add function with env variable
2. push
3. update function env variable -> say the name
4. amplify status should show update status
5. amplify pull
6. amplify update function
7. select the same function and the env update config flow
Observe the env variable is not recognized
8. lets say we add a new env variable
9. then run push
Observe fail on push

### Project Identifier

_No response_

### Log output

```
# Put your logs below this line

```

### 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.