0

I am still discovering awsmobile and still have to read a lot of doc but what I don't really understand is why awsmobile init generates a awsmobilejs/backend in my React project because:

1) I think FE and BE should NOT be in the same repo.

2) I'll probably be creating mobile apps later, also in separate repos. How will it work then? According to doc I have to run awsmobile init <project_id> again which will download the awsmobilejs/backend folder there too (duplicate)

It makes sense for me to separate FE and BE, especially if you have several front ends (WEB, and mobile apps). Aws mobile hub even lets you create several "apps" in the console (android, iOS, web and react-native). How do I separate everything? and "connect" them later?

Bonus question: How does awsmobile (cloud-api) differ from aws SAM They seem to achieve similar things for the Backend

Thank you

Benoît Bouré
  • 1,017
  • 9
  • 18

1 Answers1

2

Enabling developers to develop frontend and backend in the same project was actually one of the design goals of the awsmobile-cli. We thought it would make development easier.

And one BE project can be linked to multiple frontend project using awsmobile init <project-id>, as pointed out in 2).

I don't see any issues with this setup, but arguments against this design are welcome, and will be taken into consideration in our future updates. It'd be more helpful if you describe some scenarios in details that this design leads to bad project development life cycle managements.