-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use 2 different platforms in one amplify app? #3907
Comments
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you! |
Any update? trying to do the same and few folks are reaching out to ME! |
Ummmm, oops have not realized have opened a duplicate copy/paste issue sorry u guys !!!! |
Thanks for bumping it up! I'm still waiting for a better solution since the CI/CD is quite a mess. Maybe a quick solution would be allowing to update specific env params. this way I can write a small github action script that runs whenever I want to deploy NextJS to Amplify (I can do it now but I need to share all of my Amplify secrets). Something like this:
aws amplify update-app --app-id <my-app-id> \
--platform WEB_COMPUTE
--region <my-region>
--update-environment-variables AMPLIFY_MONOREPO_APP_ROOT=nextjs
aws amplify update-app --app-id <my-app-id> \
--platform WEB
--region <my-region>
--update-environment-variables AMPLIFY_MONOREPO_APP_ROOT=react Note I tried to create a conditional variable but it doesn't work for |
Going to close this issue as it seems to be resolved. Please re-open if you still need help or check out our Amplify Discord! |
This issue is now closed. Comments on closed issues are hard for our team to see. |
This issue has been automatically locked. |
Before opening, please confirm:
Amplify Hosting feature
Monorepo, SSR
Is your feature request related to a problem? Please describe:
I have a monorepo with two applications: one in React and another in Next.js. Each project has its own amplify.yml in its root folder. While I was able to build both applications in my Amplify, the CI/CD doesn't work properly because the app's platform should be 'Web' for React and 'Web compute' for Next.js. As a result, I need to manually change it every time I want to deploy one of them.
Also, a follow up question - is it possible to set the AMPLIFY_MONOREPO_APP_ROOT from one of the configuration files?
Describe how you'd like this feature to work
Generally, my goal is to connect both monorepo folders (react and nextjs) into 1 URL, i.e.
https://example.com
which is hosted on Amplify. Then, for everyexample.com/app2
, this should show the Next.js app; otherwise, it should show the React app. I was able to achieve this with a rewrite, however, I wonder if there is a simpler way to do it that will also support CI/CD.The text was updated successfully, but these errors were encountered: