After further documentation, what I was trying to achieve is not possible and I had to switch to NetworkMode: awsvpc and have the containers talk to each other through localhost.
NetworkMode: awsvpc
localhost