In cases where IMDS is disabled or otherwise unreachable, ec2-metadata prints an error messages beginning with [ERROR] Could not get IMDSv2 token. to stdout. This should go to stderr instead in order to avoid causing confusion for tools trying to consume the output of this command.