aws-amplify / amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
https://docs.amplify.aws/
Apache License 2.0
90 stars 77 forks source link

Support cross-account lambda resolvers using @function directive. #499

Open cliren opened 2 years ago

cliren commented 2 years ago

Is this feature request related to a new or existing Amplify category?

No response

Is this related to another service?

Lambda

Describe the feature you'd like to request

AppSync supports to call other account lambdas on resolver invocation. Please add this support to @function directive.

Describe the solution you'd like

String @function(name: "echofunction-${env}", accountId: "<other-aws-account-id>")

Describe alternatives you've considered

None using Amplify, found customizing resolvers but its not straight forward and extensible. Prefer declarative approach since we are already using @function directive.

Additional context

We use cellular architecture and each cell can contain multiple accounts. AppSync in account1 should be able to call lambda in another account.

Is this something that you'd be interested in working on?

Would this feature include a breaking change?

philipmw commented 2 years ago

I am working on implementing this.