https://github.com/ironcore864/tfm-lambda-cache-control
https://github.com/ironcore864/tfm-lambda-cache-control
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ironcore864/tfm-lambda-cache-control
- Owner: IronCore864
- Created: 2019-10-31T10:51:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-31T10:53:23.000Z (over 6 years ago)
- Last Synced: 2025-06-01T02:45:04.440Z (about 1 year ago)
- Language: HCL
- Size: 1000 Bytes
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Terraform Module - Lambda Function for Adding S3 Cache Control Headers
Creates lambda s3 role, lambda function source from s3, permission to allow s3 bucket to send event to trigger the function to set cache control headers.
## Usage
Example:
```
locals {
s3_ids = [s3-bucket-1.id, s3-bucket-2.id, ...]
s3_arns = [s3-bucket-1.arn, s3-bucket-2.arn, ...]
}
module "lambda_cache_control" {
source = "git::https://github.com/IronCore864/tfm-lambda-cache-control.git"
naming_prefix = "xxx"
s3_bucket = "xxx"
s3_notification_bucket_arns = zipmap(local.s3_ids, local.s3_arns)
}
```