There are provided a lens that is molded with high accuracy and a method of molding the lens. The lens has an optical axis and includes a pair of optical functional surfaces on front and rear surfaces thereof. The lens includes an optical functional portion that includes the pair of optical functional surfaces, an edge portion that is provided at an outer periphery of the optical functional portion, and a connecting portion that is provided between the optical functional portion and the edge portion, connects the optical functional portion with the edge portion, and is thinner than the edge portion in a direction of the optical axis.