Amplify-cli: amplify push dry run?

Created on 28 Oct 2018  路  4Comments  路  Source: aws-amplify/amplify-cli

* Which Category is your question related to? *
deployment for all categories

Is there a way to do a dry run of 'amplify push' to see what changes it would make without actually doing anything? I understand CloudFormation supports something like this through change sets. Does amplify expose this somehow?

feature-request platform

Most helpful comment

1) For Auth, the most important thing is right now there is risk of cloudformation deleting and recreating userpool if you want to change certain attributes, so for safety purposes, I want to know if cloudformation is going to attempt to do that as we definitely don't want to delete our userpool accidentally. Currently all amplify status would show in this case is 'Update'.

2) For GraphQL API, what dynamodb tables will be created/deleted and what indices will be created. Again, we wouldn't want to accidentally delete a dynamodb table even if we remove a @model from the graphql schema. Again I believe amplify status only shows 'Update' in this case.

So maybe something more granular than general "Update", especially if any deletes are going to happen. I also read a bit that on dynamo tables we can put a 'retain' setting so that cloudformation does not delete these even if it wants to, but I have not looked into that closely yet.

I have not played with aws cdk yet but it seems from their demo that they do offer a 'cdk diff' functionality which gives you a granular view of what's going to happen:

aws-cdk the aws cloud development kit is a framework for defining cloud infrastructure in code 2018-11-05 13-22-50

Something like this would be nice for learning purposes, but the most important thing I think is what resources are going to be deleted by amplify (especially dyanamo tables and userpools).

All 4 comments

amplify status will list what categories will be added / updated / deleted, but currently the cli does not provide push dry run.

@hisham What other information do you think would be valuable to you before pushing local configurations to the cloud?
The amplify status command does provide an overview of whats getting created/updated/deleted with your next push but would like to know better about the specific needs.

1) For Auth, the most important thing is right now there is risk of cloudformation deleting and recreating userpool if you want to change certain attributes, so for safety purposes, I want to know if cloudformation is going to attempt to do that as we definitely don't want to delete our userpool accidentally. Currently all amplify status would show in this case is 'Update'.

2) For GraphQL API, what dynamodb tables will be created/deleted and what indices will be created. Again, we wouldn't want to accidentally delete a dynamodb table even if we remove a @model from the graphql schema. Again I believe amplify status only shows 'Update' in this case.

So maybe something more granular than general "Update", especially if any deletes are going to happen. I also read a bit that on dynamo tables we can put a 'retain' setting so that cloudformation does not delete these even if it wants to, but I have not looked into that closely yet.

I have not played with aws cdk yet but it seems from their demo that they do offer a 'cdk diff' functionality which gives you a granular view of what's going to happen:

aws-cdk the aws cloud development kit is a framework for defining cloud infrastructure in code 2018-11-05 13-22-50

Something like this would be nice for learning purposes, but the most important thing I think is what resources are going to be deleted by amplify (especially dyanamo tables and userpools).

Same here, would like to know if some resource will be deleted and re-created...

Was this page helpful?
0 / 5 - 0 ratings