1

I'm working on drawing an architecture diagram for a full-stack app on AWS. I'm using a three-tier architecture:

  • the first tier will contain my frontend app on an EC2 instance,
  • the second tier will host the backend on another EC2 instance,
  • the last tier will contain my database.

However, since I'm not a developer and I'm a beginner with AWS, I'm confused about whether I need an API Gateway. The app prototype I want to use is a full-stack app that works fine locally. Will it be possible to work with this architecture without an API Gateway?

Below is a list of services I'll be using: Tier 1 will have an Application Load Balancer directing traffic to the EC2 instance containing the frontend. The frontend will be connected to another load balancer that sends traffic to the backend instances, and the backend will connect to DocumentDB.

Other services I hope to add include Route 53, CloudFront (CDN), and WAF

2
  • You'll need / want something in front of your application, but I'm not sure exactly what is best - you say your application works locally - how are you calling it locally (i.e. what in your local setup is handling requests)? Commented Oct 30, 2024 at 18:40
  • @victor, generally speaking: your architecture will work and you do not need an API Gateway. BUT it is most probably not the most cost-effective and needs quite some maintaining effort. e.g. maintaining the EC2 instances. I have a quite similar application deployed, a bit more complex, but almost for free. Have a look here: aws.amazon.com/blogs/compute/… Commented Oct 31, 2024 at 10:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.