amplify-cli: error checkout existing environment
Describe the bug I am not able to checkout my environment.
EDIT: this was working earlier today!
Amplify CLI Version 4.35.0
To Reproduce see below
Expected behavior my environment checks out, or a reasonable error message is provided.
Screenshots
$ amplify env checkout dev
⠴ Initializing your environment: devEnvironment 'dev' not found.
Try running "amplify env add" to add a new environment.
If this backend already exists, try restoring it's definition in your team-provider-info.json file.
Desktop (please complete the following information):
- OS: OSX 10.13
- Node Version. 12.x
Additional context My devops team is always changing permissions.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (5 by maintainers)
4.36.2 just magically started working for me today. It prompted me to update to 4.37.0 so I will try that now.
No issues with 4.37.0 either. I am guessing the admins of my account were changing permissions.
Please implement better techniques to show the error to the user.
is that even possible?
ashkan@ashkan-VirtualBox:$ amplify env list
ashkan@ashkan-VirtualBox:$ amplify -v 4.36.2 ashkan@ashkan-VirtualBox:$ amplify env checkout production ✔ Initialized provider successfully. Initialized your environment successfully. ashkan@ashkan-VirtualBox:$ amplify -v 4.36.2
what is more disturbing is that when I login to AWS Amplify there is only “production” under environments, there is no dev environment there. Does this mean it has been removd?
If I go to cloudformation I can find the stack if I search on its StackName. Feels like the connection between that and the aws amplify app is gone somehow.
edit
I asked another developer in our team to push the dev environment, she could do “amplify env checkout dev” without any problem.
She got this error: An error occurred when pushing the resources to the cloud Resource is not in the state stackUpdateComplete
I will add a new dev environment now so we can continue our work. This does not feel good when things stop working all of a sudden like this!
edit 2
I tried to create a new environment and push it and got similar error:
Resource is not in the state stackUpdateComplete An error occurred during the push operation: Resource is not in the state stackUpdateComplete
Following resources failed
Resource Name: UserPoolClientLambda (AWS::Lambda::Function) Event Type: create Reason: The runtime parameter of nodejs8.10 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs12.x) while creating or updating functions. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 4784235d-6b27-40b2-8236-32705d216d0c; Proxy: null)