Approaches to managing development flow?
See original GitHub issue** Which Category is your question related to? **
amplify-cli
** What AWS Services are you utilizing? **
appsync, amplify, amplify-cli
** Provide additional details e.g. code snippets ** I’ve started a side project with appsync and started using the CLI to create resources. It’s simple and helpful in a nice way. But to be honest, I am confused about how it fits into a development workflow… one that can standup in a production environment. Based on research and articles it seems the options are:
Option 1: Handle everything through the CLI
This means that the resources are created. But once they are created, you need to update and manage everything in the AWS console (besides the schema.graphql
. If you want to modify the resolvers, you have to do that in the console. If you modify the schema in the console and then run amplify push
locally your changes are overridden with what you had locally even though it’s out of sync.
So: good for getting started but little flexibility because most things are abstracted and if you need to update, you’re in the AWS console. You wouldn’t want to check the backend api into your repo because it gets out of sync.
Question about this option: is there a better way to manage things locally? to keep it in sync with changes in the console?
Option 2: Manage yourself via cloudformation, terraform, serverless
Take most of the abstraction out of it and handle resources yourself. The schema is local, the mapping templates (resolvers) are local and deployed based on your configuration. This provides more control and can handle different stages (dev, release, prod). Since you are controlling things locally, you can check into your repo… run thru your normal development cycles. The downside is you don’t have some of the abstraction magic… all of the resolvers aren’t created for you. My understanding, though, is that once you push the schema to appsync… you could run amplify codegen
and get all of the queries, mutations, subscriptions locally.
Question about this option: If you don’t attach a mapping template to a field, does appsync create it for you or does it just not have a one attached? For example, if I has an @aws_auth
directive as part of my schema, would I get that for free if I push up my schema without a resolver or do I need to handle that myself?
Thanks to the team for all the work you are putting in. It’s an impressive product and I’m sure will only get better.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:12 (5 by maintainers)
Yeah, but the #508 is more about how to provide a flow and not about how to locally create a datasource map them to specific source type like Lambda and then attach field to resolver that we create in a step before. This part is missing in amplify @kaustavghosh06 and it has to be done manually in amazon console if you don’t follow the CloudFormation schema.
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels for those types of questions.