I try to setup a little example on AWS Fargate and try to have one application container with one database container there.
The task definition starts both containers, b
Containers in Fargate tasks share a network namespace, so you don't need to use links at all. You can simply communicate via localhost.
For example, if you have container A running a web server on port 8000, container B could reach it with curl http://localhost:8000/
curl http://localhost:8000/