The film, which does not yet have a title, is a romantic comedy set in the 1930s and stars Steve Carell, Blake Lively and Kristen Stewart.
Set for release this summer, Amazon will open the film with a traditional theatrical release and then make it available for members of its Prime service to stream.
"Like all beginning relationships, there is much hope, mutual affection and genuine goodwill the lawsuits come later," Allen said in a statement.
The filmmaker, 80, is also writing a television series for Amazon, scheduled to come out later this year.
Set in the 1960s, it will feature Allen, actress Elaine May and singer Miley Cyrus.
"Woody Allen is a brilliant filmmaker," Amazon Studios head Roy Price said.
"We're so proud to be in business with him for both his next film and his first-ever TV series."
Amazon has been seeking to catch up with Netflix, which has loyal followings through series such as the dark Washington thriller "House of Cards" and prison comedy "Orange Is the New Black."
Amazon has already won awards with "Transparent," a comedy-drama about a family dealing with a transgender father, and "Mozart in the Jungle," about the wild off-stage lives of New York classical musicians.
Amazon made a splash at the Sundance Film Festival last month, buying up the rights to seven independent films and outbidding traditional buyers, according to trade publication The Hollywood Reporter.