It's a wood wasp. Looks like a urocerus gigas flavicornis, yellow-horned horntail. The larvae bore into the wood. The ovipositor on the backside is for laying eggs and is not a stinger.

...but I'm no expert and I could be wrong.