AWS S3 Access Denied

eggChopChop·2024년 2월 10일
1

S3에 이미지를 등록하고 보려면 Access Denied가 뜨는 이슈를 확인할 수 있다.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>68FPJCQ7YY149KNE</RequestId>
<HostId>O53FFF9oIGio14nCjE2ldDhYUGv186P+rRcLsBcgnJ+MHY3O5T1LKJCFSMrDhAXPzxjNJDBb5mU=</HostId>
</Error>

아래처럼 적용하면 Access Denied가 뜨는걸 사라지게 하고 내가 업로드한 이미지를 확인해 볼 수 있다.

1. S3 내가 만든 버킷에 접속해 Permissions 항목에 들어간다.

2. Permissions 항목에 들어가 아래로 스크롤하여 Edit 버튼을 누른다.

3. Edit 항목이 활성화 되는걸 확인할 수 있는데 위에서 봤던 'No policy to display. 플레이스 홀더에 아래의 항목을 채워준다.

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "Stmt1405592139000",
			"Effect": "Allow",
			"Principal": "*",
			"Action": "s3:*",
			"Resource": [
				"arn:aws:s3:::YOUR-BUCKET-ARN/*",
				"arn:aws:s3:::YOUR-BUCKET-ARN"
			]
		}
	]
}

4. 그리고 Save Changes를 누르게 되면 Access Denied가 사라지고 이미지가 어디서든 열리는 것을 확인할 수 있다.

profile
Hi, I'm an App Developer. I will archive the minor details.

0개의 댓글