-
Notifications
You must be signed in to change notification settings - Fork 56
Getting 403 Forbidden when trying to upload video to the input s3 bucket as an authenticated user #316
Comments
Hi @pedramp20, does your user is part of Cognito's Admin group ? |
@nathanagez No it is not. As I explain, I chose the option where any authenticated user can upload videos.
Based on my understanding and as the name suggests any authenticated user should be able to upload video? Am I correct @nathanagez ? |
@pedramp20 Have you got any other auth roles that the users are assuming? If you've enabled Cognito user groups with the amplify cli, you may be assuming a group auth role instead... You can always create signed urls with a lambda function for uploading with your own business logic granting users a signed URL. |
@pedramp20 If I'm not wrong amplify-video only supports admin upload FTM, is it right @wizage ? |
@kylekrkby Yes, there are other groups. I am investigating to make sure what role(s) are assumed while calling the s3 api. I know that I can generate the signed url with a lambda function and don't think it is causing this failure? @nathanagez If this is the case, the option is very misleading. |
Yes I agree with you, when your user is part of Admin group it will create a policy that you can find here:
|
Thank you all for your help. As a solution, I am trying to pass the userpoolId to the template to add the policy to those roles and based on your documentation and this discussion, all the files with the same name in the build folder are overwritten with the items in the custom folder but it is not what I am experiencing. Basically I have added the parameter to the paramters.json, props.jason, the main vod template and s3input template but on push they are not copied to the build folder and as a result I get an error stating "Parameters: [UserPoolId] do not exist in the template parameters.json
props.json
\custom\xxxx-vod-workflow-template.yaml
\custom\vod-helpers\S3InputBucket.template
|
Describe the bug
I followed the instruction to setup VOD and configured it to allow authenticated users to be able to upload to the input s3 bucket. When I check the AuthRole it has the policy allowing PutObject to the input bucket. however, I get forbidden 403 error when trying to upload a video file to the bucket. I am using the code provided here. Has anybody else faced the same issue? Is it a limitation of amplify to support multiple buckets?
The text was updated successfully, but these errors were encountered: