He gave a sermon to the hundreds of people gathered including the Queen:
'Great is your faithfulness,' says the prophet Jeremiah, turning to God in a time of deep distress.
As our nation honours at this service all of you who have served in Afghanistan - forces personnel and many others, alongside so many of other nations - I ask you to hear those same words today, reverberating around our land: great is your faithfulness. You know about faithfulness.
Today is a moment for us to say thank you: thank you to all who served, whatever your role.
We thank you for your faithfulness: you who left family behind, you who trained hard, you who did not turn from danger, you who suffered injury and you who risked yourselves to care for the injured. I'm told that each wounded person was supported by up to 80 others by the time they got home. Great is your faithfulness.
We also thank those of you who stayed behind, who let your loved ones go: you who worried for their safety each day and took your phone to your bedside each night, you who lived with the pining of children, as well as your own fears. Great is your faithfulness.
And we honour the faithfulness of all those who gave up their lives to give peace and security for others. We will remember them and we recognise them, not only by saying thank you but by showing our thanks - with words and also in action: as we strive to imitate their self-giving, as we seek to be as courageous in living as they were in dying. As we seek to fulfill the words of Jesus in the beatitudes: where the promise of blessing is not something warm and fuzzy to keep to ourselves but something that is found in our giving and our sharing - in comforting those who mourn, in thirsting for righteousness, in peace-making.
It is no light matter to say 'Great is your faithfulness', if we realise what faithfulness costs, and dare to commit ourselves, for decades to come, to the same faithfulness. Jeremiah voiced these words to God after seeing his country devastated, his people killed or exiled, his city and livelihood destroyed. He who wrote those words knew suffering, he knew grief and loss: yet he spoke not of blame but hope, not of recrimination but of faith, not of anger but of love.
As Jesus died, he didn't know whether his suffering had been in vain. In sorrow, pain and agony - yet in hope - he said 'it is finished'. And because of his faithfulness, we can anticipate God's opening to us the gates of eternal life.
One day we will all, each one of us, stand before God. These are the only words we long to hear from him. They are the gold standard for all of us. "Great is your faithfulness, good and faithful servant".