Discuss as:

You've got money: Hollywood scribe Ephron made fortune on stock market

The famous screenwriter, author and humorist was in the final stage of leukemia and reportedly kept her illness a secret, even from close friends. NBC's Kristen Dahlgren reports.

Nora Ephron, the prolific screenwriter, playwright, novelist and journalist who died in June 2012 after a private battle with cancer, left behind a massive estate valued at upwards of $27 million, according to new court filings obtained by NBC News.

In addition to the bundles she banked scripting romantic comedy classics like "When Harry Met Sally," Sleepless in Seattle," and "You've Got Mail," Ephron also raked in millions playing the stock market.

Charles Sykes / AP

Nora Ephron poses for a photo at her home in New York, Wednesday, Nov. 3, 2010.

The Hollywood veteran, who invested in blockbuster Internet ventures in their nascent years, amassed $642,000 in Apple shares, over $110,000 in Google and $89,000 in Amazon, according to the court documents.

In total, Ephron — who died at age 71 from acute myeloid leukemia — left behind roughly $10.2 million in stocks and other savvy investments excluding real estate holdings.

And her property portfolio — including a Beverly Hills bungalow, an East Hampton mansion and a Manhattan co-op — totaled just above $12 million, according to the documents.

Ephron, who began her career as a New York City reporter before skyrocketing to the upper reaches of Hollywood's A-list, also accumulated some $4 million in personal property — including $240,000 worth of belongings inside her Upper East Side apartment and some $500,000 in cash, mortgages and loans.

Related: Nora Ephron's son remembers his mother's last days in poignant NYT article

Her last will and testament, filed in court last September, had originally estimated her assets at $15 million — nearly half of the actual value.

She left the majority of her sizable estate — approximately $22 million — to her husband Nicholas Pileggi, who collaborated with filmmaker Martin Scorsese on the screenplay for the iconic gangster saga "Goodfellas," which was adapted from his Mafia book "Wiseguy."

Ephron also left money to her surviving sons, sisters, nieces, nephews and staff.