The Mobile CLI had a "pull" command that allowed to sync changes on cloud resources to the local project. It'd be great to have the same capability on Amplify.
Thanks for the feedbacks.
@awsed Currently we're using Clousdformation to manage the resources in an Amplify project and Cloudformation doesn't allow managing /updating/maintaining of resources created outside of Cloudformation (Its a cloudformation limitation).
So we're thinking and brainstorming of ways to make this possible but at the same time we don't come up with another set of templating mechanisms (similar to CFN) to just manage already provisioned resources.
Suggestions are welcome!
Thank you, @kaustavghosh06 . I thought that was the case, CFN indeed won't allow to sync manual changes. Maybe something more specific would be easier to implement...
My use case is related to AppSync. I'd love to deploy my GraphQL API, change and test in the console, add data sources and resolvers (for instance, there's no GraphQL transformer for Lambda so I have to add it manually) then do a "amplify api pull" and get the JSON file with all my new resolvers configs.
Then if I need to create a new API with the new config, I could basically copy the folder with the resolvers JSON files and deploy a similar API. Does it make sense?
It might be possible, but to me it seems to go against what amplify-cli is going for. It seems like the goal is to generate both the GraphQL schema as well as the resolvers based on graphql type definition with directives.
If you want to control over resolvers you need to add a transformer. This gives you a reusable way to generate code.
I wonder how long the awsmobile cli will still continue to work. Because that will still do what you want.
Don't agree an existing feature on the previous CLI goes against anything in the new CLI. Being able to pull changes means it's much easier to prototype and test in the console during development, giving more options to developers.
Unfortunately there aren't Transformers for all data sources yet. Yes, the Mobile CLI does what I want but I cannot use both in the same project.
I also believe a "pull" feature would be helpful. I was doing some testing of an api's lambda functions in the console and making changes, so my local amplify function versions were no longer in sync. I spent all morning searching for that "pull/sync" feature and came across this thread.
amplify pull seems to be added as at v4.6.0 (in this undocumented PR https://github.com/aws-amplify/amplify-cli/pull/2742). suggest closing this issue.