Tunisia's prime minister, diplomats, Tunisians and tourists gathered on the beach to pay their respects.
A one-minute silence was held simultaneously in Sousse and across the UK, home to 30 of those killed.
Authorities say they have uncovered the network behind the attack and are holding eight suspects.
Security has been stepped up at the beach and many people are still devastated by what happened a week ago, says the BBC's Ben Brown in Sousse.
Hotels and beaches are empty as thousands of tourists have already left the country following the attack, he says.
The Tunisian Prime Minister Habib Essid and the British ambassador Hamish Cowell laid wreaths on the beach.
The Tunis government fears the attack, which jihadist group Islamic State (IS) has claimed, will destroy its tourism industry, the country's biggest foreign currency earner.
Authorities have identified 28-year-old student Seifeddine Rezgui as the gunman who carried out the attack.
They have also deployed 1,377 armed security agents at hotels and on beaches to guarantee the safety of people, AFP reports.
In March, IS killed 22 people at the famous Bardo museum in Tunisia's capital, Tunis.
At the scene: Thomas Fessy, BBC News, Sousse
The Tunisian prime minister and several government ministers came, along with ambassadors from the UK, the US, France, Portugal, Ireland and the Netherlands.
Representatives from Belgium, Canada and Libya also attended the brief commemorative gathering.
They all arrived in silence, lay wreaths of flowers in front of the plaque erected at the scene of the attack, before two trumpets gave a solemn salute.
Dozens of tourists had come to pay their respects too. Most of them attended in their swimsuits and beach towels wrapped around their waist.
The smell of sun cream floating around was a strange reminder of the 38 people who were killed here, most of them lying on sun beds, enjoying some relaxing holiday time.
Dignitaries left without a word while tourists and Tunisians - some of whom were hotel staff - formed a human chain holding hands around the flowers that were laid in the sand throughout the morning.
A special ceremony has been held in the Tunisian resort of Sousse to remember the 38 people killed in an Islamist attack a week ago.