He was appointed on 13 March 1640 and was Governor until 1 August 1640. He was succeeded by January Thyszoon Payart. In 1637 Rajasingha II, king of Kandy approached the Dutch East India Company for military support against the Portuguese occupiers.
Admiral Adam Westerwold was sent to help the king to capture fort Batticaloa.
Coster had arrived in April 1638 in Trincomalee, which was already in Dutch hands, and sailed for Batticaloa with three ships and 180 men, where he waited for the arrival of Westerwold. The admiral arrived with four ships on May 10, while the troops of the king arrived the next day from inland.
On 14 May the Portuguese surrendered the fort and were deported to the Coromandel coast. The next week king Rajasingha signed an agreement with the VOC to allow a monopoly in the trade in cinnamon, amongst others, in exchange for help driving the Portuguese out of his kingdom.
After Westerwold left, Coster remained in fort Batticaloa with 100 mentor
In early 1640 Kandy and the VOC had signed another agreement and decided to capture Galle from the Portuguese. Coster arrived with his troops on 8 March, while on 11 March the king"s troops and three VOC ships arrived with 400 sailors and soldiers. On 13 March 1640, the combined troops under command of Coster overpowered the fort Santiago and took over the city.
This fort was subsequently renamed Akersloot after the birthplace of Coster.
The High Counsil decided to install Coster as Governor of Ceylon, with Galle as residence, where he had a garrison of 200 mentor As part of the agreement, Trincomalee was returned to Kandy.
When Rajasingha learned that Coster was reluctant to return more of the conquered land, he had him and his seven companions murdered near Nilgala on the way back from Kandy to Batticaloa in August 1640. Coster"s wife was one of the first Dutch women to arrive in Ceylon, in November 1640.