You can get the instance-id of a system via curl, so something like this is an all-in-one:
ubuntu@test-aws-box$ aws ec2 describe-instances \
--instance-id $(curl -s http://169.254.169.254/latest/meta-data/instance-id) | \
jq '.Reservations[0].Instances[0].Tags[] | select(.Key == "Name").Value '
"the-name"