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).
backend-repo
)frontend-web-repo
& frontend-mobile-repo
)amplify pull
.aws-exports.js
in the frontend repositories?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.