Try having the container query the kubernetes/AWS API to fetch this information however that would mean adding quite a lot of complexity to your containers but seems like the only option that I know of.
If anyone has a better approach, please do answer away