AWS CodeDeployで デプロイ設定を変えようとしたら、エラーが出た
he service role arn:aws:iam::XXXXXXX:role/xxxxx doesn't have permission to perform the following operation: autoscaling:DescribeLifecycleHooks
え、roleもポリシーも変えてないのになんで?
調べてみた
I have code-deploy set-up between by bit-bucket account and my Amazon AWS instance.
I am able to deploy to the test server everyday without issue.
But when i try to add the instance of our production server to the list of instances, i get the above error
Note: I have added this instance and successfully deployed the code in the past , i'm not sure why i get this error now.
Any directions/hints on how to solve this would be appreciated.
つまり、何も変えてないのにいきなりエラーになったよ。
同じ現象にあってる人に会うと嬉しい。
そして解決方法
- autoscalingの権限があるポリシーを作成しましょう
autoscaling:DescribeLifecycleHooksって書いてあるけど、autoscaling全権上げた方が早い。
- roleに作成したポリシーをアタッチ
今回はCodeDeployAutoscalingDescribeLifecycleHooks
という名前でroleを作成しました
再度、CodeDeployで設定を変えて保存したら、保存できるようになりますよ