Access Denied error when trying to access url with Flutter application

0

I have a flutter project running in an AWS S3 bucket which I can access thanks to its domain https://web.buzoku.store, from said url the redirections work correctly. However, when I try to access a url from the browser, example: https://web.buzoku.store/entrepreneurship/tuyyo access denied occurs

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
</Error>

I have CORS configuration and in Policies Bucket the code that I leave below. So I was hoping it would work, but it doesn't.

CORS
"AllowedOrigins": [
"https://web.buzoku.store/*"
]

Policies Bucket:

{
   "Effect": "Allow",
   "Major": "*",
   "Action": [
       "s3:PutObject",
       "s3:PutObjectAcl",
       "s3:GetObject"
   ],
   "Resource": "arn:aws:s3:::{bucket_name}/*"
}

I'm additionally working with CloudFront, but I didn't see that I could do anything from there. Thanks for the help

Miguel
質問済み 1ヶ月前141ビュー
2回答
0

Hi

  • check that the file 'entrepreneurship/tuyyo' actually exists in your S3 bucket under the correct path. Typos in the URL can lead to this error.
  • Check your policy contains s3:GetObject
  • tuyyo is file should NOT be a FOLDER
  • If you've restricted your S3 bucket to only allow access through CloudFront, you'll need an OAI associated with your distribution, and your bucket policy must grant the OAI read permissions.
  • Temporary The direct URL would look something like https://your-bucket-name.s3.amazonaws.com/entrepreneurship/tuyyo. If this works, the issue is likely with CloudFront.

try those points and let me know if you still have issues

profile picture
エキスパート
GK
回答済み 1ヶ月前
  • Hello, well I'll tell you:

    1. The file or path entrepreneurship/tuyyo does not exist because it is a browser path of my Flutter application, with which I will later load using the rest API, I take the pathParam {tuyyo} to load the specific information of the page .
    2. The s3:GetObject policy is configured correctly
    3. Server encryption is Server-side encryption with Amazon S3 managed keys (SSE-S3)
    4. I have access to S3 as public

    I don't know what change there is

0

Hello, well I'll tell you:

The file or path entrepreneurship/tuyyo does not exist because it is a browser path of my Flutter application, with which I will later load using the rest API, I take the pathParam {tuyyo} to load the specific information of the page . The s3:GetObject policy is configured correctly Server encryption is Server-side encryption with Amazon S3 managed keys (SSE-S3) I have access to S3 as public

I don't know what change there is

Miguel
回答済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ