query all EC2 instances for OS

0

Hello No access to the the individual systems running under my AWS, last admin didn't give PEM files. is there a way to query what OS(windows) is installed/running on each EC2? using CLI?

thanks

asked 10 months ago521 views
2 Answers
0
profile pictureAWS
EXPERT
answered 10 months ago
  • No access to the instances.

0

Here is an AWS CLI command to get the platform:

aws ec2 describe-instances \
    --query Reservations[*].Instances[*].[InstanceId,ImageId,PlatformDetails] \
    --output table

You can get further details about the platform:

aws ec2 describe-images \
    --image-ids ami-0d2f97c8735a48a15 \
    --query Images[*].[ImageId,Name,Description] \
    --output table
profile pictureAWS
EXPERT
kentrad
answered 10 months ago
profile pictureAWS
EXPERT
reviewed 10 months ago
profile picture
EXPERT
reviewed 10 months ago
  • thanks for the windows servers its having issue returning the OS build. [cloudshell-user@ip-172-4-83-86 ~]$ aws ec2 describe-images --image-ids ami-********** --query Images[*].Description []

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions