The relativity principle was first stated by Galileo as follows: Shut yourself up with some friend in the main cabin below decks on some large ship, and have with you there some flies, butterflies, and other small flying animals. Have a large bowl of water with some fish in it; hang up a bottle that empties drop by drop into a wide vessel beneath it. With the ship standing still, observe carefully how the little animals fly with equal speed to all sides of the cabin. The fish swim indifferently in all directions; the drops fall into the vessel beneath; and, in throwing something to your friend, you need to throw it no more strongly in one direction than another, the distances being equal; jumping with your feet together, you pass equal spaces in every direction. When you have observed all these things (though doubtless when the ship is standing still, everything must happen in this way), have the ship proceed with any speed you like, so long as the motion is uniform and not fluctuating. You will discover not the least change in all the effects named, nor could you tell from any of them whether the ship was moving or standing still.
Thus, according to Galileo, the relativity principle says, “There are no experiments one can do to distinguish uniform motion from rest.” Later, Newton showed that his laws are the same in rest frames and uniformly moving frames. So it seems the relativity principle can be alternatively formulated as “Laws of motion are the same in all inertial frames.” Then, Einstein extended it to electromagnetism and stated the principle of relativity as: “Laws of physics are the same in all inertial frames.” Einstein didn’t stop there, he expounded a general principle of relativity, which states: “Laws of physics are the same in all frames of reference.” I think the formulations of Newton's and Einstein's should be called the invariance principle instead, and the relativity principle should be reserved for Galileo's assertion, even though both seem to be equivalent so far.
Suppose the entire universe is filled with a stationary medium such as air. Any object moving through this medium would experience anisotropies in the speed of sound depending on its motion, allowing one to detect one's motion. Thus, the medium defines a cosmic rest frame—namely, the frame in which the medium is at rest everywhere. This setup violates the relativity principle in the Galilean sense (that uniform motion is indistinguishable from rest), even though Newton’s equations remain invariant under Galilean transformations.
Does this mean the relativity principle is different from the invariance principle?
In my opinion, they are different, and the relativity principle suggests the invariance principle, but the latter doesn't imply the former. For eg, inability to detect one's motion using light led to SR, which has Lorentz invariance. On the other hand, in the case of General Relativity, even though the laws of physics are invariant in all frames, one can still detect one's proper acceleration.
In my opinion, the relativity principle is a heuristic principle that points towards the invariance of physical laws, but the invariance of laws doesn't imply the physical relativity principle, and they should be distinguished. This is probably the reason the phrase "general principle of relativity", started by Einstein himself, has gone out of favour nowadays. In the above example, the air acts like ether. The ether defined an absolute frame and the inability to detect anisotropies in the speed of light led to its rejection as Einstein said in this SR paper: Examples of this sort, together with the unsuccessful attempts to discover any motion of the Earth relative to the “light medium”, suggest that the phenomena of electrodynamics as well as of mechanics possess no properties corresponding to the idea of "absolute rest."