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

demandé il y a 10 mois559 vues
2 réponses
0
profile pictureAWS
EXPERT
répondu il y a 10 mois
  • 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
répondu il y a 10 mois
profile pictureAWS
EXPERT
vérifié il y a 10 mois
profile picture
EXPERT
vérifié il y a 10 mois
  • 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 []

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions