Amniocentesis is a procedure used to obtain a small sample of the amniotic fluid that surrounds the fetus during pregnancy.Amniotic fluid is a clear, pale yellow fluid made by the fetus. The fluid protects the fetus from injury and helps to regulate the temperature of the fetus.n amniocentesis may be performed to check for fetal lung maturity if a baby is expected to be delivered early. Specific substances present in the amniotic fluid can be measured or tested for these conditions. The fluid is sent to a genetics lab so that the cells can grow and be analyzed.