最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

github - Best approach for Using AWS Amplify Gen 2 with Separate Backend and Frontend Repositories - Stack Overflow

programmeradmin0浏览0评论

I am working on a project where I want to use AWS Amplify Gen 2 for the backend while keeping the frontend and backend in separate Git repositories. The backend will be fully managed by AWS Amplify, and the frontend will be deployed separately using Next.js (web) and React Native (mobile).

My Setup

Backend Repository (backend-repo)

  • Uses AWS Amplify Gen 2 for hosting backend services (GraphQL API, Authentication, Storage, etc.).
  • Managed via Amplify Studio/Admin UI instead of the CLI.
  • Should be independently deployable.

Frontend Repositories (frontend-web-repo & frontend-mobile-repo)

  • Next.js web app deployed on Vercel/Amplify Hosting.
  • React Native mobile app (managed separately).
  • Both frontends should connect to the same Amplify backend without requiring a local amplify pull.

Questions

  1. The AWS documentation provides some guidance, but it’s not entirely clear on how to handle separate Git repositories and deployment across different hosting services. Are there any best practices for structuring this setup?
  2. How can I ensure backend updates do not require manual syncing of aws-exports.js in the frontend repositories?
  3. What is the best way to manage authentication and API updates in multiple frontend repositories connected to the same Amplify backend?
  4. Are there any specific CI/CD configurations required to keep the backend and frontend in sync when using different deployment services (e.g., Amplify Hosting for backend, Vercel for Next.js, and Expo for React Native)?

Any insights or examples from those who have implemented a similar architecture would be highly appreciated! Thanks.

What I Did: I set up AWS Amplify Gen 2 as my backend using Amplify Studio/Admin UI instead of the CLI. I created separate Git repositories for the backend and frontend to achieve a decoupled architecture. The backend is hosted and managed via AWS Amplify, while: The Next.js frontend is deployed on Vercel. The React Native app is handled separately. I followed the AWS documentation, but it doesn’t fully clarify how to structure deployments across different hosting providers with separate repos. What I Expect / Need Help With: The best approach to link multiple frontends (Next.js & React Native) to an Amplify Gen 2 backend without requiring a manual amplify pull. How to ensure backend changes (e.g., API/Auth updates) are reflected in frontends without manual syncing of aws-exports.js. Recommendations for CI/CD configurations when using different deployment platforms (Amplify for backend, Vercel for Next.js, Expo for React Native). Any best practices for keeping this setup scalable and maintainable.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论