A custom domain name and an API mapping can be created using CDK, however, the amplify_outputs.json always contains the original generated version of the GraphQL endpoint even if a custom domain is attached.
This is not ideal to use this URL, especially for mobile applications since it can happen that the stack needs to be recreated for some reason, and the previously generated endpoint will be no longer available.
I tried to override the value by backend.addOutput({ data: { url: 'my-custom-url' } }), but this is not supported in this way.
Is there any other way to somehow automate this step?
Thanks
Hey @otottkovacstibor :wave: thanks for raising this! I think this is a great idea to introduce first-class support for custom domains in Amplify resources. Marking as a feature request
Environment information
Description
A custom domain name and an API mapping can be created using CDK, however, the
amplify_outputs.json
always contains the original generated version of the GraphQL endpoint even if a custom domain is attached. This is not ideal to use this URL, especially for mobile applications since it can happen that the stack needs to be recreated for some reason, and the previously generated endpoint will be no longer available.I tried to override the value by
backend.addOutput({ data: { url: 'my-custom-url' } })
, but this is not supported in this way.Is there any other way to somehow automate this step? Thanks