Mourners lined the main street in Cpl Joshua Hoole's hometown of Ecclefechan, near Lockerbie, as the cortege left the village.
The 26-year-old, who was a member of the Rifles regiment, died after collapsing at Dering Lines infantry training centre on 19 July.
An investigation into his death continues.
Dyfed-Powys Police said a post mortem examination has been completed, but the results are not expected until late September.
Cpl Hoole's coffin was carried by military bearers and his funeral service was held at the Crichton Memorial Church in Dumfries.
A ceremony restricted to close family and friends will be held at nearby Roucan Loch Crematorium later on Thursday afternoon
Cpl Hoole had served on two tours in Afghanistan.
He was set to marry next year, and be best man at his brother's wedding on Saturday.
The funeral of a soldier who died during a training exercise in Brecon has taken place.