Let's say I have a website www.example.com. Is it okay to host the sitemap.xml outside www.example.com such as https://example.cloudstorage.com/static/sitemap.xml? All the entries in the sitemap will have absolute URLs such as https://www.example.com/path/to/page.
The reason is that I will have an automated process to update my website's sitemap.xml but the process cannot cannot access files within www.example.com directly.
Will a search engine like Google or Bing allow for sitemap.xml to be hosted outside the website being indexed?
If yes, is there a SEO penalty for doing this?