- 新しい順
- 投票が多い順
- コメントが多い順
Hello.
Do you mean connecting to the database from a container started on Fargate?
In that case, you need to allow the Fargate container IP address in the database.
NLB is only used to access the container, so the IP address used to access the database will be the Fargate IP address.
Additionally, the IP address of Fargate containers changes when tasks are swapped, etc., so you can use a fixed IP by starting the container in a private subnet and communicating via NAT Gateway.
https://repost.aws/knowledge-center/ecs-fargate-static-elastic-ip-address
To create a static IP address for a Fargate task for outbound traffic, create a NAT gateway. In this scenario, a static IP address is required by the downstream consumer. You must place your Fargate task on a private subnet. You can use the NAT gateway IP address for an IP allow list.
関連するコンテンツ
- AWS公式更新しました 10ヶ月前
- AWS公式更新しました 2年前
Thanks for this. I finally solve the problem. :D