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

Template error: instance of Fn::GetAtt references undefined resource videoResource

Open nathanagez opened this issue 3 years ago • 2 comments

When I try to deploy an amplify project directly from a repository on the console, the build fails with this error: error occurred during the push operation: Template error: instance of Fn::GetAtt references undefined resource videotrackit

The repository contains the amplify directory and what is weird is that it’s working correctly if we clone the repository, deploy it manually and locally using the CLI. So, I tested to edit the amplify.yml by adding a custom shell script that reproduce the commands I’m sending locally but we keep having this error.

Screenshot 2021-09-28 at 11 53 57

Please, also note that:

  • The IAM role have full access (admin access)
  • amplify video is installed remotely

Here is a reproduction repository: https://github.com/nathanagez/amp-video-issue-repro

nathanagez avatar Feb 14 '22 18:02 nathanagez

So it looks like it fails before it even gets to pushing. The real error here is pushing resources to the cloud. Curious what is going on with the pushing that is causing the failure.

context.print.error(`Failed pushing to S3 with error: ${error}`);

Is how we push our content and show errors so it seems like an error with the CLI itself. I can try to reproduce but it looks like not an amplify video issue.

https://github.com/aws-amplify/amplify-cli/blob/ea2bceec74003ae04462e5d3b2293e6547569ec5/packages/amplify-provider-awscloudformation/src/push-resources.ts#L433

Here is where it fails.

Can you check your s3 bucket it uploads everything to? Make sure that it has everything.

wizage avatar Feb 16 '22 18:02 wizage

Hi @wizage, after investigation, indeed, some files are not downloaded in the S3 bucket.

But I noticed that this problem only occurs if you reference the CF outputs of the amplify-video stack. If you do not use these outputs in another amplify stack, you do not encounter this problem.

I also opened an issue with AWS support but I don't think that having amplify-video's CF outputs referenced within other amplify stacks trigger the upload issue.

nathanagez avatar Apr 19 '22 22:04 nathanagez