diff --git a/infrastructure/cdk/lib/landing.ts b/infrastructure/cdk/lib/landing.ts index 73b4eb73c..7da2a70e1 100644 --- a/infrastructure/cdk/lib/landing.ts +++ b/infrastructure/cdk/lib/landing.ts @@ -61,11 +61,6 @@ export class LandingStack extends Stack { accessControl: BucketAccessControl.PRIVATE }) - new BucketDeployment(this, `${project}${this.service}BucketDeployment${stage}`, { - destinationBucket: bucket, - sources: [Source.asset(this.assetPath)] - }) - const originAccessIdentity = new OriginAccessIdentity(this, `${project}${this.service}OriginAccessIdentity${stage}`) bucket.grantRead(originAccessIdentity) @@ -93,6 +88,13 @@ export class LandingStack extends Stack { certificate }) + new BucketDeployment(this, `${project}${this.service}BucketDeployment${stage}`, { + destinationBucket: bucket, + sources: [Source.asset(this.assetPath)], + distribution, + distributionPaths: ['/*'] + }) + new route53.ARecord(this, `${project}${this.service}DnsARecord${stage}`, { recordName: serviceDomain, zone: hostedZone as route53.IHostedZone,