I have my API developed.
I have a docker container of that API that I pushed to AWS ECR (Elastic Container Registry). I deployed it to AWS ECS (Elastic Container Service) using AWS Fargate with the above container.
I want to generate an endpoint (URL) for my frontend to consume.
All what I am having is a public/private IP of the Task in the Cluster.
The public IP address keeps changing, so I cannot have my frontend consume it.
What is a possible fix, I want to get an endpoint/URL for my AWS Fargate task?
CodePudding user response:
This should be easy. Hope this link helps: https://aws.amazon.com/premiumsupport/knowledge-center/ecs-fargate-static-elastic-ip-address/ . It shows you how to setup Static or EIP for Fargate. In our use case, we have EIP for EC2 and Fargate. Once you have EIP. You can easily for your API.