The 21-year-old, who competed as a flyweight at the 2016 Olympic Games in Rio de Janeiro, failed a dope test at a World Series Boxing match.
The match was between Morocco Atlas Lions and British Lionhearts in Casablanca last April.
He was provisionally suspended from all international and domestic competitions last October.
AIBA said in a statement on its website that it imposed the ban after reaching a “settlement agreement” on the case, without giving details.
GB Boxing noted the decision and said AIBA had also expressed an opinion “that the athlete did not take the prohibited substances with the intention to cheat.”
The boxer later said the length of the ban was “extreme’’ but he had to accept it and move on, with the aim of competing at the 2020 Tokyo Olympics.