AWS Lambda问题 [英] AWS Lambda questions
问题描述
我使用AWS Lambda作为后端-但是我不知道如何与Amazon RDS上的SQL数据库进行交互.
I am using AWS Lambda as a backend - however I cannot figure out how to interact with my SQL database on Amazon RDS.
我只是想能够在Lambda中编写API函数来访问和检索数据库中的信息.
I would simply like to be able to write API function inLambda to access and retrieve information from the database.
要在python中执行此操作,我通常会使用"MySQLdb"模块-但是Lambda没有此功能.
To do this in python i would normally use the 'MySQLdb' module - however Lambda does not have this.
有什么建议吗?
推荐答案
如果您想使用外部库,则需要创建一个包含它们的部署包,然后通过AWS控制台或S3上载它.
If you you want to use external libraries, you need to create a deployment package that contains them and upload it via AWS console or S3.
更多信息在这里: http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
这篇关于AWS Lambda问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!