Upvote:4
As always, Timatic is the definitive source for these sorts of questions. Here's what it says for a US citizen transiting Azerbaijan:
Transit - Azerbaijan (AZ)
Visa
Visa required.
TWOV (Transit Without Visa):
Passengers with a confirmed onward ticket for a flight to a third country within 72 hours. They must stay in the international transit area of the airport and have documents required for the next destination.
So you should be OK, so long as you can have your baggage checked all the way to Lviv when you board the plane in Tel Aviv. This is usually the case if you buy the flights as a single itinerary, but beware of any itinerary where you would have to claim & re-check your baggage in Baku.
As an aside: you say that
From past experience transiting through foreign countries, I would guess no, given that I am not leaving the airport.
A lot of countries do indeed allow for transit without visa, so long as you stay in the "sterile" region of the airport. The major exception, though, is the United States itself; as a general rule, foreign citizens transiting through the USA must obtain a visa. As a US citizen, you don't personally have to worry about this; but it's worth noting that this issue can present major difficulties to international travelers from other countries.