AWS Lambda问题 [英] AWS Lambda questions

查看:77
本文介绍了AWS Lambda问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆