2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

S3の静的ホスティングで403 forbidden

2
Posted at

はじめに

S3で静的サイトを公開したら403が返り、アクセスできませんでした。

問題

403 forbidden

解決方法

バケットポリシーを追加する

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Statement1",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "S3:GetObject",
            "Resource": "arn:aws:s3:::website-demo/*"
        }
    ]
}

おわりに

パブリックアクセスブロックはオフにしていたのですが、バケットポリシーを設定していませんでした。

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?