如何为 lambda 无服务器创建子域?

How can I create sub domain for lambda serverless?

我正在尝试使用此脚本为 lambda 创建自定义域。我收到关于 aws 的错误。

 plugins:
  - serverless-domain-manager

 custom:
  customDomain:
    domainName: transcoder.iflix-dev.com
    basePath: ''
    stage: ${self:provider.stage}
    createRoute53Record: true 

After that run sls create sls create_domain -s development -v

Then deploy sls deploy -s development -v

要为 lambda 无服务器创建自定义域名,请遵循给定的 url https://serverless.com/blog/serverless-api-gateway-domain/

Error: 'transcoder.esfeasdesfcs.com.' was not created in API Gateway. BadRequestException: Trailing period should be omitted from domain name

如错误消息中所述,您的域名无效。

transcoder.esfeasdesfcs.com.

不是有效的域名。尝试使用

transcoder.esfeasdesfcs.com

没有尾随句点。