I looked at attributes of the EC2 instance, but did not get a clear attribute value that identifies the same.
I also, saw the following discussion, but Im wondering whether identifying the os/platform has been simplified by aws since this disscusion. How to find OS of an EC2 instance using AWS CLI
Recent research indicates that Amazon's EC2 cloud is made up of almost half-a-million servers--each of them running a variation of Red Hat Linux for their base operating system.
For information about identifying Windows instances, see Identify EC2 Windows instances in the Amazon EC2 User Guide for Windows Instances . For a definitive and cryptographically verified method of identifying an EC2 instance, check the instance identity document, including its signature.
From the Amazon EC2 console, you can use one of the following three methods to check the OS or version number: View the Platform details or AMI ID information. View the instance's console logs or screenshot. View platform information for AWS Systems Manager Managed instances. Select the instance.
Your best bet is to look up the ami which will be in the "Description" tab of the instance. However, if the ami is private or derived from another ami then you won't be able to. The "Platform" tag is only helpful to identify if the OS is windows (or linux if not set).
I launched an Amazon Elastic Compute Cloud (Amazon EC2) instance, but I can't see it in the Amazon EC2 console. You can use the AWSSupport-ListEC2Resources AWS Systems Manager Automation document to list your active EC2 resources.
From Terminal inside EC2 instance: $ cat /etc/os-release
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With