-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appsync: Add support for custom domains #18040
Labels
@aws-cdk/aws-appsync
Related to AWS AppSync
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p1
Comments
alextriaca
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 15, 2021
otaviomacedo
added
effort/small
Small work item – less than a day of effort
p2
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 15, 2021
+1 |
Currently doing it this way via CDK (v2) - Typescript // create appsync domain
const appsyncDomain = new CfnDomainName(this, 'AppsyncDomainName', {
certificateArn: 'your arn',
domainName: 'api.example.com',
description: 'Domain name for AppSync Api',
})
// associate domain
new CfnDomainNameApiAssociation(this, 'AppsyncDomainNameApiAssociation', {
apiId: this.api.attrApiId,
domainName: appsyncDomain.attrDomainName,
});
const hostedZoneId = 'ZONE ID HERE'
const zoneName = 'example.com'
// hosten zone for adding appsync domain
const zone = HostedZone.fromHostedZoneAttributes(this, `HostedZone`, {
hostedZoneId,
zoneName,
});
// create a cname to the appsync domain. will map to something like xxxx.cloudfront.net
new CnameRecord(this, `CnameApiRecord`, {
recordName: 'api',
zone,
domainName: appsyncDomain.attrAppSyncDomainName
});
|
+1 |
mergify bot
pushed a commit
that referenced
this issue
Mar 18, 2022
fixes #18040 This adds support for custom domains with AppSync.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-appsync
Related to AWS AppSync
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p1
Description
Appsync has recently added support for custom domains. The cloudformation for this can be found here (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-domainname.html)
Use Case
Currently Appsync assigns a random URL when creating the API. If for some reason the API is ever deleted this URL is lost and a new and random URL is assigned. This means that you always have to consider updating those components that are dependent on the API as you cannot rely on the URL remaining the same. This change will remove that dependancy and allow users to create a custom URL that doesn't change even if the underlying API is rebuilt.
Proposed Solution
API Gateway already supports this and so a similar implementation would seem sensible. Something like:
Other information
No response
Acknowledge
The text was updated successfully, but these errors were encountered: