简体   繁体   English

使用带有 python 或 java 代码的 AWS lambda 从 RestAPI 调用中获取 JSON 并插入到 oracle 数据库中

[英]Using AWS lambda with python or java code to get JSON from RestAPI call and insert into oracle DB

Can i use AWS lambda to call a RestAPI and iterate thru JSON, extract and load data into oracle DB on AWS RDS by passing the parameters to an oracle package?我可以使用 AWS lambda 调用 RestAPI 并通过 JSON 进行迭代,通过将参数传递给 oracle 包,将数据提取并加载到 AWS RDS 上的 oracle 数据库中吗? If yes can someone please let me know to secure credentials to call RestAPI and Oracle user?如果是的话,有人可以让我知道保护凭据以调用 RestAPI 和 Oracle 用户吗?

您应该使用AWS Secrets Manager ,这是来自 AWS 的一个很好的指南

As the other answer pointed out, you can use AWS Secrets Manager if you want to store secrets.正如另一个答案所指出的,如果您想存储机密,可以使用 AWS Secrets Manager。 But its most useful when you are working with AWS Managed RDS Oracle DB.但当您使用 AWS Managed RDS Oracle DB 时,它最有用。 Its not clear from your question whether this is the case.从您的问题中不清楚是否是这种情况。

If that is not the case, then AWS Systems Manager Parameter Store with SecretString type could be better, as it is free (AWS Secrets Manager is not free).如果情况并非如此,那么具有SecretString类型的AWS Systems Manager Parameter Store可能会更好,因为它是免费的(AWS Secrets Manager 不是免费的)。

AWS does not provide build-in SDKs in lambda for different databases. AWS 不为不同的数据库在 lambda 中提供内置开发工具包。 However, Orcale provides cx_Oracle which is module for Python.但是,Orcale 提供了cx_Oracle ,它是 Python 的模块。 To use that on lambda you would have to construct a custom development package or your own lambda layer to use cx_Oracle .要在 lambda 上使用它,您必须构建一个自定义开发包或您自己的lambda 层才能使用cx_Oracle

To sum up, I don't see a reason why you wouldn't be able to use lambda to work with your DB.总而言之,我不明白为什么您不能使用 lambda 来处理您的数据库。 However, this is something that will not work out-of-the box and requires some development.然而,这不是开箱即用的,需要一些开发。

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

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