I’m using the awesome Sitemap Generator gem for Rails and also hosting my app on Heroku. Since I’m updating my sitemap daily, and Heroku forces me to write to somewhere else, I need to create the sitemap nightly on Amazon Web Services (S3), instead.
The problem I ran into is that when I went to Google Webmaster Tools, it only allowed me to specify a url for the sitemap beginning with the name of my domain. However, since the sitemap is hosted on AWS, it has an address that starts with an Amazon URL.
I found an answer here.
Basically what you need to do is to add a second property in Google Webmaster Tools for your S3 bucket. I added a property to my directory with the sitemap (i.e. http://s3.amazonaws.com/mybucket/sitemaps/) and then verified that I owned the property by placing the Google supplied HTML file in the sitemaps folder on S3.
The last step is adding the URL to the sitemap in settings for the new [S3] property that was added to Google Webmaster Tools.