The forest near the Kenya-Somalia border and the area around it has been attacked by al-Shabab militants in the past.
Police said the attackers invaded Taa village, some miles away from the popular tourist destination of Lamu town, and targeted homes in a coordinated manner.
Many villagers ran and hid in bushes as the gang descended on their homes, survivors said.
Coast regional commissioner John Elungata said assailants attacked the village at night but were repulsed by Kenya Police Reservists after a heavy gunfight.
Elungata urged locals to cooperate with security officers on the ground.
“The situation is calm, we have officers patrolling the area and we would like to ask members of the public to tell us what they know to help us in our investigations as we continue hunting them” he said.
The attack comes barely a week after the suspected al-Shabab militants attacked a police vehicle in northern Kenya, killing two officers and a civilian.
Kenya began the construction of a 700-kilometer (435-mile) wall along its border with Somalia in 2015 to stop al-Shabab militants from crossing in and out of Kenya.
The project plan includes having designated immigration and customs entry points with a concrete wall fitted with CCTV cameras.
Trenches are also being constructed in the area.
The plan includes the creation of at least 22 border posts with well-equipped personnel to respond to any form of aggression.
Officials say, once complete, the teams will be spread 40 kilometers (25 miles) apart to enable quick response to attacks from militants.
The fence, especially in Mandera and Lamu, has helped reduce incidents of attacks by the militants who previously crossed at will.
Research by government security agencies says 30% of the country’s security problems are traced to the porous Somalia border.