In the documentation:
- amplify env pull –restore
Pulls your environment with the current cloud environment. Use the restore flag to overwrite your local backend configs with that in the cloud.
My question is, where exactly the cloud at?? The problem that I am having now, is that whenever I do amplify env pull <multi-env-name> --restore
, it is grabbing a different value on my amplify\.backend\amplify-meta.json
compared to running amplify init
.
What I initially did is I mistakenly created and pushed an amplify auth
, and then I updated it to a new auth
, pushed it, and published it. Somehow, right now whenever I do amplify env pull <multi-env-name> --restore
, it is grabbing the old auth
value. If they say the restore flag is to overwrite your local backend configs with that in the cloud, my configs in the cloud should be the last one that I updated(pushed).
Alright, I figured it out. It is in the S3 Deployment Bucket of whatever you set your DeploymentBucketName is, in the amplify-meta.json
. And inside that bucket, you will find #current-cloud-backend.zip
. So, amplify env pull <multi-env-name> --restore
is fetching it from there. You basically can update that file with whatever you want to. But, it would be safe if you get it from amplify init
command, and it will create a set of file in your project /amplify/ directory. Zip that file, and update it. Be sure to make a backup of your #current-cloud-backend.zip
in the S3.