Я получаю информацию об экземпляре AWS с помощью AWS-SDK.EC2.describeInstances, здесь есть один элемент в массиве:
stdout: {
stdout: AmiLaunchIndex: 0,
stdout: ImageId: 'ami-00d03ffa3b3757af2',
stdout: InstanceId: 'i-09167c582a8d016ae',
stdout: InstanceType: 'r5.4xlarge',
stdout: KeyName: 'interos-prod',
stdout: LaunchTime: 2019-08-20T18:01:14.000Z,
stdout: Monitoring: { State: 'disabled' },
stdout: Placement: {
stdout: AvailabilityZone: 'us-west-2c',
stdout: GroupName: '',
stdout: Tenancy: 'default'
stdout: },
stdout: PrivateDnsName: 'ip-xxx-31-9-xxx.us-west-2.compute.internal',
stdout: PrivateIpAddress: '172.31.9.226',
stdout: ProductCodes: [],
stdout: PublicDnsName: 'ec2-54-xxx-226-xxx.us-west-2.compute.amazonaws.com',
stdout: PublicIpAddress: '54.201.xxx.xxx',
stdout: State: { Code: 16, Name: 'running' },
stdout: StateTransitionReason: '',
stdout: SubnetId: 'subnet-f3ee49a9',
stdout: VpcId: 'vpc-7e338d07',
stdout: Architecture: 'x86_64',
stdout: BlockDeviceMappings: [ [Object] ],
stdout: ClientToken: '',
stdout: EbsOptimized: true,
stdout: EnaSupport: true,
stdout: Hypervisor: 'xen',
stdout: ElasticGpuAssociations: [],
stdout: ElasticInferenceAcceleratorAssociations: [],
stdout: NetworkInterfaces: [ [Object] ],
stdout: RootDeviceName: '/dev/sda1',
stdout: RootDeviceType: 'ebs',
stdout: SecurityGroups: [ [Object] ],
stdout: SourceDestCheck: true,
stdout: Tags: [ [Object], [Object] ],
stdout: VirtualizationType: 'hvm',
stdout: CpuOptions: { CoreCount: 8, ThreadsPerCore: 2 },
stdout: CapacityReservationSpecification: { CapacityReservationPreference: 'open' },
stdout: HibernationOptions: { Configured: false },
stdout: Licenses: []
stdout: },
Кто-нибудь знает?Я хочу выяснить, является ли это Ubuntu или Amazon-Linux, или какой-либо другой ОС.