A transient Fe absorption edge during the prompt phase of a GRB has recently been observed for the first time. This has been interpreted as evidence for photoionization of the GRB environment by the burst radiation, which allows diagnostics of the density structure and element abundances in the vicinity of the burst. Assuming that the observed absorption feature is caused by photoelectric absorption, we model the time-dependent photoionization and X-ray radiation transport, and deduce constraints on the size and matter distribution of the photoionized region responsible for the absorption edge. If the density of the region is ≲10 10 cm −3 , then we find that the intervening material would have to contain ∼44Ω M . of iron within ∼1.3 pc of the burst source, assuming the measured best-fit ∼75-fold overabundance of iron. Alternatively, and more plausibly, the observed absorption feature could be caused by photoelectric absorption in dense clouds of radius r c ≲10 12 cm at ∼10 17 cm from the burst source, containing ≲0.7Ω M . of iron. In such an environment, recombination would compete with photoionization, until the clouds are effectively heated to the Compton equilibrium temperature of the ionizing GRB continuum. We also briefly discuss the recent suggestion that the absorption feature may be due to resonant scattering by Fe XXVI in a highly ionized, clumpy high-velocity outflow.