Original: It forms part of Colombia's border with Ecuador, as well as most of the frontier with Peru.
Simplified: It makes the border between Colombia and Ecuador, and makes up most of the frontier with Peru.