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
In a react native project (expo) that is using amplify services (auth, gql api, storage) after modifying the gql schema, I ran the amplify status. After being prompted to upgrade the amplify-cli, i ran the npm install -g @aws-amplify/cli which then installed the new library. Then I ran amplify status, showing that the API had been updated again. Ran amplify push and then was given the error of "UnhandledPromiseRejectionWarning: NoSuchBucket: The specified bucket does not exist" (see screenshot for additional information on the error in terminal).
I then proceded to attempt to delete the storage (as this project is still in development) with the command amplify remove storage. Then amplify status which showed the API UPDATED and the STORAGE DELETED. Ran the command amplify push and was given the same error.
I opened a blank folder in my IDE (Visual Studio Code) and ran the amplify pull < > with my projects appropriate command copied and pasted from the amplify console. The same error was thrown again with a little extra information.
"Failed to pull the backend.
The specified bucket does not exist
NoSuchBucket: The specified bucket does not exist"
After further inspection in my Amplify console, I have noted that all of my categories are now missing from the back end which were the following categories:
Authentication
API
Storage
However, when looking into all of those individual spots in my AWS account they are still there i.e. Cognito User Pools, S3 bucket, AppSync etc. AND the code that is relying on these deployments are functioning without issue in expo local and hosted app.
Amplify CLI Version
You can use amplify -v to check the amplify cli version on your system
4.27.3
To Reproduce
Steps to reproduce the behavior or terminal output if applicable
I am unsure the steps to reproduce. It is only occuring on my machine and I do not have an additional computer to attempt to reproduce. It appears it is related to my AWS account and/or Amplify Project. However, please follow the steps I listed above to see if you can reproduce.
Expected behavior
A clear and concise description of what you expected to happen.
The amplify push will work as it has before, updating my resources in the cloud. The GQL Api schema will update, and my S3 bucket will be deleted as I also have ran that command.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Mac OS 10.15.6
IDE: Visual Studio Code 1.48.1 using the bash terminal internal of VS Code
node -v to check the node version on your systemv.14.7.0
Additional context
Add any other context about the problem here.
Questions asked in another issue with the same problem
CLI verion : answered above
OS version : answered above
Amplify categories that you added to your project : Auth, Storage, API
Did you use Amplify Console to create your project? Yes
Have you pulled the project from github console and run amplify init on your local machine? The project was intialized locally with amplify before being pushed into github
Have you manually changed anything in the
Have you updated or deleted S3 bucket on the S3 console? No. After encountering errors I did attempt to delete the storage category from the Amplify Project.



@dev-elevate-usa what was the version of Amplify CLI before the update?
<project-root>amplify/backend/amplify-meta.json folder@yuth
@dev-elevate-usa Do you see the <project-root>/amplify/.config/local-aws-info.json file?
@kaustavghosh06 Yes it is in my directory. It is also .gitignored.
{
"dev": {
"configLevel": "project",
"useProfile": true,
"profileName": "default"
}
}
In the amplify/backend/amplify-meta.json file you can find the "DeploymentBucketName". Can you go to the AWS S3 console and check if the value of the "DeploymentBucketName" which wis your bucket-name still exists?
@kaustavghosh06 there is a bucket in my S3 however is does not match the naming convention of the "DeploymentBucketName"
amplify/backend/amplify-meta.json
{
"providers": {
"awscloudformation": {
...
"DeploymentBucketName": "amplify-repaircabanaapp-dev-160452-deployment",
...
}
},
...
}

@dev-elevate-usa The above looks like the 'storage' resource bucket and not the deployment bucket. Any chance the S3 bucket - "amplify-repaircabanaapp-dev-160452-deployment" was deleted accidentally?
@kaustavghosh06 I did go through and clean up my S3 recently from some spike projects and tutorials i was running through. It is possible that i would have deleted a bucket like that 馃槵 Is there anywhere I can look for a log of that action being performed to confirm?
This S3 bucket also get deleted if you've run "amplify delete" command in the past. If you're still in development, you can run "amplify env add" -> "amplify push" to clone your infrastructure and add a new environment. This would clone the deployment bucket for that environment as well which seems to be missing.
@kaustavghosh06 I have not run amplify delete
Should i try to run the command you have listed above?
I am still unsure how that would pull all my categories back into my amplify console on the back end?
Please read my comment out here - https://github.com/aws-amplify/amplify-cli/issues/5171#issuecomment-680186881
This would help clone your backend infrastructure( create a new amplify app and new resources).
If you want to retrieve back your deleted S3 bucket for your current environment then you'd have to contact AWS support -https://aws.amazon.com/premiumsupport/knowledge-center/aws-phone-support/ for help.
@kaustavghosh06 Thank you. I did actually delete that bucket, I just found the event in my cloudtrail. If i clone the backend will i have to set up all the categories again?
Nope, you wouldn't have to. You'll be cloning your current environment.
Okay. The reason I ask is because the categories are missing in my amplify console as the screenshot showed above
Yes, that's because the Amplify Console directly reads from the S3 deployment bucket which you've deleted. If you create a new environment (which would result in creation of a new deployment bucket for that environment) and push the corresponding resources, you'll see your new environment with the enabled categories on the Amplify Console as well.
Ah. I totally understand now! I am currently doing as you suggested in creating a new environment. Would you recommend me to delete the previous environment that I 馃挘 after i get the new environment up and running?
so just to clarify, Amplify uses S3 to store configurations for the categories of the amplify project?
That is correct. It uses S3 to store Deployment artifacts.
After creating the new environment, you can run amplify env remove and remove the older environment.
I can confirm that this issue has been resolved. Thank you so much for your time and effort to help me get back on track!
This S3 bucket also get deleted if you've run "amplify delete" command in the past. If you're still in development, you can run "amplify env add" -> "amplify push" to clone your infrastructure and add a new environment. This would clone the deployment bucket for that environment as well which seems to be missing.
This comment solved my issue. I had deleted the S3 bucket that is used to store the Deployment Artifacts for the current amplify project enviroment. Thanks @kaustavghosh06