There are multiple ways you can find the OS of a running EC2 instance.
- Using instance screenshot
Step 1: Log in to the AWS management console.
https://aws.amazon.com/
Step 2: Navigate to the EC2 service and select your EC2 instance.
Step 3: Click Actions > Monitor and troubleshoot > Get instance screenshot


Using System Manager (SSM):
If SSM agent is installed in your EC2 instance then you can query the EC2 instance OS information using AWS CLI for SSM
1 2 3 |
aws ssm describe-instance-information \ --query 'InstanceInformationList[*].[InstanceId,PlatformType,PlatformName]' \ --output text --filters Key=InstanceIds,Values= |