Amniotic sac

The amniotic sac holds a fetus while it is developing during pregnancy. The amniotic sac is filled with amniotic fluid, which protects the fetus. 
Development.
The amniotic sac starts to form and fill with amniotic fluid just days after a woman gets pregnant. At first, the amniotic fluid is made from the mother's plasma (the liquid part of her blood).
At first, the amniotic fluid is made mostly of water with electrolytes (salts). However, by the 12th to the 14th week of pregnancy, proteins, carbohydrates, lipids, phospholipids, and urea are all in the amniotic fluid. These things help the fetus grow.
As the fetus gets bigger, more amniotic fluid gets created. By the time the baby is born, there is about one liter of amniotic fluid in the amniotic sac.
Purpose.
The amniotic fluid.
The amniotic fluid is very important in protecting the fetus and helping the fetus grow:
After the fetus is about four months old, when the kidneys start to work, the amniotic fluid serves another important purpose. The fetus swallows amniotic fluid. This fluid passes through the fetus's digestive system and urinary system and gets urinated out into the amniotic fluid. This helps the fetus "practice" swallowing, digesting, and urinating before being born.
The amniotic sac.
The amniotic sac has two layers, which have two different jobs. The inside layer holds in the fetus and the amniotic fluid. The outside layer attaches to the umbilical cord, so that blood and oxygen from the mother can get through the amniotic sac and to the fetus.
Testing.
A sample of amniotic fluid can show whether a fetus has certain genetic disorders or infections. A test called an amniocentesis can take a sample of amniotic fluid with a needle and study it for problems.
Birth.
When a woman starts to give birth, the amniotic sac should break and the amniotic fluid will leak out the woman's vagina. This is often called the time when a woman's "water breaks." Doctors call it "rupture of membranes."
Once the baby is born, the amniotic sac is pushed out of the woman's vagina in the afterbirth, along with the placenta.