Skip to content

Commit

Permalink
s3 deploymentの部分をコメントアウトしました(エラー要因の切り分けのため)
Browse files Browse the repository at this point in the history
  • Loading branch information
AsukaNamiki committed Apr 17, 2024
1 parent 4c757ef commit 4dc8788
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions src/backend/lib/backend-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class BackendStack extends cdk.Stack {
serverAccessLogsBucket: logBucket,
serverAccessLogsPrefix: "DiaryHostingBucketLog/",
blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
websiteIndexDocument: 'index.html',
websiteIndexDocument: 'index.html',
cors: [
{
allowedMethods: [s3.HttpMethods.GET, s3.HttpMethods.HEAD],
Expand Down Expand Up @@ -174,22 +174,21 @@ export class BackendStack extends cdk.Stack {
cfnDistribution.addOverride('Properties.DistributionConfig.Origins.0.S3OriginConfig.OriginAccessIdentity', "")
cfnDistribution.addPropertyDeletionOverride('DistributionConfig.Origins.0.CustomOriginConfig')

new cdk.aws_s3_deployment.BucketDeployment(this, 'WebsiteDeploy', {
sources: [
cdk.aws_s3_deployment.Source.data(
'/index.html',
'<html><body><h1>Hello World</h1></body></html>'
),
cdk.aws_s3_deployment.Source.data(
'/error.html',
'<html><body><h1>Error!!!!!!!!!!!!!</h1></body></html>'
),
],
destinationBucket: websiteBucket,
distribution: distribution,
distributionPaths: ['/*'],
accessControl: s3.BucketAccessControl.PUBLIC_READ_WRITE
});

// new cdk.aws_s3_deployment.BucketDeployment(this, 'WebsiteDeploy', {
// sources: [
// cdk.aws_s3_deployment.Source.data(
// '/index.html',
// '<html><body><h1>Hello World</h1></body></html>'
// ),
// // cdk.aws_s3_deployment.Source.data(
// // '/error.html',
// // '<html><body><h1>Error!!!!!!!!!!!!!</h1></body></html>'
// // ),
// ],
// destinationBucket: websiteBucket,
// distribution: distribution,
// distributionPaths: ['/*'],
// accessControl: s3.BucketAccessControl.PUBLIC_READ_WRITE
// });
}
}

0 comments on commit 4dc8788

Please sign in to comment.