Created
March 25, 2020 01:26
-
-
Save zoonderkins/1dc6b7038196b1f55f0af669d25e5392 to your computer and use it in GitHub Desktop.
CDK-Route53-example.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
// const zone = route53.HostedZone.fromLookup(this, 'Zone', { | |
// domainName: api.url | |
// }) | |
// const stagingZone = new route53.PublicHostedZone(this, `${environment.ENV}-HostedZone`, { | |
// zoneName: `${environment.ENV}-api.sygna.io` | |
// }) | |
// const customDomain = apigateway.DomainName.fromDomainNameAttributes(this, 'CustomDomain', { | |
// domainName: environment.apiDomainName, | |
// domainNameAliasTarget: environment.domainNameAliasTarget, | |
// domainNameAliasHostedZoneId: environment.domainNameAliasHostedZoneId, | |
// //certificate: certificate.Certificate.fromCertificateArn(this, `${environment.ENV}-cert`, `${environment.certArn}`) | |
// }) | |
// new route53.ARecord(this, 'siteRecord', { | |
// recordName: , | |
// target: route53.AddressRecordTarget.fromValues(api.url), | |
// zone:stagingZone | |
// }) | |
// const zone = new route53.PublicHostedZone(this, `${environment.ENV}-Zone`, { | |
// zoneName: environment.apiDomainName | |
// }) | |
// new route53.ARecord(this,`${environment.ENV}-record`, { | |
// zone:zone, | |
// recordName: environment.apiDomainName, | |
// target: route53.AddressRecordTarget.fromAlias({ | |
// bind: (): route53.AliasRecordTargetConfig => ({ | |
// dnsName: api.url, | |
// hostedZoneId: "Z2FDTNDATAQYW2" | |
// }) | |
// }) | |
// }) | |
// const hostedZone = route53.HostedZone.fromHostedZoneAttributes(this, `${environment.ENV}-HostedZone`, { | |
// zoneName: environment.apiDomainName, | |
// hostedZoneId: environment.hostedZoneId | |
// }) | |
// const hostedZone = route53.HostedZone.fromLookup(this, 'asb', { | |
// domainName: environment.domainName | |
// }) | |
// new route53.RecordSet(this, `${environment.ENV}-ApiRecordSet`, { | |
// zone, | |
// recordType: RecordType.CNAME, | |
// recordName: environment.apiDomainName, | |
// target: route53.RecordTarget.fromValues(api.url) | |
// }) | |
// new route53.CnameRecord(this, `${environment.ENV}-record`, { | |
// zone: zone, | |
// domainName: api.url, | |
// recordName: environment.apiDomainName | |
// }) | |
// const deployment = new apigateway.Deployment(this, 'apiGatewayDeployment', { | |
// api: api | |
// }) | |
// new apigateway.Stage(this, 'apiGatewayStage', { | |
// deployment, | |
// metricsEnabled: true, | |
// dataTraceEnabled: true, | |
// stageName: `apigw-${environment.ENV}`, | |
// loggingLevel: apigateway.MethodLoggingLevel.INFO, | |
// throttlingRateLimit: 10000, | |
// }) | |
// const apiGatewayLogGroup = new logs.LogGroup(this, `apiGatewayLogGroup-${environment.ENV}`, { | |
// retention: logs.RetentionDays.ONE_YEAR | |
// }) | |
// new logs.SubscriptionFilter(this, `apiGatewayLogSubscription-${environment.ENV}`, { | |
// logGroup: apiGatewayLogGroup, | |
// destination: new LambdaDestination(api), | |
// filterPattern: logs.FilterPattern.allTerms("ERROR", "MainThread") | |
// }) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment