Amazon has nabbed “Honey Boy,” a coming-of-age drama that is inspired by Shia LaBeouf’s stormy relationship with stardom. The film premiered at this year’s Sundance Film Festival, earning a standing ovation and respectful reviews, particularly for Labeouf’s performance as his father and for Noah Jupe’s star turn as a child actor on the rise.

Amazon has been very active at this year’s festival, buying domestic rights for the Mindy Kaling comedy “Late Night” for $13 million and shelling out $14 million apiece for the rights to “The Report” and “Brittany Runs a Marathon.” The “Honey Boy” deal is for global rights and is in the $5 million range.

“Honey Boy” was directed by Alma Har’el (“Bombay Beach”) from a script by LaBeouf. It was written as part of LaBeouf’s rehabilitation program. The actor, once among the most promising stars in Hollywood thanks to turns in “Transformers” and “Indiana Jones and the Kingdom of the Crystal Skull,” has struggled with substance abuse and had numerous brushes with the law.

“It’s strange to fetishize your pain and make a product out of it,” LaBeouf said from the stage of the Eccles following the film’s premiere last week. “And you feel guilty about that. It felt very selfish. This whole thing felt very selfish. I never went into this thinking, ‘Oh let me f—ing help people.’ That wasn’t my goal. I was falling apart.”

“Honey Boy” co-stars Lucas Hedges, FKA Twigs, Maika Monroe, Natasha Lyonne, Martin Starr, Byron Bowers, Laura San Giacomo, and Clifton Collins Jr. CAA and Endeavor Content represented the filmmakers in the negotiations.