Attosecond pulses can be used to create and control coherence in resonant media, since their duration is shorter than the population relaxation times T1 and medium polarization T2. Previously, the possibility of creating and ultrafast control of electromagnetically induced gratings (EMIG) of atomic populations in a resonant medium was shown using a sequence of extremely short light pulses, when the pulses coherently interact with the medium and do not simultaneously overlap in the medium. These studies were carried out in various approximations, when a finite number of energy levels of the medium is taken into account, or when the pulse amplitude is small. In this paper, based on a direct numerical solution of the time dependent Schredinger equation without the indicated approximations, we study the possibility of ultrafast coherent control of populations and the creation of an EMIG by a pair of attosecond pulses in a multilevel resonant medium with a low density of particles. The medium is modeled using a one-dimensional rectangular potential well with infinitely high walls. The studies performed show the possibility of ultrafast coherent control of the properties of resonant media based on quantum wells using attosecond pulses. Keywords: electromagnetically induced gratings, coherent interaction, extremely short pulses, unipolar pulses, attosecond pulses, medium coherence.