Getting below error while connecting aws ec2 instance through SSM in jenkins.
Starting session with SessionId: [?1034hsh-4.2$ Cannot perform start session: EOF
Command used in jenkins (execute shell):
INSTANCE_ID=aws ec2 describe-instances --filters "Name=tag:t_name,Values=appdev" --region us-east-1 | jq -r .Reservations[].Instances[].InstanceId
echo "INSTANCE_ID: $INSTANCE_ID"
aws ssm start-session --region us-east-1 --target $INSTANCE_ID