こんにちは、id:cohalzです。2023年4月に実施したはてなブックマークのメンテナンスではCloudFrontを別のAWSアカウントに移行しました。 この記事ではCloudFrontを別のAWSアカウントに移行した背景とどのように移行したのかを説明します。 はてなブックマークのインフラのこれまで 移行したいモチベーションが出てきた理由 切り替えで設定が変わらないように気を付ける キャッシュポリシーに移行する 移行方法について検討する AWS CLIでCloudFrontを移行する手順を作成する アクセスログを配送する部分も移行する まとめ はてなブックマークのインフラのこれまで はてなブックマークのインフラはこのようにCloudFrontと関連リソースだけ別のAWSアカウントで利用していました。 移行前 この状況になっていた経緯をまず説明すると、はてなブックマークでは2018年からオ