An exact sampling formula for a Wright-Fisher population of fixed size N under the infinitely many neutral alleles model is deduced. This extends the Ewens formula for the configuration of a random sample to the case where the sample is drawn from a population of small size, that is, without the usual large-N and small-mutation-rate assumption. The formula is used to prove a conjecture ascertaining the validity of a diffusion approximation for the frequency of a mutant-type allele under weak selection in segregation with a wild-type allele in the limit finite-island model, namely, a population that is subdivided into a finite number of demes of size N and that receives an expected fraction m of migrants from a common migrant pool each generation, as the number of demes goes to infinity. This is done by applying the formula to the migrant ancestors of a single deme and sampling their types at random. The proof of the conjecture confirms an analogy between the island model and a random-mating population, but with a different timescale that has implications for estimation procedures.