Http API Gateway using stage variables on a private integration

0

Hi,

I've been trying to use API Gateway (HTTP) to connect it with some ECS microservices. As far as I can see (using the console), I need the following:

  • Gateway -> VPC Link -> ALB -> ECS

That part is working ok, and I can attach a propper integration with no problems.

However, I have 3 ECS clusters (dev, uat, prod)

In order to connect to those environments, I had to create 3 different HTTP API GATEWAYS. Is there any way to create just 1 API Gateway and connect it to different private ECS using Stage Variables??

I managed to do it on REST API GATEWAYS, but using HTTP API GATEWAY seems impossible using the console because it forces me to choose an ALB, listener and VPC Link.

Am I missing something?

Thank you.

1 個回答
0

It should work. Look here for more details.

Saying that, I would recommend creating separate APIs for the different stages. Just like you created different backends, create different APIs. This way you reduce the risk that when you change something in dev it will accidentally impact production. I would even recommend creating the different environments in different accounts.

profile pictureAWS
專家
Uri
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南