Which architecture would fit our needs better?

0

We're a small startup based in Malaysia and I'm the technical founder of the startup.

We have a plan for all our services working on AWS. We have startup credits, so we want to use them and launch to start getting some returns that we can use to continue supporting our costs.

We're planning to build a micro-service architecture. It'll have two mobile apps for different stakeholders. The app consists of functionalities like Auth/Login, Chat, Payment (Possibly we'll be using Stripe), Accounts/Receipts, AI-based recommendations, and others.

I have been learning what I can about AWS and have a solid understanding of what Amplify is. I also understand that in order to make a micro-service I can start an RDS and connect it with an EC2 and a node or any project that works as an API. But I might need more grooming on the EC2. So, I guess my first question would be: "Is it a good approach that we have multiple Amplify projects each used as a micro-service?" I understand that at the start we might not have that many users but this will be a solution that when scaled would require less effort in the future.

My second question would be based on the above idea which architecture would you recommend if not the one?

3 Answers
1

Below are few good references to see as you start thinking on microservices in AWS. Actual implementation will of course depend on detailed requirements but below should give you good starting points. It gives good information around Compute, Storage & Databases, Networking, Messaging, Logging and Monitoring & DevOps.

profile pictureAWS
EXPERT
answered 2 years ago
0

Amplify provides full-stack application development & integration capabilities that includes both front end and backend support.

To consider a microservices architecture, it is best practice to separate front end application development from backend services. Typically backend services are designed and implemented in the forms of RESTFul APIs or GraphQL APIs, and it is recommended to implement those APIs so that they are reusable, i.e. not tied to one Amplify project. However, Amplify front end library provides support to use backend services/APIs in a convenient way including authentication.

Another benefit of keeping them separated is to have different developers/teams working on front end or backend, as long as the API interface is designed and agreed upon by bother developers.

In a summary, you may consider have Amplify project(s) focusing on front end application development that includes dependency and integration with backend microservices which are separate project or code repo.

AWS
answered 2 years ago
0

Hi, Congratulations and all the best for your start on AWS.

You can of course start with multiple Amplify repos.

Ask yourselves some of these Qs:

  • Do you have multiple front ends as well? --> perhaps you may like to use 1 project per front end
  • Will your backend APIs be used for integrating with other businesses or third parties rather than only your own UX? --> if yes you may want to build your APIs independently of your UX.
  • Will you be layering your APIS? so UX --> GraphQL --> REST --> DB. If you have other backend integration this layering will allow you to build your backend to be a standalone and the UX + GraphQL components can sit in Amplify.

Answers to these will help you finalise your project structure.

Even if you do decide to go with multiple Amplify proects, the first thing that I would suggest you do is look into mono repos, especially if you have a small team and the number of services is going to be greater than the number of developers in your team. https://docs.aws.amazon.com/amplify/latest/userguide/monorepo-configuration.html

Of course also look at:

Amplify ties together a lot of services that you may choose to use independently. For that

Read up on Cloud foundations, even though you are just getting started setting up robust foundations will only help in the long term and will aid agility. You may consider using AWS Control Tower, AWS Organisations & multiple accounts. https://docs.aws.amazon.com/whitepapers/latest/establishing-your-cloud-foundation-on-aws/welcome.html

As far as login is concerned consider using AWS Cognito User pools so that credentials may not be saved in your database (saving you a lot of compliance headache and help move in the direction of oAuth) https://aws.amazon.com/cognito/

Irrespective of whether you use EC2 or Lambdas to write your micro-services you will need to front your micro-services with a facade. Here you have a choice of using Amazon API Gateway and Application load balancer. https://aws.amazon.com/elasticloadbalancing/application-load-balancer/ https://aws.amazon.com/api-gateway/

Both of which provide excellent integration with

  • Amazon Certificate Manager (for encryption)
  • Amazon Cognito (for auth)

Both of these services come with their own benefit which will guide your choice.

**Side note: ** I would also recommend microservices.io where you will find truck load of patterns --> https://microservices.io/index.html Which programming language(s) are you planning to use?

Happy to chat more on this.

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions