Indeed, when you are imposing sanctions on the state for violations of international law they should serve as an instrument of making that state comply with the rules and norms of international law. That much is true. However, it is rarely explained in the media, why U.S. have decided to impose sanctions on Russia unilaterally, albeit that it was then followed by some of its allies in Europe. The fact of the matter is that a lot of norms of the contemporary international law can be found in the Charter of the United Nations (UN), one of the grounding documents of the world order we live in right now.
All members of the UN are bound by the norms that are embedded into the Charter and agree to follow these norms on international level. The Charter have established a body of the UN called Security Council, that is charged with the maintenance of international peace and security. This body consists of permanent and non-permanent members. The later are changing based on specific procedure, while the former remain members of the Security Council basically since the end of World War II. Conflict situations between states (such as for example between Russia and Ukraine) are falling under the jurisdiction of Security Council that has powers to impose sanctions based on the decisions of its members. This is a legitimate procedure on how international community makes decisions that the breach of one of the states of international law and its obligations under UN Charter should be treated with sanctions of economic, military or other character based on globally accepted norms of international law.
The question then arises, why haven't the U.S. chose that same path to legitimize the sanctions against Russia through the UN with the support of international community? The simple fact is that decisions of the Security Council can be vetoed by any of its permanent members and one of such members is Russia. Which brings us to the point that U.S. was unable to try and uphold the international law through customary procedure legitimate to the international community.
U.S. then proceeds with the unilateral sanctions against Russia and nothing in international law forbids U.S. to do so. However, when U.S. acts unilaterally it means that it is a political decision of the government of the U.S., not of the international community. Moreover, the enforcement of any law (including international law) is effective and has desired effect only if it is applied to all the subjects of the law equally, without discrimination. Simply, law should be equal to everybody. Hence, the importance of the collective decision on the matter that is represented by the procedures in the UN.
The sad fact is that the U.S. is not applying the same rules and actions to all the states in the world equally when it comes to the international law. The stark example is the occupation of Nagorno-Karabakh and seven adjacent regions of Azerbaijan by Armenia. This occupation have been reflected in the multiple international legal documents and even in the decision of international judicial body that works specifically with international law. Nonetheless, the U.S. have not recognized Armenia as an aggressor state and have not imposed any sanctions on the aggressor despite the fact that this situation is protracted since the early 1990's. On the other hand, U.S. has imposed sanctions against Russia with practically no international legal documents or decisions of international organizations to support them, while ignoring the same situation in Russia's neighborhood.
If U.S. can impose sanctions on the nuclear power and permanent member of UN Security Council it is obvious it can do so in regards to Armenia. Then, that brings us to the conclusion that the point of sanctions of the U.S. was not to uphold the international law and its principles, but to take steps on international arena that would show discontent with its adversary. Thus, international law would not suffer from the partial or even total lift on the sanctions imposed on Russia, because it was not originally the point of the sanctions in the first place.
Quite frankly the sanctions have proven to be ineffective towards Russia anyway, as they have not changed the position or Russia towards situation in Ukraine and have yet to show any other effect desired by U.S.