In the last 5 years, Amazon (for me) has had lower food prices than nearly all local grocery stores for certain items. The "trick’ is to park those items in a wishlist and set a notification for when the price drops to a level you are willing to pay (via browser add-on), then you can really save a lot.
But for most items, it’s a gamble to assume you are getting the lowest price, even when they are on sale. But then again, I think most stores play the same games, so consumers are always on the losing end no matter where they shop.