[英]"Productionising" Lambda and API Gateway
I have recently been teaching myself how to build APIs using NodeJS + Express.我最近一直在自学如何使用 NodeJS + Express 构建 API。 I am still very much a novice but was really excited when they worked brilliantly in my dev environment.
我仍然是一个新手,但当他们在我的开发环境中出色地工作时,我真的很兴奋。 However, I struggled to know what and how to configure my server and codebase for production.
但是,我很难知道如何以及如何配置我的服务器和代码库以进行生产。 There is lots of info out there to use things like Helmet and put NGINX in front as a proxy but some of those things are beyond me at this stage.
有很多信息可以使用 Helmet 之类的东西,并将 NGINX 作为代理放在前面,但在现阶段,其中一些东西超出了我的范围。
So I started to look at 'serverless' as a possible option for deploying them and have migrated my data to an AWS RDS PostgreSQL and setup a Lambda function that takes a query parameter and queries the database.因此,我开始将“无服务器”视为部署它们的可能选项,并将我的数据迁移到 AWS RDS PostgreSQL 并设置了一个 Lambda 函数,该函数接受一个查询参数并查询数据库。 I have also managed to configure AWS API Gateway that expects an API key to trigger the Lambda function.
我还设法配置了需要 API 密钥来触发 Lambda 函数的 AWS API 网关。
My RDS and Lambda functions are restriction to a VPC, I am using an API Key and API Gateway defaults to HTTPS.我的 RDS 和 Lambda 函数仅限于 VPC,我使用的是 API 密钥,API 网关默认为 HTTPS。
So I was after any advice or help on what other things I now need to consider as most of the traditional production challenges have been removed by using "serverless".因此,由于使用“无服务器”已经消除了大多数传统生产挑战,因此我就我现在需要考虑的其他事项寻求任何建议或帮助。
Here are some other things to think about:这里有一些其他的事情需要考虑:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.