简体   繁体   English

AWS Aurora MySql2 从一个 Lambda function 连接到 AWS Step Functions 中的另一个

[英]AWS Aurora MySql2 connection from One Lambda function to another in AWS Step Functions

I have a AWS Aurora database and I'm using mysql2 in node.js to connect to it using rds proxy.我有一个 AWS Aurora 数据库,我在 node.js 中使用 mysql2 使用 rds 代理连接到它。 I have created a lambda function which does this connection.我创建了一个 lambda function 来执行此连接。 I'm using AWS Step Function, is there any way we can send this connection to the next lambda that gets called in the step function and run sql queries there. I'm using AWS Step Function, is there any way we can send this connection to the next lambda that gets called in the step function and run sql queries there. Or is this not the way we should do this?或者这不是我们应该这样做的方式吗?

I would not pass the database connection to an upcoming step.我不会将数据库连接传递给即将到来的步骤。 I would open the connection and query data from the same Lambda function (same step).我会从同一个 Lambda function 打开连接并查询数据(相同步骤)。 If you need data in an upcoming step, pass the result set in JSON.如果您在接下来的步骤中需要数据,请传递 JSON 中的结果集。

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

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