At present, in most modern communication systems, for example, in modern satellite terminals, the use of scanning beam antennas, i. e. antenna arrays is assumed. At the same time, at large scanning angles, the side lobe level (SLL) increases strongly and decrease in the gain is observed. In this regard, the problem of finding a procedure for synthesizing an amplitude-phase distribution (APD) with low SLL and high gain (G) at large scanning angles comes up. One of the ways to reduce SLL and compensate for the decrease in G is to synthesize the optimal APD (in terms of the maximum G and minimum SLL) using optimization algorithms. At the same time, taking into account the characteristics of the radiation pattern of the array emitters requires numerical electrodynamic calculation. The goal of this paper is to develop a procedure for the synthesis of APD with low SLL for linear and rectangular antenna arrays at various, including large, scanning angles and compensation for G reduction using a genetic algorithm and numerical electrodynamic calculation. The methods for studying the characteristics of antenna radiators are numerical electrodynamic modeling by the finite element method (FEM) in Ansys HFSS computer-aided design system and optimization of the APD for a given radiation pattern(RP) by a random search method using partial diagrams of antenna elements. The novelty is the combination of accurate numerical electrodynamic calculation of the RP of antenna elements and optimization search for APD for the synthesis of the required RP using partial diagrams. As a result, a procedure for APD synthesis of linear and uniform rectangular equidistant (for example, 8- and 64-element) antenna arrays has been developed, taking into account the exact electrodynamic characteristics of antenna elements and their mutual resistance. Radiation patterns were obtained taking into account the effect of neighboring elements, with the help of which, using a genetic algorithm, APDs on emitters were found at different scanning angles. The change in SLL and G of the antenna array is analyzed at different scanning angles using different APDs. The proposed algorithm allows to synthesize APD for a RP with low SLL and high G at scanning angles up to 40° for linear antenna array and up to 80° in the case of a uniform rectangular antenna array. The results of this work are relevant in the problems of radiation pattern synthesis, since the proposed solution provides a significant gain in the radiation pattern synthesis rate of APD of linear and rectangular antenna arrays, especially for systems with a large number of antenna elements. At the same time, it is possible to maintain a high G at large scanning angles, and achieve a significant reduction of SLL.