Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

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

Open
nathanagez opened this issue Feb 14, 2022 · 2 comments

Comments

@nathanagez
Copy link
Collaborator

nathanagez commented Feb 14, 2022

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

@wizage
Copy link
Contributor

wizage commented Feb 16, 2022

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.

@nathanagez
Copy link
Collaborator Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants