It is safe to supply a Uno or Mega from a 3Amp 5 Volt power bank.
The Uno or Mega would only draw the current required even if the power bank was 2, 3, or even 100 Amps.
You may still face the problem of the unwanted shutdown if the load is not sufficient to keep the power bank "alive".