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

Failed to start API Mock endpoint Error: Did not find a Lambda matching ARN #165

Closed codercatdev closed 3 years ago

codercatdev commented 3 years ago

Describe the bug When trying to mock the Graph API locally, when using the prebuilt videoObject token: String @function(name: "ccdvod-{env}-tokenGen") is used. resulting in an error while mocking.

type vodAsset
  @model(subscriptions: { level: public })
  @auth(
    rules: [
      {
        allow: groups
        groups: ["Admin"]
        operations: [create, update, delete, read]
      }
      { allow: private, operations: [read] }
    ]
  ) {
  id: ID!
  title: String!
  description: String!

  #DO NOT EDIT
  video: videoObject @connection
}

#DO NOT EDIT
type videoObject
  @model
  @auth(
    rules: [
      {
        allow: groups
        groups: ["Admin"]
        operations: [create, update, delete, read]
      }
      { allow: private, operations: [read] }
    ]
  ) {
  id: ID!

  token: String @function(name: "ccdvod-{env}-tokenGen")
}

To Reproduce Steps to reproduce the behavior:

  1. amplify video add
  2. at the end select graphl beta
  3. amplify mock

Expected behavior Either ignore this function or create one that works with mocking.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context For now I am just commenting out the video portion while mocking locally.

wizage commented 3 years ago

This is because we don't store the function as an "amplify function". This won't be fixed as the function wouldnt work without being pushed anyways.