<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Luiz Campedelli</title>
    <description>The latest articles on DEV Community by Luiz Campedelli (@luizcampedelli).</description>
    <link>https://dev.to/luizcampedelli</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1028654%2F2516d308-f2c1-405d-9abb-fdd811fb8fda.jpeg</url>
      <title>DEV Community: Luiz Campedelli</title>
      <link>https://dev.to/luizcampedelli</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luizcampedelli"/>
    <language>en</language>
    <item>
      <title>AWS CLI EC2 Describe Instances and more!</title>
      <dc:creator>Luiz Campedelli</dc:creator>
      <pubDate>Thu, 20 Feb 2025 13:22:45 +0000</pubDate>
      <link>https://dev.to/luizcampedelli/aws-cli-ec2-describe-instances-and-more-2bgb</link>
      <guid>https://dev.to/luizcampedelli/aws-cli-ec2-describe-instances-and-more-2bgb</guid>
      <description>&lt;p&gt;If i need to get all the Linux instances tag names, ids, ami, keys...:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 describe-instances \
    --filters "Name=platform-details,Values=Linux/UNIX,Ubuntu Pro" \
    --query 'Reservations[*].Instances[*].[InstanceId, State.Name, PlatformDetails, ImageId, KeyName, Tags[?Key==`Name`].Value | [0]]' \
    --output table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get the Linux EC2 operational system details, for update purposes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ssm describe-instance-information \
    --query 'InstanceInformationList[*].[InstanceId, PlatformName, PlatformVersion, PlatformType]' \
    --output table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you need to do a fine check, to see an instance that doesn't appear in the previous search, it can happen sometimes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ssm describe-instance-information \
    --filters "Key=InstanceIds,Values=&amp;lt;**Instance ID**&amp;gt;" \
    --query 'InstanceInformationList[0].[InstanceId, PlatformName, PlatformVersion]' \
    --output table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The documentation is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html" rel="noopener noreferrer"&gt;aws-describe-instances&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For Windows EC2, checkout the documentation, some minor changes can be applie to the cli commands and get the same results.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
