I imported an existing storage by following the instructions here. It works fine locally, but the build pipeline fails when i pushed the code.
Steps to reproduce the behavior:
2020-12-10T14:48:44.753Z [WARNING]: ✖ There was an error initializing your environment.
2020-12-10T14:48:44.754Z [INFO]: [31mFailed to pull the backend.[39m
2020-12-10T14:48:44.756Z [INFO]: [31mstorage headless is missing the following inputParams bucketName, region[39m
2020-12-10T14:48:44.759Z [INFO]: [0mError: storage headless is missing the following inputParams bucketName, 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-s3.ts:443: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-s3.ts:392:40)[0m
[0m at exports.importedS3EnvInit (/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-storage/src/provider-utils/awscloudformation/import/import-s3.ts:294: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:147:22[0m
2020-12-10T14:48:44.775Z [ERROR]: !!! Build failed
2020-12-10T14:48:44.775Z [ERROR]: !!! Non-Zero Exit Code detectedExpected behavior
build should not fail
Screenshots

@ayotise The fix for this issue has been identified and is currently being rolled out to all regions. We will update this thread as the roll out completes.
The same bug, are there any updates?
To resolve this error please 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
Please let us know if there are further issues.
Works fine after adding the environment variables! Thank you so much!
Most helpful comment
To resolve this error please 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
Please let us know if there are further issues.