Open aldy120 opened 1 year ago
AMI
先還原備份,應該會帶一個 80 G 的 EBS 新的 EC2 出來。 接下來在新的 EC2 新增一個 EBS ,80 G 的 EBS 複製進去,再把 80 G 的移除。mapping mount 那邊要接好。
要 restore EC2 結果遇到下列錯誤。明明用的是 AWS backup 的 managed role。
You are not authorized to perform this operation. Please consult the permissions associated with your AWS Backup role(s), and refer to the AWS Backup documentation for more details. Encoded authorization failure message: IkPXr_9MrbqP38-OsJp3O6ZF2LXsIQY0eEizL7MIB02iyrcOrFwStrWkXkmcVwTaJ02Yxk2yy3n9b3EyvkZUhqye5hOFu-07i4OWJtEyBYmmSUnOfTz5SWWO6sJl27sVxkmU7QW5x8bUoFQhyuES1S-E15C213JtMIF5u29I8cwddAI4YXw46GGERkRM8LRg_VY6NZrG2sNU3RoYr3KTT-b7RvJQ-JccI1BJa7Ns-IEs_Z1I3R7_ix_I8_6ppdKbe1piWxVg1fGM_BXz27leKycdjKLjLD2MxvMyB2UidKk9Fk1pwejjCSST7iLh3rvOx0CGd_JKTARyBGMe3n8Bp_yuBiRQPi00exppUyUqjcvoLHnR0APsbN1r4g71VtBLQmZKyeXdg3f-pThtNqHFZ8cJN0FqQOiDIgcTyx51Uvv83U0MRtxBD-vAomKGNOGDGdeq2aPx8IDYN-8xoIejrWt9K3ksJh8aLLHiwOuYS1iBBKL0rPaISRFhm6IkAggJkPZ_mSuU9If3YzY5m8g098N4nziAiEE
查了一下發現通常是缺少 iam:PassRole 權限。
解法是是在 restore 的時候把不要指定 EC2 instance profile role https://repost.aws/knowledge-center/aws-backup-encoded-authorization-failure
Create and attach a volume to backup EC2.
Attach /dev/sdf
之後還有兩件事要做
目前的 EBS 太貴了,似乎 over estimate 。理論上可以建立一個比較小的 EBS Volume 並且把東西複製一份過去,再把原本的 EBS Volume 換掉。
另一個方式是使用 EFS/FSx 換掉 EBS 。感覺省錢又隨時可方便的擴容。