Why was Deputy Peterson there?
School resource officers are police officers who are responsible for safety and crime prevention in schools, the US government says.
There are between 14,000 and 20,000 such officers in the US, according to the National Association of School Resource Officers.
Mr Peterson had been in his position at the school since 2009, local media report.
Were there any other failures?
Concerns have been raised about both the school's video surveillance system and whether warnings about Nikolas Cruz were ignored.
It has been reported that the person watching the surveillance system was relaying information 20 minutes old to police, so officers believed the gunman was in a certain area when he was not.
It has also been reported that calls were made to local authorities in 2016 and 2017 expressing concern about Nikolas Cruz, including one saying he was planning to attack the school.