Home > Software engineering >  Is the AWS CLI missing data for the "ec2 describe-instancess" method?
Is the AWS CLI missing data for the "ec2 describe-instancess" method?

Time:12-21

As of the date of this question I'm using the most recent version of the AWS CLI (2.4.6) running on macOS. According to the v2 docs the Instances that are returned should include properties like InstanceLifecycle, Licenses, MetadataOptions -> PlatformDetails and several others that are missing for me. While I'm getting back most data, some fields are absent... I've tried this is two separate AWS accounts and I have admin IAM creds that I'm using locally, why does the aws ec2 describe-instances call not return all of the fields listed in the docs?

CodePudding user response:

Not all outputs is available for every ec2 instance, it depends on the way of provisioning of your ec2 instances.

Ex:

  • InstanceLifecycle: is exclusive if you provisioned the ec2 instance as spot instance or reserved one.
  • Licenses: If you used BYOL when provisioning EC2 (Bring your own license)

Extra.. The docs describe every possible output from querying ec2 api endpoint, but it depends on the different parameters of your provisioned ec2 instance.

For example, try to provision a spot instance, and query the instance lifecycle.

  • Related