#!/bin/bash eval "$(jq -r '@sh "id=\(.input)"')" EC2OS=$(aws ec2 describe-instances --instance-ids $id | jq -r '.Reservations[].Instances[].PlatformDetails') if [ $EC2OS == "Windows" ]; then echo '{"os": "Windows"}' else echo '{"os": "Linux"}' fi