"Last year's events have finally redrawn the political map of the Caucasus," he told the 58th Army, which spearheaded Russia's action against Georgia in the conflict.
"The recognition of South Ossetia's and Abkhazia's
independence was the only possible solution," he said.
"This decision will not be reviewed."
Later, Medvedev reiterated his comments to a delegation from South Ossetia, saying: "Such decisions are made once and for all, and there is no way back."
Only Nicaragua has followed Russia's lead in recognising the regions, which Georgia calls occupied territory and where thousands of Russian troops remain based, as independent countries.
The five-day war killed at least 390 civilians and at its height displaced more than 100,000 people.
In Tskhinval, the South Ossetian capital, hundreds of people marked the event, holding a candle-light vigil shortly before midnight, the time when Georgian forces launched their assault in August last year.
Images of Mikheil Saakashvili, the Georgian president, were interspersed with pictures of destroyed homes and elderly women in tears and projected on a giant screen in the capital, while musicians played melancholy music.
Eduard Kokoity, the South Ossetian leader, addressed the crowd and said Georgia bore the blame for the conflict.
"The goal of the operation was the destruction and exile of the South Ossetian people," Kokoity said.
"South Ossetian fighters courageously thwarted Tbilisi's plans for blitzkrieg. Russian troops came to the rescue of South Ossetia and pushed the bloodthirsty enemy back," he said.
Georgia has rejected claims that its military tried to rid the region of Ossetians, alleging instead that Ossetian militia engaged in the ethnic cleansing of Georgians in South Ossetia.
The war rattled Western confidence in oil and gas routes running through Georgia and skirting South Ossetia.
Western states condemned Russia's action as "disproportionate" and the European Union and Nato froze talks with Russia, a major supplier of energy to Europe.
But a year later, ties are back on and Medvedev said the conflict had not damaged Russia's international relations.
One year after it ended, Russia and Georgia are still blaming each other for starting the war.
Georgia says the war began late August 7, 2008, with the alleged entry of a Russian military convoy into South Ossetia. Commemorative ceremonies were held there on Friday.
But Russia insists August 8, the day that South Ossetia's capital came under a Georgian artillery barrage, marks the war's start.