Lamu County Commissioner Irungu Macharia said the attackers hurled explosives at the vehicles – the company’s excavator and a lorry ferrying cement – causing explosions in the incident at about 12.30pm.
The excavator controller and lorry driver jumped out of the vehicles and escaped unhurt.
They hid in the bushes until security agents came to their rescue.
Mr Macharia said about four heavily armed suspected terrorists carried out the ambush and then fled into a nearby forest.
No casualties were reported since the excavator had one controller while the lorry had just the driver,” he said.
The incident stopped transport on the route for about an hour as Kenya Defence forces (KDF) soldiers and police combed the area.
The commissioner assured security on the road, saying patrols had been intensified across the county.
“Enough security agencies, including the KDF and police, have been deployed to the area to pursue the attackers,” he said.
“There is no cause for alarm as security has been optimised.”
Some of the residents interviewed by the Nation said the security personnel responded quickly.
Mr Emmanuel Wanyoike said the attack may have been aimed at scaring the construction workers into abandoning the project.
The road leads to the mega Lamu Port (Lapsset) project site in Kililana.
“They are people who are anti-development but we thank God that our security forces are very alert,” said Mr Wanyoike.
The attacks came barely three weeks after security agencies repulsed about 50 heavily armed suspected Al-Shabaab militants at Pandanguo Village in Witu Division, Lamu West.
On January 2, three passengers were killed and three seriously injured after heavily armed Al-Shabaab militants ambushed a convoy of buses heading from Mombasa.
Three hours later on the same day, a multi-agency operation to search for the attackers announced that four terrorists had been killed and one captured alive.
On January 5, the militants invaded the Manda-Magogoni naval and US military bases, killing a service member and two Department of Defence contractors, and injuring two members of the department.
Five Al-Shabaab terrorists were killed and another five captured during the incident.