LoginSignup
1
1

More than 5 years have passed since last update.

Elastic Beanstalkのデプロイで権限エラー

Posted at

デプロイしたらエラーがでた。

One or more objects in the Elastic Beanstalk bucket could not be deleted. Verify that your S3 policies allow you to perform 's3:DeleteObject'.

Elastic Beanstalkが作ったS3バケットは削除できないようポリシーがデフォルトで設定されている。何のにこいつは削除をするから権限よこせといいやがる。zip形式でデプロイしてるせいかもしれないけれど、しょうがないので許可設定をする。

S3にelasticbeanstalk-ap-northeast-1-xxxxxxxxxxxxみたいなバケット名が作られているので、Properties選択後、Permissions、Edit bucket policyから下記の部分を探す。

{
            "Sid": "hogehoge",
            "Effect": "Deny",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:DeleteBucket",
            "Resource": "arn:aws:s3:::elasticbeanstalk-ap-northeast-1-xxxxxxxxxxxx"
        }

Allowに書き換え

"Effect": "Allow",

これで、Elastic Beanstalkの画面でデプロイ済みのバージョンに切り替えできました。…ポリシー編集しなくても切り替えだけでできたんじゃないかと思ったりなんたり。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1