Rachel Brosnahan is set to star in “The Switch,” a life-swap comedic drama based on Beth O’Leary’s novel of the same name.

Bekka Bowling is adapting the screenplay for “The Switch,” which is set up at Steven Spielberg’s Amblin Partners.

The dramedy centers around a 29-year-old consultant, and her 79-year-old grandmother, who decide to swap lives (including cell phones) for two months, after a series of personal setbacks. The younger woman moves to a tiny Yorkshire village to tackle the responsibilities of dog walking and neighborhood watch and the older woman finds herself in a tiny London flat, navigating dating apps and starting up a social club for lonely Londoners.

Kristie Macosko Krieger (“The Post,” “Bridge of Spies”) will produce, while O’Leary will serve as executive producer alongside Brosnahan. Amblin Partners’ president of Ppoduction Jeb Brody will oversee the project for the studio.

“I am thrilled to be partnering with Amblin to bring Beth O’Leary’s beautiful book to life.” Brosnahan said in a statement. “I was utterly charmed and deeply moved from the first page to the last and can’t wait to share Leena and Eileen’s story with everyone.”

O’Leary’s book “The Switch” was released in the U.K. last month and has become a Sunday Times sestseller. It will publish in the United States and Canada on Aug. 18. Her debut novel “The Flatshare,” which she wrote on the train as she commuted to her day job in children’s publishing, was released last year and was a Sunday Times top five bestseller.

Brosnahan is repped by Brillstein Partners, CAA and Schreck, Rose, Dapello, Adams & Dunham. O’Leary is represented by Sheila David and Tanera Simons at the Darley Anderson Literary, TV & Film Agency, London & Richard Thompson at Brecheen Feldman Breimer Silver & Thompson, LLP. Bowling is represented by CAA and Robert Taylor at The Artists Partnership.