Only a few kinds of prokaryotes can synthesize organic matter by themselves, such as cyanobacteria, nitrifying bacteria and photosynthetic bacteria. These prokaryotes are autotrophs and belong to producers in the ecosystem. Most prokaryotes are heterotrophic and belong to consumers or decomposers.