What's the problem with that? If I didn't want others to use my code or make money with it, I wouldn't have gone open source in the first place.
I'd rather use an AWS service with an open source core than a closed-source service. Migrating away from AWS in the former case is arguably easier than in the latter.
And this is because of the open principle.