在没有 serverless-domain-manager 的情况下将自定义域添加到 API 网关
我想使用无服务器框架向 API 网关添加自定义域,但不使用“serverless-domain-manager”或任何其他插件。我正在寻找一种更原生的方式,也许可以扩展“serverless.yml”中的资源
所有文章都建议使用该插件,但它对于多环境管道来说并不是最好的
https://www.serverless.com/blog/serverless-api-gateway-domain/
I want to add a custom domain to the API Gateway using serverless framework but without "serverless-domain-manager" or any other plugin. I am looking for a more native way, maybe extending a resource in "serverless.yml"
All articles suggest that plugin, but it isn't the best for multi environment pipelines
https://www.serverless.com/blog/serverless-api-gateway-domain/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
手动操作并没有那么复杂,这里有完整的解释
向所有环境添加自定义域
us-east-2
API网关
>自定义域名
>创建
,如果使用HTTP API,请使用Regional
端点类型API网关域名
,您需要指向< code>CNAME 记录到它API 映射
并创建映射,在我的例子中main
和prod
以及 stage <代码>$默认Doing it manually is not that complicated, here is the full explanation
Add a custom domain to all envs
us-east-2
API Gateway
>Custom domain names
>Create
, useRegional
endpoint type if using HTTP APIsAPI Gateway domain name
, you'll need to point aCNAME
record to itAPI mappings
and create the mappings, in my casemain
andprod
with stage$default
具有自定义域的 API Gateway 配置为使用 TLS 1.2,并且支持一些弱密码。这些弱密码已在 TLS 1.3 中删除,目前仅在 CloudFront 发行版中受支持。
AppScan 等一些安全工具在这些 API 的安全测试过程中向我提出了这些问题。
您可以在这里查看详细信息。
https://security.stackexchange.com/ questions/254667/are-weak-cipher-suites-for-tls1-2-a-valid-concern
如果担心安全性,我建议在前面使用云前端分发API网关。
https://aws.amazon.com/premiumsupport/knowledge -center/api-gateway-cloudfront-distribution/
API Gateway with a custom domain is configured to use TLS 1.2, and it supports some weak cipher. These weak ciphers are removed in TLS 1.3 which is only supported in CloudFront distributions at the moment.
Some security tools like AppScan raised these issues for me during the security testing of these APIs.
You can check the details here.
https://security.stackexchange.com/questions/254667/are-weak-cipher-suites-for-tls1-2-a-valid-concern
If security is concerned, I would suggest using a cloud front distribution in front of the API gateway.
https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-cloudfront-distribution/