ec2-metadata provides to access metadata, and you can use this in outside of ec2 like in ec2