Connacht led 8-0 after 15 minutes as new wing Niyi Adeolokun offloaded to Eoin McKeon to touch down and centre Darragh Leader added a penalty.
The Dragons levelled before half-time through Nic Cudd's try and a Jason Tovey penalty but had captain Lee Byrne sin-binned shortly after the break for taking out Connacht fly-half Jack Carty in the air.
After Leader restored his side's lead, Carty was again taken out with Tyler Morgan joining Byrne in the bin for a dangerous spear-tackle before the fly-off sent Danie Poolman over with a splendid crosskick.
And despite Tovey's late penalty to secure his side a bonus point, Lam was satisfied with his side's winning start to the season.
"We got ahead but some of the options we were taking and just trying to close that game down, it had my heart going," he said.
"We know we can play a lot better than we did but we're pleased to get that start."
Click here for the best images from the Sportsground
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