AWS Lambda 问题 [英] AWS Lambda questions

查看:30
本文介绍了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天全站免登陆