Un container pour émuler en local l'api metadata et ainsi endosser un role https://github.com/awslabs/amazon-ecs-local-container-endpoints
Several ways to get metadata (like ip address) when you're connected to an EC2:
/opt/aws/bin/ec2-metadata
curl http://169.254.169.254/latest/meta-data/