Financial terms were not disclosed.
The deal comes just days after the expiration of New York-based Viacom's licensing deal with Netflix Inc. Netflix had been paying Viacom for the right to show a broad range of its programming, but the companies couldn't come to an agreement before the deal expired at the end of May.
As part of the deal announced Tuesday, Amazon's Prime Instant Video service will now offer unlimited instant streaming access to children's shows such as "Bubble Guppies," ''The Backyardigans" and "Blue's Clues," along with MTV and Comedy Central shows like "Awkward," ''Tosh.0" and "Workaholics."
The Amazon service also will show future episodes of "Dora the Explorer," ''SpongeBob SquarePants," and "Fairly Odd Parents."
In addition, select shows from Viacom's Nickelodeon and Nick Jr. channels will be available through Amazon's Kindle FreeTime Unlimited service, which includes a variety of children's books, games, apps, movies and TV shows, the companies said.
In morning trading, shares of Seattle-based Amazon rose 64 cents to $267.52, while Viacom's Class B shares rose $1.18 to $68.11.