Google wouldn't have a problem with it if you tag your links accordingly.
At the very least, they should be no-follow links.
Also, you might want to consider the sponsored link tag if that applies in your situation.
But generally speaking, a no-follow tag should be enough.
Quick Tip: Don't make the same mistake that a lot of people who promote Amazon products through their affiliate program, which is to use a no-referrer link. That’s a no-no.
While Amazon can still tell that your website is making sales and sending referrals, it has a tight rule regarding all traffic having a clear referral source.
And if you put a no-referrer tag on your links, this going to cause Amazon to close your account or suspend it.
This happened to me before, and I can tell you it's no fun.
So be careful on how you tag your links.