I am a newbie in microservices and done my research on the best practices and how to upgrade from monolithic. I need now concrete steps to move forward.
I am looking to upgrade a monolithic Laravel project to Microservices.
I have started to break the app into smaller apps. So developed multiple Laravel projects each representing a service. To simplify the question:
- Authentication app: used for user authentication and registration
- ToDo app: used to create a todo-list with tasks for a specific user
So now I have these two apps where each has its own CRUD operations (multiple APIs).
The question is how to move these apps to AWS serverless using Lambda Functions, API Gateways and Connect to PostgreSQL (Aurora DB).
- First I need either to use the SAM template or the Bref template? And how to handle that AWS Lamda does not support Laravel?
- Each app has several functions in it (the first app has signup, login, reset password...) so does each one of these must be an independent Lambda function? If yes does this mean each has to be a new Laravel project and then I will have to mention the same resource to be used by SAM or Bref to have the different functions to use the same DB.
- Lambda creates by default an API Gateway? If yes then shall I create a main API gateway accessible by the user-side which can call the other API gateways? (Main API Gateways filters the request and if related to authentication it redirects to Authentication Gateway that can interact with the different Authentication Lambda functions?
I Will later have definitely to add step functions with SNS queuing support but for now, I need to understand how to move the apps.
And finally, how would you recommend integrating CI/CD into the project?
Thanks for the help!