AWSMetadataDiscoverEC2AccountID

nicolaw 18th September 2018 at 3:24pm
AWS

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-dynamic-data-retrieval

$ curl http://169.254.169.254/latest/dynamic/instance-identity/document
{
  "privateIp" : "172.11.18.219",
  "devpayProductCodes" : null,
  "marketplaceProductCodes" : null,
  "version" : "2016-09-30",
  "instanceId" : "i-0fae3b4d7b3853360",
  "billingProducts" : null,
  "instanceType" : "t2.large",
  "availabilityZone" : "eu-west-1c",
  "kernelId" : null,
  "ramdiskId" : null,
  "accountId" : "012345678901",
  "architecture" : "x86_64",
  "imageId" : "ami-99be9bea",
  "pendingTime" : "2017-08-16T16:45:04Z",
  "region" : "eu-west-1"
}