2A is max load current for pi2b+, and 2.5A is max load current for pi3b+ - if you want to feed it via the VIN pin from a different voltage, I recommend keeping the step-down/step-up/voltage regulator at least 20cm away from your board. You can feed it from a car battery if you wish, it will only draw the current (amperes) it needs -> ~2A. Be careful and heatsink your step-up/down/voltage regulator module. The aging TIP120 darlington NPN transistor is perfect for this, I use them often to deliver an exact voltage to $_whatever. Attach a small copper heatsink to its frame, and drive the voltage to 5V +/- 20% with a cheap arduino clone and analogWrite() - they aren't noisy like many of those LM* chips. TIP120s can pass 5-6A if moderately heatsinked, and more if severely heatsinked... a good choice for 2A is a 40x40x10mm copper heatsink. The TIP120 + arduino clone + heatsink will be less than 5USD and look AWESOME. (Remember that the arduino likes 7-12V on VIN, so I usually step down from a 12V supply).
from arduino to TIP120 base (across a 1kOhm resistor, try analogWrite( tipPin, 107 ). Keep you
analogWrite() has 8-bit resolution, so I usually do this:
12÷256 = 0.046875V
0.046875×107 = 5.015625V
Nice and clean. Keep load (pi) between the 12V source and the collector pin, and wire emitter to ground. Then measure the output voltage, and increase the value for analogWrite() to offset the voltage drop of ~0.6V. A value of 120 is usually good, but measure it anyway.
I would check if it's okay to pass that high a current to a GPIO pin though. Don't want to fry your VIN pin.