#re-generate #current-cloud-backend

5 messages · Page 1 of 1 (latest)

digital estuary
#

We are in a situation where a V2 migration to one of our production environments updated stacks but did not update the #current-cloud-backend.zip file on the deployment S3 bucket. This meant that some resources deployed through CloudFormation do not match what's on the #current-cloud-backend.zip. Is there any way to re-generate that file from what's currently deployed on the cloud?

spiral whale
#

@digital estuary did you ever find a solution for this?

digital estuary
#

hey @spiral whale. oof. so sorry to hear you might be facing this issue. this is a huge pain point and what we did to fix it was very awkward and ugly. but essentially i took the #current-cloud-backend.zip file from another environment's S3 bucket and manually carefully replaced all references. it worked and we haven't faced issues with those environments since then.

#

after that if your V2 environment looks to be in a halfway point between v1 and v2 you might need to re-deploy all your resolver code. you can do that by setting all your @model decorators on your schema to be @model(queries: null, subscriptions: null) (you can do that with a regex if you've got a lot of models)

#

you then amplify push, restore your schema to the correct, intended @model decorators and then amplify push again.