awslabs / amplify-video

An open source Category Plugin for the AWS Amplify-CLI that makes it easy to deploy live and file based streaming video services and integrate them into your Amplify applications.
https://www.npmjs.com/package/amplify-category-video
Apache License 2.0
267 stars 56 forks source link

New VOD Cannot Create Permissions for Resources #159

Closed TheMarcusLee closed 3 years ago

TheMarcusLee commented 3 years ago

Describe the bug I'm having an issue with video failing to create all the resources. I spun up three brand new vanilla amplify environments this afternoon to test this, added video and I'm getting the following error during resource creation when I push. "Following resources failed Resource Name: ampli-S3Au-1KAXDE1OPX7CY (AWS::IAM::Policy) Event Type: create Reason: The role with name NONE cannot be found. (Service: AmazonIdentityManagement; Status Code: 404; Error Code: NoSuchEntity; Request ID: 5e4bb416-acd2-4dc0-b66d-f5a72261c12c; Proxy: null)"

The buckets, lambdas and media convert resources are setup, but the permissions fails every time.

Expected behavior All resources should be created in the cloud during push.

Desktop (please complete the following information):

vitalbone commented 3 years ago

I am also running into this issue. I have added all the IAM permissions from the example in the Wiki.

Here are the erroring logs from running amplify video push:

CREATE_FAILED   amplify-projectname-dev-112531-videoprojectnamevideo-10MLJ07TLHP2G AWS::CloudFormation::Stack Fri Dec 04 2020 14:23:23 GMT+1100 The following resource(s) failed to create: [rS3OutputBucket].

CREATE_FAILED   rS3OutputBucket   AWS::CloudFormation::Stack Fri Dec 04 2020 14:23:23 GMT+1100 Embedded stack arn:aws:cloudformation:ap-southeast-2:236326898456:stack/amplify-projectname-dev-112531-videoprojectnamevideo-10MLJ07TLHP2G-rS3OutputBucket-1N01YO0C3NU16/fc227d70-35df-11eb-9280-06d53458223e was not successfully created: The following resource(s) failed to create: [S3AuthGet].

CREATE_FAILED amplify-projectname-dev-112531-videoprojectnamevideo-10MLJ07TLHP2G-rS3OutputBucket-1N01YO0C3NU16 AWS::CloudFormation::Stack Fri Dec 04 2020 14:23:22 GMT+1100 The following resource(s) failed to create: [S3AuthGet].

CREATE_FAILED S3AuthGet  AWS::IAM::Policy    Fri Dec 04 2020 14:23:21 GMT+1100 The role with name NONE cannot be found. (Service: AmazonIdentityManagement; Status Code: 404; Error Code: NoSuchEntity; Request ID: 0eef6fe0-c8ff-4754-9b72-88ff0fbeac85; Proxy: null)

CREATE_FAILED    videoprojectnamevideo   AWS::CloudFormation::Stack Fri Dec 04 2020 14:23:32 GMT+1100  Embedded stack arn:aws:cloudformation:ap-southeast-2:236326898456:stack/amplify-projectname-dev-112531-videoprojectnamevideo-10MLJ07TLHP2G/f99f06e0-35df-11eb-8b08-063e10e23b5c was not successfully created: The following resource(s) failed to create: [rS3OutputBucket].

This is definitely a blocker to be able to add a video category to an amplify project.

Desktop

vitalbone commented 3 years ago

G'day @wizage — would you be able to provide any update on this? Also, thanks for building and maintaining this package.

wizage commented 3 years ago

Fix has been published to NPM :) @vitalbone

wizage commented 3 years ago

To fix this in your env you can run: amplify update video and then answer the questions the same way! Should be good to go afterwards!

vitalbone commented 3 years ago

Thanks for taking a look at this so promptly, @wizage!

I've followed your instructions and am unfortunately still running into problems. I've even tried removing the video category entirely from the app, installing the latest amplify-category-video and trying again from scratch. As you can see in the screenshot, this time it throws an error with even less detail than before 😅

Amplify video bug

I wish I could provide you with more info to help debug the issue! Also, let me know if I'm doing something wrong?!

Is this latest version of amplify-category-video potentially incompatible with the latest version of @aws-amplify/cli (v4.38.0)?

wizage commented 3 years ago

@vitalbone hey! This is a separate bug unrelated to the bug fixed in this ticket. I would check to make sure that your cloudformation stack is in a healthy state and that your permissions havent changed on your account you are using.

vitalbone commented 3 years ago

Righto, will look into it @wizage. Thanks again for all your help.