Did you know…
Which AEG carried a 20 mm cannon?
Short answer
The AEG G.IVk, the ground-attack version of the twin-engine G.IV bomber, of which 320 were built. It carried the 20 mm Becker Type M2 cannon, whose main users were large twin-engine aircraft in the IdFlieg's Grossflugzeug or "class G" category: the G.IVk itself and the Friedrichshafen G.III bomber.

A cannon for the big aircraft
The 20 mm Becker Type M2 was not designed for light fighters. Its main users were large twin-engine aircraft, initially grouped in the Grossflugzeug category — "class G" — defined by IdFlieg, the German body responsible for classifying and overseeing aviation equipment. Two specific types head that list: the Friedrichshafen G.III bomber and the AEG G.IVk ground-attack aircraft. The underlying reason is one of design: a weapon of that calibre, with its ammunition, required an airframe with carrying capacity and room for the crew member serving it — something class G offered and a single-seater did not.
The G.IVk, AEG's armed version
Within AEG's catalogue, the aircraft linked to the 20 mm cannon is therefore the G.IVk, a ground-attack derivative of the G.IV bomber. This was not a marginal branch of the manufacturer's output: the G.IV was the bomber of which 320 examples were built, so the armed variant started from an already established, mass-produced twin-engine airframe.
Class G and firepower
The resulting combination says a good deal about German aviation at the end of the First World War. Rather than designing a new aircraft around the weapon, a class G bomber was taken and adapted to carry the Becker Type M2 against ground targets. That is the G.IVk's role, and that is the answer to the question: the AEG that mounted a 20 mm cannon was the G.IVk, the G.IV's ground-attack sibling, alongside the Friedrichshafen G.III as the other major carrier of the same cannon.
More questions

Aviation history
What was special about the Vertol 76?
Vertol's VZ-2 tested the tiltwing concept for vertical take-off and landing. After ground trials beginning in April 1957, it first took off on 13 August only… more…

Aviation history
Which was the most-produced American fighter of the Second World War?
The Republic P-47 Thunderbolt, of which 15,636 or 15,683 units were built, depending on the source. It was also one of the heaviest fighters of the conflict… more…

Aviation history
Who flew the E-66 at 2,149 km/h?
Konstantin or Vladimir Kokkinaki, depending on the source. Konstantin is credited with the absolute record on a closed 100 km circuit, at 2,148.66 km/h, set… more…

Fly-by-Owen (CC BY SA), vía commons Aviation history
How many I-11Bs were built?
Between 208 and around 450, depending on the source: one of the AISA I-11 reference sheets gives 208 examples built, while All-Aero speaks of around 400 built… more…

Aviation history
How many HH-53s could be converted to Pave Low III?
Eight HH-53C aircraft received an improved systems package and were redesignated HH-53H Pave Low III. The other figure in circulation, nine MH-53H and 32… more…

SCDBob (CC BY SA), vía commons Aviation history
What did the A129 Mangusta's armor protect?
The fuselage: the A129's airframe is armored and, according to All-Aero, designed to protect against 12.7 mm rounds, with partial protection against 23 mm… more…