Kodak fortress (Ukrainian: Кодак; Polish: Kudak) was a fort built in 1635 by the order of Polish king Władysław IV Vasa and the Sejm over the Dnieper River, near what was to become the town of Stari Kodaky (by modern day: Dnipropetrovsk, Ukraine). It was constructed by Stanisław Koniecpolski to control Cossacks of Zaporizhian Sich, prevent Ukrainian peasants from joining forces with the Cossacks and guard the southeastern corner of the Polish-Lithuanian Commonwealth. The Poles tried to establish order in that area, and commissioned French military cartographer and engineer William le Vasseur de Beauplan to construct it. The fortress cost around 100,000 Polish zlotys. The dragoon garrison was commanded by the French officer Jean de Marion.

Shortly after construction was completed in July 1635, the fortress was captured by surprise attack made by the Cossack forces of Ivan Sulima (the night of August 11/12, 1635). The entire German mercenary garrison (numbering 200 men) was killed and the fortress was demolished.

In 1639, it was rebuilt by the Poles who hired the German engineer Friedrich Getkant. It was tripled in size. The fortress contained a Catholic church with monastery and an Orthodox church. Its garrison was increased to 600 with artillery support. About two miles outside of the fortress was erected a huge guard tower. The governor of that fortress became Jan Zoltowski while its commandant became Adam Koniecpolski (a nephew of Stanisław).

During the Khmelnytsky Uprising of 1648, it was surrendered to the Cossacks on October 1, 1648, after a 7-month siege commanded by Krzysztof Lada-Grodzicki. The fort capitulated upon hearing the news of Polish defeat at the Battle of Pyliavtsi. The defenders were massacred after they had left Kodak upon capitulation.

After the Treaty of Pereyaslav in 1654, Kodak fortress was manned by the Cossacks. It was later razed by Russia by Peter the Great according to the terms of the Treaty of the Pruth with the Ottoman Empire in 1711.

Today the site is just ruins, but it is a popular tourist attraction. Coordinates: 48°22′53″N 35°08′13″E﻿ / ﻿48.38139°N 35.13694°E﻿ / 48.38139; 35.13694