wangsha / serverless-aws-function-url-custom-domain

serverless plugin to setup custom domain for lambdas deployed with function url.
MIT License
15 stars 3 forks source link

explanation on serverless.com #10

Open tanosugi opened 8 months ago

tanosugi commented 8 months ago

I found the following serverless.com web page. but a route53 record was not made.

https://www.serverless.com/plugins/serverless-aws-function-url-custom-domain

# add in your serverless.yml

plugins:
  - serverless-aws-function-url-custom-domain

custom:
  urlDomain:
    apiDomain: ${env:SUBDOMAIN}.yourdomain.com  # change by your custom domain
    hostedZoneName: yourdomain.com.  # your domain Route 53 hosted zone name
    certificateArn: 'arn:aws:acm:us-east-1:xxxxx:certificate/xxxxx' # need to be located at NVirgina 

functions:
  api:
    handler: wsgi_handler.handler
    url: true # activate function URL!

I could successfully make a lambda function with url, CloudFront, and route53 record.

plugins:
  - serverless-aws-function-url-custom-domain
custom:
  urlDomain:
    domains:
      - xxx.abc.com
    hostedZoneName: abc.com.
    certificateArn: "arn:aws:acm:us-east-1:XXX:certificate/XXX"
    route53: true

So I would suggest you change the explanation on serverless.com to a later one.

wangsha commented 6 months ago

Thanks for the suggestion. If I recall correctly, when this repo https://github.com/serverless/plugins gets updated, it will automatically fetches latest README with the fixes.