简体   繁体   English

使用步骤函数跨区域调用 AWS Lambda

[英]Invoke AWS Lambda across regions using step functions

ers,呃,

I have a Step Function pipeline which links several Lambda's.我有一个链接多个 Lambda 的 Step Function 管道。 The Step Function is started using a AWS API Gateway. Step Function 是使用 AWS API Gateway 启动的。 All aforementioned items are in the same region.上述所有项目都在同一地区。 However, based on the clients IP origin, I would like to use one lambda of the step function in a different region.但是,根据客户端 IP 来源,我想在不同区域使用 step 函数的一个 lambda。 I did some research but it seems there is no way of invoking a lambda in a different region as compared to the step function region.我做了一些研究,但与阶跃函数区域相比,似乎无法在不同区域调用 lambda。

So basically this would mean that I would have to make different API Gateway entrypoints and different Step Function pipelines, different Lambdas for every region I would like to employ to right?所以基本上这意味着我必须为我想要使用的每个区域创建不同的 API 网关入口点和不同的 Step Function 管道,不同的 Lambda,对吗? Are there some consequences for the S3 storage I use?对我使用的 S3 存储有什么影响吗?

If Step Functions don't support cross-region Lambda's (and it appears they don't) my idea would be to use a 'proxy-lambda' in the same region as the Step Function and within the proxy-lambda invoke the cross-region lambda.如果 Step Functions 不支持跨区域 Lambda(而且似乎不支持),我的想法是在与 Step Function 相同的区域中使用“proxy-lambda”,并在 proxy-lambda 内调用跨区域区域λ。 It's not ideal, you will have to handle pass-through and you will pay twice for the duration of the lambda (1x proxy 1x actual lambda) but it seems a lot easier than having all the elements in all regions.这并不理想,您将不得不处理传递,并且您将在 lambda 的持续时间内支付两次费用(1x 代理 1x 实际 lambda),但这似乎比拥有所有区域的所有元素要容易得多。

I know I'm too late to this, but proposing my idea anyway.我知道我现在已经太晚了,但无论如何还是提出我的想法。 Maybe use SQS?也许使用SQS? Put an event into an SQS in the other region and add a lambda trigger.将事件放入其他区域的 SQS 中并添加 lambda 触发器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM