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

Error while deploying multiple VoD projects within the same environment #208

Open nathanagez opened 3 years ago

nathanagez commented 3 years ago

Describe the bug When we try to deploy multiple VoD projects within the same environment with signed urls, CloudFormation returns an error concerning the public key:

Following resources failed

Resource Name: rCloudFrontPublicKeyXXXXXX (AWS::CloudFront::PublicKey)
Event Type: create
Reason: Resource of type 'AWS::CloudFront::PublicKey' with identifier 'projectName-env-publickey-XXXXXX' already exists.

To Reproduce Steps to reproduce the behavior:

Firstly, create a basic VoD project with signed urls and without a GraphQL API for the CMS. Then do an amplify push, it should deploy everything correctly.

After doing that, add a new VoD project to the same environment with the same settings (signed urls and no GraphQL API for the CMS). Then do an amplify push, the error should happen during the deployment.

Expected behavior The new project should be deployed inside the Cloud and the buckets should not be created if it fails.

Screenshots Screenshot 2021-02-22 at 16 42 04 Screenshot 2021-02-22 at 16 43 43

If you do a new amplify push just after the fail:

Screenshot 2021-02-22 at 16 54 02

Desktop (please complete the following information):

sak360 commented 3 years ago

I am seeing the same error when trying to create a second environment (and not adding two VoDs to the same environment)

o-gi commented 3 years ago

Same here.My use case is that I need a bucket that requires a login protected by a signed URL to play VOD (protected) and a bucket that can be played without a login (public). I don't know how to do this.

djsjr commented 3 years ago

Any update here? Same issue. Trying to create a separate bucket for audio only.

djsjr commented 2 years ago

@wizage Anything on this? I still cannot create two separate buckets successfully. Regarding the first error message I receive (same as OP), why would pushing a new video resource result in attempting to create a 'CloudFront::PublicKey' with the same identifier as the first video resource?

Would be great to see a solution for this