It's a horntail. They're also called wood wasps. They have menacing looking ovipositors, but unlike many other wasps, they can't sting. They are awesome! Nice find! If you're wanting to keep it, a shallow dish of sugar water or honey will do nicely, plus a regular shallow water dish.