Two of the three attackers were also killed, and the third gunman was missing after the attack on Le Campement resort, the source said. Three UN staff members were injured and taken to a hospital, the source said.
In an earlier statement, Mali's Ministry of Security and Civil Protection said the resort attack was carried out by "armed individuals, certainly terrorists." The statement said a Malian anti-terror force was on the scene.
"They [the armed men] exchanged gunshots with members of the special anti-terrorist force (FORSAT) who had arrived just a few minutes after the attack. FORSAT managed to secure the surroundings of the site. The operation to secure the premises is in progress," the statement said.
Four jerry cans of an undetermined material were also recovered at the scene, the source said.
The Swedish Defense Ministry said it was trying to contact a Swedish national missing since the attack. The individual was a member of Sweden's armed forces, the ministry said in a statement.
The EU Training Mission in Mali tweeted an earlier statement that it was aware of the attack and was assessing the situation.
Earlier this month, the US Embassy in Bamako issued a travel warning on its website, saying there was an increased security threat to Westerners.
"The US Embassy informs US citizens of a possible increased threat of attacks against Western diplomatic missions, places of worship, and other locations in Bamako where Westerners frequent. Avoid vulnerable locations with poor security measures in place, including hotels, restaurants and churches," the warning said.
Le Campement is on the outskirts of the capital, about 30 minutes from downtown Bamako. The resort is also popular with expatriates who use its facilities to host business meetings and team-building exercises.
The grounds include a hotel, bars, restaurant, spa and swimming pools. The resort also offers live entertainment and several outdoor activities, including bike rides and kayaking on the Niger River.
The former French colony has been battling Islamist extremists with help from French forces and the United Nations.
In November 2015, gunmen raided a Malian hotel and killed at least 22 people, according to the UN Mission in Mali.
The gunmen shouted "Allahu akbar" as they opened fire on tables of people who were gathered for breakfast at the Radisson Blu Hotel in Bamako, a witness said.
Two attackers were killed, but it was unclear then whether security forces killed them or whether they blew themselves up, mission spokesman Olivier Salgado said at the time.