question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

amplify env checkout prod|dev returns an error message

See original GitHub issue

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the Amplify Console GitHub Issue Tracker

Describe the bug A clear and concise description of what the bug is.

Thank you for the provided information.

After dedicating whole day today, I’m finally able to replicate your issue on my end. To be precise, not exact error but close.

What I did was I used Amplify CLI to notifications: SMS, GCM to the local project then using AWS Pinpoint console to enable Email channel [1] before syncing the change back to local by using the command amplify env pull --restore.

Below is the error I encountered

✔ Initialized provider successfully.
✔ Channel is not setup for APNS 
✔ Channel information retrieved for FCM
✔ Channel information retrieved for Email
✔ Channel information retrieved for SMS
✖ update channel error
✖ There was an error initializing your environment.
There were 2 validation errors:
* MissingRequiredParameter: Missing required key 'FromAddress' in params.EmailChannelRequest
* MissingRequiredParameter: Missing required key 'Identity' in params.EmailChannelRequest
MultipleValidationErrors: There were 2 validation errors:
* MissingRequiredParameter: Missing required key 'FromAddress' in params.EmailChannelRequest
* MissingRequiredParameter: Missing required key 'Identity' in params.EmailChannelRequest
   at ParamValidator.validate (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/param_validator.js:40:28)
   at Request.VALIDATE_PARAMETERS (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/event_listeners.js:132:42)
   at Request.callListeners (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
   at callNextListener (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
   at /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/event_listeners.js:86:9
   at finish (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/config.js:386:7)
   at /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/config.js:404:9
   at Credentials.get (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/credentials.js:127:7)
   at getAsyncCredentials (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/config.js:398:24)
   at Config.getCredentials (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/config.js:418:9)


**Amplify CLI Version**
You can use `amplify -v` to check the amplify cli version on your system
4.41.1

**To Reproduce**
Steps to reproduce the behavior or terminal output if applicable

1. Enable FCM/APNs/Email/SNS notfications using `amplify notifications add`
2. `amplify env checkout prod`
3. Causes the above error.
 
**Expected behavior**
A clear and concise description of what you expected to happen.

Check out of defined prod environment.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: [e.g. Mac/Windows/Ubuntu]
 - Node Version. You can use `node -v` to check the node version on your system

MacOS 11.1
Node v12.13.1

**Additional context**
Add any other context about the problem here.

Reported to AWS support. Got workaround.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
kaustavghosh06commented, Mar 24, 2021

We pushed in a bunch of fixes in the latest cli version tied to notification bug fixes. Could you’ll please give it a try and see if the issue still exists?

0reactions
github-actions[bot]commented, May 24, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"amplify env checkout" suddenly fails with validation error
I have tried to restore the environment from the cloud with amplify env pull --restore , but this results in the same error....
Read more >
Configuring build settings - AWS Amplify Hosting
Configure the build settings for an app deployed with Amplify Hosting. ... Using the envCache , we can store information on the deployed...
Read more >
Multiple Environments with AWS Amplify
In this tutorial, you are going to learn how to use Amplify's env command. We will walk through an example where two people...
Read more >
Team environments - Commands - AWS Amplify Docs
Use this command to checkout the <env-name> environment. Add the --restore flag to overwrite your local changes. List environments.
Read more >
AWS Amplify - There was an error initializing your environment
AWS Amplify - There was an error initializing your environment - How to fix ... Next, once you have run an npm install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found