EC2 instance 搬遷 region
AWS 台北 region 開了之後,看 EC2 稍微便宜一點點,就想說搬到台北說不定速度也會快一點。沒想到台北用下來 t4g.small 不像東京還有到 2025 年年底的 free tier,只好又搬回去,就這樣搬來又搬去~
假設要從 ap-northeast-1 搬到 ap-east-2,以下是 EC2 instance 搬 region 的操作方式:
- stop instance
- 由 EC2 instance 產生 AMI
- 從 ap-northeast-1 複製 AMI 到 ap-east-2 region
- 在 ap-east-2 region 用剛複製的 AMI launch EC2 instance
- 搬遷完成確認服務正常後刪除 ap-noetheast-1 region 的 EC2 instance、AMI 跟建立 AMI 時產生的 snapshot