Sam Hidalgo-Clyne was the scourge of the home side, not letting the awful conditions get the better of him and slotting three second-half penalties to give Edinburgh the edge.
Dave Denton's first-half try was cancelled out by a penalty try for hosts Connacht just before half-time, but head coach Lam insisted his side needed to take more from the wind advantage in the first period.
"We're disappointed to lose on our ground for the first time this season," he said. "It was going to be a monumental effort after losing the toss - we got it last week but not this week.
"So when we had the wind in the first-half we needed to pile some pressure and some points on. But we gave away a soft try through one defensive error, and then we were too sloppy around our line.
"In the first 20 minutes we just didn't get enough points. That was disappointing.
"They were, as I said they would be, powerful, and we struggled with the contact. They were able to hold us up and it was very messy in there and our ball was slowed down.
"At half-time I knew 13-7 probably wasn't enough, but I challenged the fellas that this was going to be a monumental effort - the biggest challenge we've had this season - to get out there in those conditions, which were the worst in my experience here, and hold on.
"They are a good side, particularly in these conditions. I'm proud of the boys and the way they hung in there but a lead of six points wasn't enough, even if at the end of the day we got a bonus point."
Follow us on Facebook, join the conversation on Twitter, sign up to our YouTube channel for extensive match highlights and sign up for our newsletter for regular updates on the GUINNESS PRO12
Guinness PRO12
Suite 208, Alexandra House,
The Sweepstakes
Ballsbridge, Dublin 4, Ireland