Reputation: 2502
Is there any way to programmatically detect that my C/C++ Windows application is running on an Amazon Cloud server? E.g., any APIs, WScripts, or environment variables? Thanks.
Upvotes: 0
Views: 160
Reputation: 7440
Make a HTTP GET against http://169.254.169.254/latest/meta-data/
on the instance.
On EC2(windows or *nix), you will receive information about the instance
See: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html
Upvotes: 1