Describe the bug
I have a Gatsby / ReactJS / Amplify Framework app inside a monorepo where the app root is inside a sub-folder of the repo root.
After connecting my GitHub repo, build settings were not automatically detected. I added them manually and the build/deploy succeeds.
However the Amplify Console doesn't detect any Amplify backends for me app.
The repo doesn't actually contain any other apps yet, but I suspect that the fact that the app root is inside a subfolder is causing the problem?
To Reproduce
Steps to reproduce the behavior:
Confirmed by creating a new gatsby app that the sub-dir is the culprit.
I'm surprised this doesn't work because the Amplify Console docs actually mention monorepos, eg. https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html
@patspam the autodetection doesn't work for monorepos right now. We have planned features around better monorepo support in our roadmap. Specifically:
Thanks for the info.
Am I still able to use all console features (in particular, control Amplify backends) by configuring build settings manually?
@patspam it should. Can you describe your repo structure?
Awesome, thanks. I'll try it.
The monorepo structure is currently pretty simple: multiple apps nested one level deep, ie.
/app1/...
/app2/...
Any updates on this?
I no longer use Amplify.
We're using a lerna-style monorepo setup with two frontend apps in the /packages/ folder and running into the same issue.
@patspam I鈥檓 curious what you switched to, we also need to move off Amplify
We built our own CI/CD pipeline using AWS CodePipeline and CodeBuild. It's not that hard to do, and works pretty much exactly how we want it.
I'm thankful that Amplify helped get us over the line for our first MVP release, but it also badly damaged my opinion of AWS overall - we ran into a large number of blocking bugs with the CLI that had no resolution other than deleting your project and starting again, and seemed to get no attention from the team. I've since come to see AWS as a tiered offering - there are mainstream services that are very high quality, and others that you should evaluate very carefully before adopting (previous I had faith that if it was an official AWS service, it must be well supported).
Our primary motivation for migrating off Amplify was to get off the CLI, but once we'd taken the time to learn CloudFormation/CodePipeline/etc it made sense to roll our own solution there too.
@aaroncaito @patspam @simpson we just announced better monorepo support and this should be resolved. Checkout the launch blog: https://aws.amazon.com/blogs/mobile/set-up-continuous-deployment-and-hosting-for-a-monorepo-with-aws-amplify-console/
Most helpful comment
@patspam the autodetection doesn't work for monorepos right now. We have planned features around better monorepo support in our roadmap. Specifically: