amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.
MIT License
937 stars 234 forks source link

Update API gateway custom domain names #629

Open FreddieCarre opened 5 months ago

FreddieCarre commented 5 months ago

Community Note

Feature Request

Is your feature request related to a problem? Please describe. I need to update the certificate used by the API gateway created by serverless-domain-manager. As the old certificate references a domain we no longer own and so cannot auto-renew the cert over DNS.

Describe the solution you'd like If a custom domain already exists, use the updateDomainName sdk call to apply the config to the existing domain name. No change to the serverless template is necessary, although could add a flag so users can disable this behaviour if they're happy with the current implementation. May be better to do this as an 'opt-in' so that there is no change for your current users who do not need to update in place.

custom:
  customDomain:
    domainName: foo.example.tld
    certificateArn: arn:......
    skipUpdate: false

Describe alternatives you've considered Writing our own sls hook to create / update domain names on api gateway

Any Other Info If you can, maybe sketch out implementation details? If you've started a PR for this feature, link it here. Happy to raise PR as I made some changes to the local node_module code and managed to update our custom domain name successfully.

FreddieCarre commented 5 months ago

I have a branch with the initial changes, but do not have permissions to push to the repo 🤔 let me know if I can share