I'm creating a simple Spring API, which has a get call that returns some data. I put this in a docker container and tested the container on my localhost and it works (localhost:8080/getbooks returns a list of books). I then pushed this container to ECR and am running it on Fargate using a task.
My task is listed as RUNNING on a cluster in Fargate. However, when I try to access it via its public IP address (34.208.216.217:8080/getbooks), the request times out.
I've tried adding the port 8080 to the security group when creating the task (allowing everyone to access it), but this hasn't fixed anything.
Here's a picture of my task details, where I'm getting the public IP from: https://i.stack.imgur.com/VgE2r.jpg
I expect the running task to be accessible via the listed public IP, but it is not.