Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It can in most cases be used to host any static site, however this module adds s

- Creates an S3 bucket along with an IAM user which has the minimum required permissions to sync from [Publii][1]
- Creates a CloudFront endpoint (And optionally ACM certificates and Route53 records in an existing Hosted Zone)
- Creates a Lambda function to run a Cloudfront Invalidation when `files.publii.json` is created/updated (This file is updated on every sync)
- Creates a Lambda function to run a Cloudfront Invalidation when `sitemap.xml` is created/updated (This file is updated on every sync)
- Optionally have CloudFront do the right thing when 'Pretty URLs' are enabled (This is achieved via a CloudFront function which adds `index.html` to the URI if there is no extention)
- Optionally redirect from the apex domain (eg. example.com) to www (www.example.com). If this is enabled (`var.cloudfront_enable_apex_to_www_redirect`), the 'Website Url' within 'Server' options should be set to www.yourdomain.com - [Publii S3 Server Settings docs (point 26)][2]
- Optionally enable WAF
Expand Down
2 changes: 1 addition & 1 deletion s3-frontend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ resource "aws_s3_bucket_notification" "frontend_cloudfront_invalidation" {
lambda_function {
lambda_function_arn = module.lambda_cloudfront_invalidation_frontend.function_arn
events = ["s3:ObjectCreated:*"]
filter_prefix = "files.publii.json"
filter_prefix = "sitemap.xml"
}

depends_on = [aws_lambda_permission.cloudfront_invalidation_frontend_alllow_s3]
Expand Down