Some config and environment:
So the other parts were relatively simple like always:
- Put site to maintenance mode, disabled clean-url, deleted cache, etc.
- Site file tar gz compressed
- Used mysqldump to get MySQL dump file and tar gz
- From the destination EC2 instance, ssh to the old instance to get the compressed file
- Copied everything from old bucket to the new bucket by using CloudBerry Explorer for Amazon S3 / S3 Browser
The CDN and sitemap issue
- need to hand code all the Amazon AWS details into the site settings.php
- need to hand code the base URL to settings.php
- need to run a complete CRON
- delete all caches including S3 cache, static cache, everything cached
- need to enable base url option in advgg -> under OBSCURE OPTIONS -> check "include the base_url variable in the hooks hash array"
- remove the old sitemap in xmlsitemap panel
- add a new sitemap file back in
- go to rebuild the sitemap links in the rebuid panel
- check the sitemap that is rebuit then use update cached files, click "update"
- the I have a perfect sitemap to submit to the Search Engines
Conclusion:
- The sitemap built is actually not located on the web server, it's a CDN distribution over S3 bucket via CloudFront - usually sitemap will located on the web server site root though
- So if you go to the web server site root to look for this sitemap file it'll not show there
- The Amazon details needed to be hand coded in the setting files, this may not be the best option but it's the only option that works at the moment
- CRON takes time also the CDN distribution has delay, the changes could not be seen immediately
- Drupal can't live without caching otherwise it's very slow, but caching will cause problem over development and/or troubleshooting as what you are looking at were all cached files and changes made could not take effect right away
Here is the reference:
https://keithyau.wordpress.com/2014/12/04/why-bootdev-cdn-configuration/