amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

undefined Storage cause error on push

Open Breci opened this issue 6 years ago • 9 comments

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

To Reproduce Steps to reproduce the behavior:

  • Create a first storage, using S3 and push it
  • Then create a second storage with amplify add storage and select S3
? Please select from one of the below mentioned services: Content (Images, audio, video, etc.)
Amazon S3 storage was already added to your project.
  • Then if you want to push your project again you will get this error
× An error occurred when pushing the resources to the cloud

File at path: 'C:\your\path\react-amplified\amplify\backend\storage\undefined\parameters.json' does not exist
An error occurred during the push operation: File at path: 'C:\your\path\react-amplified\amplify\backend\storage\undefined\parameters.json' does not exist

Expected behavior A clear and concise description of what you expected to happen.

I expect to not have an error, and not have the undefined storage

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

What is Configured?

On the amplify-meta.json file, I can find this at the end

"undefined": {
   "service": "S3",
   "providerPlugin": "awscloudformation"
 }

Additional context I got this problem after trying to add a second bucket to my project, based on the getting starting page

Breci avatar Nov 10 '20 22:11 Breci

I'm getting this also. Just updated to the latest CLI. Adding the second resource does not prompt for the resource name or other configuration details, sets it as undefined, and well...

ryanhollander avatar Nov 11 '20 19:11 ryanhollander

I am on 4.32.1

ryanhollander avatar Nov 11 '20 19:11 ryanhollander

BTW you can remove the "undefined" storage configuration using "amplify storage remove" and then you'll be able to push, albeit w/o the second storage config.

ryanhollander avatar Nov 12 '20 01:11 ryanhollander

Having the same issue here since I updated to the latest CLI version yesterday (4.32.1)

KIWI-JP avatar Nov 12 '20 18:11 KIWI-JP

Hello, I've updated to the 4.34.0 version today and the error is still happening. Is there any roadmap regarding fixing this issue or any kind of workaround? It seems to me that this is not happening to every user of amplify - guessing from the quite low activity on this issue. I also tried to downgrade to a different version (4.27.3) and the error occurred again. So maybe something is wrong with my config which can be fixed...

oookoook avatar Nov 23 '20 09:11 oookoook

Hi, I have faced the same issue, however, my intention is to add additional s3 storage with a different policy. Is there any plan to add multiple s3 storage options in amplify-cli or is there any workaround to achieve the same need?

rakeshgohel01 avatar Dec 09 '20 04:12 rakeshgohel01

BTW you can remove the "undefined" storage configuration using "amplify storage remove" and then you'll be able to push, albeit w/o the second storage config.

This is a bug on our end but you would have to remove the following json from amplify/backend/backend-config.json to push again

    "undefined": {
      "service": "S3",
      "providerPlugin": "awscloudformation"
    }

ammarkarachi avatar Dec 23 '20 00:12 ammarkarachi

This should be fixed in the latest release, don't hesitate to reopen if you are still facing this issue

ammarkarachi avatar Jan 15 '21 18:01 ammarkarachi

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.

github-actions[bot] avatar May 25 '21 08:05 github-actions[bot]