Beck, 33, pleaded no contest to one count each of unlawful sex with a minor and performing lewd acts on a minor.
Originally charged with five counts of engaging in sex acts with a person under 16, Beck could have been sentenced to as much as seven years in prison if convicted.
When she walked into police headquarters earlier this month, Beck told detectives she had carried on an affair with the boy, now 15, for nine months last year. She said the relationship, which ended in December, had left her consumed with guilt. She still is, her attorney said Thursday.
"You have a young lady who from the outset was very remorseful, and I think demonstrated the highest degree of remorse when she confessed, because she knew ahead of time she was going to state prison," Williamson said.
Police said they were unaware of the crime until Beck confessed.
After her arrest, Beck refused to post $175,000 bail, choosing to stay in jail instead. She did so, Williamson said, partly because of remorse and partly to avoid the news media.
Beck, who is married to a police officer, is the mother of three children.
"The family is avoiding the media and staying together and doing well," Williamson said.
The week before her confession, Beck abruptly quit her job at David Starr Jordan Middle School in this suburb adjacent to Los Angeles. She told school officials she was planning to move out of state.
Beck, who taught English and social studies, was popular with students, parents and fellow teachers, said Gabe Soumakian, assistant superintendent for the Burbank Unified School District.