amplify-video icon indicating copy to clipboard operation
amplify-video copied to clipboard

Amplify Continuous Deployment recreating input/output buckets

Open source-punk opened this issue 4 years ago • 7 comments

Describe the bug Amplify Continuous Deployment is recreating input/output video buckets (even though it already created them once 'env specific'). And when it recreates these buckets, it isn't able to attach the event listeners to lambda watchers correctly (none are attached)

To Reproduce You'll need to modify the yml build settings to include amplify-video to be built. I am also not sure if the way I went about modifying the script is correct. But here is my build script currently:

version: 0.1
backend:
 phases:
   preBuild:
     commands:
       - npm install -g amplify-category-video
   build:
     commands:
       - amplify plugin scan
       - '# Execute Amplify CLI with the helper script'
       - amplifyPush
frontend:
 phases:
   preBuild:
     commands:
       - npm ci
   build:
     commands:
       - npm run build
 artifacts:
   baseDirectory: dist
   files:
     - '**/*'
 cache:
   paths:
     - node_modules/**/*

Also, I had to remove --simple from amplifyPush. Though I am not sure if this is the correct way of doing this.

Attached herein is the backend build phase log from Amplify Continuous Deployment: log.txt

Expected behavior Amplify continuous deployment should not re-create the input/output buckets.

Amplify Continuous Deployment Build Settings:

  • Amplify Build Setting version = 4.22
  • Amplify Video version = 3.10

Additional context Also, our 'develop' env had this bug once but has not recreated input/output buckets since.

source-punk avatar Aug 19 '20 10:08 source-punk

I am unable to reproduce anyone of these. I have tested every thing in multiple accounts and nothing is able to reproduce this issue. a) w/ --simple I am still able to get everything working b) w/o --simple push my s3 buckets aren't renamed c ) double check you are pushing this file in your git commits: amplify/team-provider-info.json

wizage avatar Aug 20 '20 21:08 wizage

I am having this same problem. I receive a duplicate bucket whenever the a new bucketname and cloudfront URL are generated during CI pipeline build.

spencekim avatar Sep 29 '20 18:09 spencekim

Additionally, the newly created duplicate input bucket does not launch MediaConvert operations...

spencekim avatar Sep 29 '20 19:09 spencekim

Hey @spencekim this is interesting...

Can you post what amplify video version and amplify version you are running:

amplify -v
amplify video -v

Secondly, did this project exist and then did you upgrade to a newer amplify video version and then saw these bugs?

Can you try to create a new environment and try to reproduce it?

wizage avatar Sep 29 '20 20:09 wizage

I ran into a similar issue while updating the conversion settings. When I ran the push after updating, It created new input and output buckets(rather than using the current buckets) that no longer trigger the inputWatcher to launch the MediaConvert operation. I was running amplify v 4.31.1 and amplify video v 3.1.0. I've upgraded both to the latest. I already have media in the original buckets. Is there a simple path for getting everything hooked back up to the original buckets with the new MediaConvert settings?

TheMarcusLee avatar Nov 01 '20 07:11 TheMarcusLee

I had this issue too, the problem with the media convert can be solved by re adding the bucket events in your bucket properties to point to your lambda that starts the transcoding. Im not exactly sure what fixed the bucket overwriting, but I eventually got past it perhaps if you come across this issue, make sure you have the latest version of amplify installed on your computer, amplify pull, and try to amplify video update, followed by amplify video push. Screen Shot 2021-01-27 at 8 54 28 pm

The redeployment of the environment should for sure be at least conditional if the resource already exsists, and then go on to check if the configuration is also correct, including the bucket triggers, and a lot of other things that seem to be missing that I am discovering as I go. cloudfront is my latest casualty.

THOM-AwS avatar Jan 27 '21 09:01 THOM-AwS

I am also having this issue. Initially opened a new issue before I realised this one was already here

tscole avatar Apr 01 '21 13:04 tscole