diff --git a/cloudformation/template.yaml b/cloudformation/template.yaml index 3ad6eb47f..bb8860188 100644 --- a/cloudformation/template.yaml +++ b/cloudformation/template.yaml @@ -621,10 +621,10 @@ Resources: Properties: BucketName: !Ref DevPortalSiteS3BucketName PublicAccessBlockConfiguration: - BlockPublicAcls: true - BlockPublicPolicy: true - IgnorePublicAcls: true - RestrictPublicBuckets: true + BlockPublicAcls: !If [ NotDevelopmentMode, 'true', 'false' ] + BlockPublicPolicy: !If [ NotDevelopmentMode, 'true', 'false' ] + IgnorePublicAcls: !If [ NotDevelopmentMode, 'true', 'false' ] + RestrictPublicBuckets: !If [ NotDevelopmentMode, 'true', 'false' ] DevPortalSiteS3BucketPolicy: Type: 'AWS::S3::BucketPolicy' @@ -646,10 +646,10 @@ Resources: Properties: BucketName: !Ref ArtifactsS3BucketName PublicAccessBlockConfiguration: - BlockPublicAcls: true - BlockPublicPolicy: true - IgnorePublicAcls: true - RestrictPublicBuckets: true + BlockPublicAcls: !If [ NotDevelopmentMode, 'true', 'false' ] + BlockPublicPolicy: !If [ NotDevelopmentMode, 'true', 'false' ] + IgnorePublicAcls: !If [ NotDevelopmentMode, 'true', 'false' ] + RestrictPublicBuckets: !If [ NotDevelopmentMode, 'true', 'false' ] NotificationConfiguration: LambdaConfigurations: -