It's said that golf architects were inspired to design bunkers by the hollows animals such as sheep created for protection against the elements. Nice story, but now that you're in a bunker that looks like an impact crater from a B-17 bombing raid, I'm sure you're having a hard time appreciating the charm of that narrative. Simply put, some bunkers have walls so steep, a standard sand shot is out of the question.
You need a different plan for when your ball is so close to the bunker's face it might get swatted back into the sand like a blocked shot by Shaquille O'Neal. First, assess the situation. If you can't get the ball up quickly enough to clear the face and hit it toward the flagstick, play your bunker shot in another direction. What direction? Well, if the lip is lower guarding another part of the green, that's your exit strategy. If the steep face is between your ball and the entire green, then I'm sorry but you'll have to find a spot off the green that makes your next shot as easy as possible. That usually means hitting to an area where you'll have an uphill pitch to the hole. This is one of those times where you have to put your hubris in check and accept that the smart play is to simply get out.
That being said, there are times when you can get out and get the ball moving toward the hole. When you think you can pull off a shot from this nasty lie, I want you to remember this one thing: long and slow. That means you're going to make a long backswing and through-swing, and feel like your clubhead speed isn't as quick as in a typical bunker play. A long-and-slow swing will help produce a higher, softer shot that gets the ball over the lip and lets it release toward the hole.
As far as swing mechanics, it helps to keep the left wrist (for right-handers) in a cupped position to add loft to the shot. Cupped means the back of your hand is closer to the top of your forearm than your palm. Also, when you swing, let the clubhead release so it gets ahead of your hands as it moves through the sand. What you don't want is to dig deep into the sand with the handle of your club leaning toward the target at impact.
Last tip? Don't try to climb out. Take the elevator. — With Ron Kaspriske