Officials said 19-year-old Lucas Ransom was body-boarding about 50 to 100 yards off of Surf Beach when the shark attacked him. Witnesses said the shark bit off the victim's leg.
Authorities released photos of the victim's bodyboard, which was chewed up by the shark.
Ransom, who is from Riverside County, was a junior at the University of California-Santa Barbara where he was majoring in chemical engineering.
"Apparently the friend of the victim saw his buddy go underwater for a brief period of time and then was able to bring his friend back to shore," said Jeremy Eggers, a spokesperson for Vandenberg Air Force Base.
Officials have not identified the type of shark, which was described as being 14 to 20 feet in length.
Santa Barbara officials said the attack happened just before 9 a.m.
The beach is on the property of the Vandenberg Air Force Base, but the public is allowed to use it.
The last shark attack at Surf Beach was in 2008 when a shark bit a surfer's board. The surfer was not injured. The last fatal shark attack happened in 2003 at Avila Beach.
Officials have closed Surf, Wall and Minuteman beaches for 72 hours.