-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Gen 2] Support cross-region functions #431
Comments
Basically the idea is to have some of the functions on another regions because of latency. On my case we have to connect to apis on different countries, this countries have low bandwitch to US, so creating the function on for example SA give us better performance, even when the appsync is on the US. APP SYNC US -> LAMBDA US ->>> SA COUNTRY -->> LOW RESPONSE |
Any update on this? |
Any update on this @stocaaro |
Hello @JGamboa, This is an interesting feature request. Do you have a Gen 1 example app you can share that demonstrates the performance improvement you have diagrammed above? I'm not sure where supporting this behavior fits into our feature backlog and I'll check. Thanks, |
@stocaaro I modified the arn of the used function on the UI. I created the function on the other region manually, after i copied the arn, and in the appsync where you have the resolver i choose and put manually the arn of the function of the other region. I tested a lot of times with multiple request, using the lambda on us (original) response time was arround 4 seconds on lambda + the response to go back to the appsync, and when using it on the sa country, response time of lambda was arround 1.5 seconds + resposne back (this was really faster as you seeing) Nop i started using gen 2 of amplify so i dont have a gen1 example, i just tested manually changing the arns |
I think that maybe adding sometihng like "put your arn of lambda function here" could be easy, beacuse that way you dont need the lambd function that is in the other region to be part of the stack, and can be created manually. |
Describe the feature you'd like to request
similar to gen 1: https://docs.amplify.aws/gen1/react/build-a-backend/graphqlapi/custom-business-logic/#calling-functions-in-different-regions
reference a existing function in gen 2 can be done using
a.handler.function('<function-name>')
but cross region isnt supported
Describe the solution you'd like
a.handler.function('<function-name>', '<region>')
Describe alternatives you've considered
override backend.ts to addLambdaDataSource
Additional context
No response
Is this something that you'd be interested in working on?
Would this feature include a breaking change?
The text was updated successfully, but these errors were encountered: