강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

best님의 프로필 이미지
best

작성한 질문수

이미지 관리 풀스택(feat. Node.js, React, MongoDB, AWS)

Presigned URL이 발급되고 받은 정보로 업로드 요청시 403 Forbidden이 뜹니다.

작성

·

714

0

S3 버킷에는 강의에 있는 것처럼 CORS  및 정책이 있는 사용자등도 모두 적용되었습니다.

Presigned URL까지는 정상적으로 발급되고 해당 URL로 Post를 통해 업로드시 아래와 같이 에러가 발생합니다. 

 

[1] CORS 

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "POST",
            "PUT"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]

 

 

[2] 버킷정책

{
    "Version": "2012-10-17",
    "Id": "Policy1643682083325",
    "Statement": [
        {
            "Sid": "Stmt1643681984914",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::image-upload-test/raw/*"
        }
    ]
}

[3] Error(Client Side)

POST https://s3.ap-northeast-2.amazonaws.com/image-upload-test  net::ERR_CONNECTION_ABORTED

POST https://s3.ap-northeast-2.amazonaws.com/image-upload-test  403(Forbidden)

 

혹시 어떤 부분이 잘못 되었을까요?

 

 

 

 

 

답변

답변을 기다리고 있는 질문이에요
첫번째 답변을 남겨보세요!
best님의 프로필 이미지
best

작성한 질문수

질문하기