Blasanka / aws_s3_plugin

This is a plugin created for file upload to AWS S3
Other
10 stars 13 forks source link

Giving Error of access denied from S3 while uploading a file #20

Open Tapasm1212 opened 3 years ago

Tapasm1212 commented 3 years ago

Hello Everyone!

While I am uploading a file in S3 using this SDK I am getting an error

Failed to upload: 2 due to Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: ZSQFA0CRMX0HS872)

I am updating the SDK sample project code in these lines

void readEnv() async { poolId = "us-east-2:6d3ba221-d123-4506-824a-659d18ba3b62"; awsFolderPath = "1069/fy202122/rejected"; bucketName = "billupload"; }

I have created a user pool on the user pool role I have added a new policy to access the S3 files.

Screenshot 2021-05-03 at 4 40 02 PM Screenshot 2021-05-03 at 4 40 15 PM

I am not able to get where was the problem in my app code or AWS setup if you guys have any idea then please help me out.

Thanks in Advance.