Open ddotx opened 3 years ago
Same here
I got the same error, but adding those variants don't solve it, any thoughts?
I'm receiving the same error after importing my own DynamoDB into my Amplify setup. Any assistance would be appreciated! `2021-02-21T21:04:08.412Z [WARNING]: - Fetching updates to backend environment: dev from the cloud.
2021-02-21T21:04:08.797Z [WARNING]: ✔ Successfully pulled backend environment dev from the cloud.
2021-02-21T21:04:08.861Z [WARNING]: ✖ There was an error initializing your environment.
2021-02-21T21:04:08.864Z [INFO]: [31mFailed to pull the backend.[39m
2021-02-21T21:04:08.866Z [INFO]: [31mstorage headless is missing the following inputParams tables, region[39m
2021-02-21T21:04:08.870Z [INFO]: [0mError: storage headless is missing the following inputParams tables, region[0m [0m at ensureHeadlessParameters (/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-storage/src/provider-utils/awscloudformation/import/import-dynamodb.ts:439:11)[0m [0m at headlessImport (/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-storage/src/provider-utils/awscloudformation/import/import-dynamodb.ts:387:40)[0m [0m at importedDynamoDBEnvInit (/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-storage/src/provider-utils/awscloudformation/import/import-dynamodb.ts:277:18)[0m [0m at processTicksAndRejections (internal/process/task_queues.js:97:5)[0m [0m at updateConfigOnEnvInit (/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-storage/src/provider-utils/awscloudformation/index.js:84:72)[0m [0m at /root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-storage/src/index.js:150:22[0m 2021-02-21T21:04:08.887Z [ERROR]: !!! Build failed 2021-02-21T21:04:08.887Z [ERROR]: !!! Non-Zero Exit Code detected`
hello has anyone found a fix for this yet?
same here. Does anyone has found a solution?
I have the same problem. Are there any updates?
Also following this issue.
I bumped this issue through Twitter today and received a positive reply. So I'm hopeful something will shake loose with this. https://twitter.com/Z55_Studios/status/1374838470150131714
Hello folks, thanks for reporting this issue. We are currently investigating this.
Update: The issue has been identified, we will prioritize this fix. Will update here as the roll out completes.
Any idea when we can expect a fix for this? Thanks
I have tried everything I can think of to work around this with no luck. Commenting to stay updated
Hello folks, We apologize for the delay. Fix is rolling out and should be in Live in a few days. I'll update the status here when deployment completed
Update: You can now set AMPLIFY_STORAGE_REGION
, and AMPLIFY_STORAGE_TABLES
environment variable to address this issue.
Format of AMPLIFY_STORAGE_TABLES
is {"Resources Name":"Table Name"}
, you can find resource name and table name in your /amplify/team-provider-info.json
file
Example:
AMPLIFY_STORAGE_REGION : us-west-2
AMPLIFY_STORAGE_TABLES: {"testResourceName1":"test-table1","testResourceName2":"test-table2"}
team-provider-info.json
File:
{
...
"categories": {
"storage": {
"testResourceName1": {
"tableName": "test-table1",
"region": "us-west-2",
"arn": "*****",
"streamArn": "****",
"partitionKeyName": "***"
"partitionKeyType": "*",
"sortKeyName": "****",
"sortKeyType": "*"
},
"testResourceName2": {
"tableName": "test-table2",
"region": "us-west-2",
"arn": "*****",
"streamArn": "****",
"partitionKeyName": "***"
"partitionKeyType": "*",
"sortKeyName": "****",
"sortKeyType": "*"
}
}
}
...
}
@victorccccc Thanks for the fix and the update! I can confirm that this fix works and deployment completes successfully.
Issue still exists with amplify version 4.52.0
Issue still exists
I am also still seeing a related issue, even after including environment variables as described above. In the Amplify Console (not Admin UI), the build succeeds and deploys fine. On the home page of the Amplify Admin UI, however, in the "Deployment activity" table, I see one failed job:
Category: jobCategory.GenerateBackendAPIModels
Status: FAILED
Reason: storage headless is missing the following inputParams tables, region
As a result of this, I believe, I am unable to modify my schema via the Amplify Admin UI. Making changes and clicking "Save and deploy" results in an message:
Command failed with exit code 1: /root/.amplify/bin/amplify pull --amplify {"envName":"dev","defaultEditor":"code",...
Deployment status: Failed
- Fetching updates to backend environment: dev from the cloud.
✔ Successfully pulled backend environment dev from the cloud.
✖ There was an error initializing your environment.
...
[32mGraphQL schema compiled successfully.[39m
...
[0mSuccessfully generated models. Generated models can be found in /tmp/amplify...
[31mFailed to pull the backend.
[31mstorage headless is missing the following inputParams tables, region
[0mError: storage headless is missing the following inputParams tables, region
[0m at ensureHeadlessParameters (/snapshot/node_modules/amplify-category-storage/lib/provider-utils/awscloudformation/import/import-dynamodb.js:367:11)
[0m at ensureHeadlessParameters (/snapshot/node_modules/amplify-category-storage/lib/provider-utils/awscloudformation/import/import-dynamodb.js:367:11)[0m
[0m at headlessImport (/snapshot/node_modules/amplify-category-storage/lib/provider-utils/awscloudformation/import/import-dynamodb.js:327:40)[0m
[0m at importedDynamoDBEnvInit (/snapshot/node_modules/amplify-category-storage/lib/provider-utils/awscloudformation/import/import-dynamodb.js:227:18)[0m
[0m at runMicrotasks (<anonymous>)[0m
[0m at processTicksAndRejections (internal/process/task_queues.js:97:5)[0m
[0m at Object.updateConfigOnEnvInit (/snapshot/node_modules/amplify-category-storage/lib/provider-utils/awscloudformation/index.js:157:9)[0m
[0m at /snapshot/node_modules/amplify-category-storage/lib/index.js:216:22[0m
@victorccccc , thank you for the guidance above. That helped substantially, as I was able to get the build working. This seems like it's related. I would like to be able to use the Amplify Admin UI to build out a GraphQL schema, so I'd be grateful for any suggestions or assistance.
@victorccccc (or anyone else) Any idea when this is supposed to get rolled into the latest build? I'm experiencing the issue exactly as described by the OP, so I assume this has not been pushed to the latest production Amplify code. For a little more context:
I started with an existing Amplify project with auth, apis, and functions on the backend. This was deploying perfectly out of a github branch using the default amplify.yml.
Then I imported a dynamo table (i.e. amplify import storage
), which deploys fine in dev using amplify push
.
But when I merged the changes to my deploying branch, I got the error message regarding storage headless is missing the following inputParams tables, region
. Then I found this thread and added AMPLIFY_STORAGE_REGION
and AMPLIFY_STORAGE_TABLES
environment variables in the Amplify console, as you described above. But I am still getting the error.
Is it possible I am missing some other configuration steps?
An alternative solution that worked for me was to set a CATAGORIES environment variable with a value such as:
{"storage":{"region": "us-east-1", "tables": {"mytableresource":"mytablename"}}}
The values are:
It seems a side effect of this approach broke auth configuration on the frontend, which I fixed with a Auth.configure(awsconfig)
as described in this issue comment.
From Originally posted by @hsspain in https://github.com/aws-amplify/amplify-console/issues/1359#issuecomment-745626000
To resolve this error add the following variables to your environment variables in your build:
AMPLIFY_STORAGE_BUCKET_NAME AMPLIFY_STORAGE_REGION
These values should correlate to the bucket name and region for your imported storage.
This documentation will guide you to the right page to add these settings:
https://docs.aws.amazon.com/amplify/latest/userguide/environment-variables.html
@hsspain But not work for me when import dynamo and build Error: storage headless is missing the following inputParams tables, region
and after i add ENV like this
AMPLIFY_STORAGE_REGION AMPLIFY_STORAGE_TABLES
Not Work, Same Error
To Reproduce Steps to reproduce the behavior: On any amplify project with deployed frontend and backend
amplify import storage
amplify push
git add .
git commit -m 'message'
git push
amplify console