It depends. On AWS you can get "metal" instances where afaik you get pretty much unrestricted access. In addition on certain instance types/sizes you get access to virtualized counters (vPMU). See Q11 here
https://github.com/intel/pcm/blob/master/doc/FAQ.md#q11 or tables here
https://www.intel.com/content/www/us/en/developer/articles/t...dunno about others