awslabs / aws-streaming-media-analytics

AWS Streaming Media Analytics is a serverless end-to-end solution for analyzing the video streaming experience
MIT No Attribution
39 stars 17 forks source link

unable to deploy cloudformation template (deployment.yaml) #19

Open ariskumara opened 3 years ago

ariskumara commented 3 years ago

Hi, i have issues in deploying the cloudformation template. I follow your guide to deploy deployment.yaml but found errors. Seems like it failed to create Schema (line 970-975) and the error message was the S3 Bucket not found. Can you help to advise how can i solve this issue?

Screen Shot 2020-11-16 at 9 54 39 PM Screen Shot 2020-11-16 at 9 55 06 PM

alcousins commented 3 years ago

thanks for reporting this. Did you build the template yourself (ie not using one of the pre-built ones?)?

The Schema resource in the CloudFormation template pulls the AppSync Schema from S3:

Schema: Type: AWS::AppSync::GraphQLSchema DependsOn: GraphQLApi Properties: ApiId: !GetAtt GraphQLApi.ApiId DefinitionS3Location: !Join ["",["s3://",!Join ["/", [!Join ["-", [!FindInMap ["SourceCodeBucket", "General", "S3Bucket"], !Ref "AWS::Region"]],!Join ["/", [!FindInMap ["SourceCodeBucket", "General", "RecentVideoViewAppSyncCodePrefix"], !FindInMap ["SourceCodeBucket", "General", "Version"], "appsync_schema.graphql"]]]]]]

The S3 Bucket in question is defined in the Makefile in the 'bucket' variable, and the template is copied as part of the 'make copycodeww' operation:

https://github.com/awslabs/aws-streaming-media-analytics/blob/33b0b50a9f4dff9cf41368941be72b5a2281e9c2/Makefile.sample#L85

My first guess is you may not have completed this step in building the code? Apologies if there was any confusion, we've made some effort to clean up any stray artefacts in the repo that might trip up in this way, but if you've found something, please let me know how you deployed the code and i'll take steps to make this clearer/remove something that might have led you astray!

virkillz commented 3 years ago

Hi, it seems like I also cannot follow the instruction and resulting in the same error as follow:

Screen Shot 2020-12-13 at 17 15 20

I'm following the instruction in README.md

Screen Shot 2020-12-13 at 17 18 30

I download the deployment.yaml file: https://github.com/awslabs/aws-streaming-media-analytics/blob/master/cloudformation/deployment.yaml

Thanks.

alcousins commented 3 years ago

Ah, I think i know what's going on here. I will try to push an update. Thanks for identifying this (obvious) gap. Documentation for this project has drifted through a few different sources.

In the meantime, you can deploy the template from the following sources which have been built/tested:

https://streamingvideoanalytics.workshop.aws/intro/deploying-in-own-account.html

I'll merge in some updated references to the docs and do a cleanup.

My apologies, this is a bit of an obvious one. Will get this fixed ASAP.

alcousins commented 3 years ago

i'm working on a fix for the documentation in #20

alcousins commented 3 years ago

I have merged #20 which cleans up the documentation. The old docs referenced using the deployment.yaml file that is in the repository as your starting point, however, this file is as you've noticed, a build artifact and locked down to a specific account.

I've removed the build artifacts from the repo, blocked on gitignore, and updated the docs to reference the latest workshop documentation which includes links to pre-built templates that are hosted in public S3 buckets so can be deployed without needing to build the project yourself.

alcousins commented 3 years ago

I noticed in the first attached screenshot @ariskumara was deploying in Singapore. I've just run a quick test deploy of the template for this region in the README.md and can confirm it deployed successfully.

I'll leave this open for a few days, please let me know if you're still having trouble (or success!). If I don't hear back i'll close it as I think these documentation problems were the likely cause of the two problems noted above.

virkonomy commented 3 years ago

Thanks. We try to launch by clicking the Launch Stack link (Singapore). I mostly worked as described (mediaqos name is pre-filled, etc).

However I got different type of failure.

Screen Shot 2020-12-21 at 07 26 19

Based on the error, do you think the Account verification is the root cause? I already open ticket to support as suggested. Once its resolved I will try again. Thanks again.

alcousins commented 3 years ago

my apologies, i missed this response, but yes, that error is caused by a new account. Following the guidance in the error should help to resolve that error.