0

I have started a monolith using a NodeJS with Elastic Beanstalk, exposing the api with Route 53 and Cloud Front just to launch my mvp/pilot.

I’ve designed the architecture to easily decouple into micro services.

I was wondering, how to decouple it, or maybe create new domains as a Lambda, and keep both words in parallel, by leaving the Elastic Beanstalk live until every service be decoupled as a lambda micro service.

At the moment, the endpoint is “api.domain.com/v1…”.

As far as im aware, Lambda works with Api Gateway. Is possible to keep them in the same “api.domain.com…” or should I have a different subdomain to orchestrate the lambdas with the API Gateway?

Caco
  • 121
  • 1
  • 2
  • 4

1 Answers1

0

You should start by setting up API Gateway and placing it in front of your Elastic Beanstalk API. So your domain would then point to API Gateway, and it would be setup to send requests to your Elastic Beanstalk backend.

You could start by doing this without a custom domain in API Gateway, and once it is working, configure the custom domain settings and update your DNS so the domain then points at API Gateway.

After you get API Gateway working with Elastic Beanstalk, you would then be able to start configuring specific paths in the API to go to Lambda functions instead of Elastic Beanstalk.

Mark B
  • 183,023
  • 24
  • 297
  • 295
  • Thanks Mark. I’ve used API Gateway a long time ago. I remember I needed to create every single path manually. Do you know if there is something I can map all the current routes I have and create them in API Gateway, as well as setting up any Ci/Cd when I push a new endpoint to automatically update the APi Gateway? – Caco Oct 29 '22 at 03:16
  • I believe this answers your first question: https://stackoverflow.com/questions/35773025/is-it-possible-to-use-wildcards-or-catch-all-paths-in-aws-api-gateway As to your second question, how would the CI/CD system know you were pushing a new API path exactly, and how would it know the API Path to map that to? You could probably setup something based on the folders your Lambda functions are in in your source code, but that would be a completely custom CI/CD solution you would need to build. – Mark B Oct 29 '22 at 14:42