CloudFront Lambda@Edge with LocalStack
This repository contains Terraform configuration for deploying Lambda@Edge functions with CloudFront, configured to work with LocalStack for local development.
Setup
- Install LocalStack via Homebrew:
brew install localstack/tap/localstack-cli
- Install terraform-local via Homebrew:
brew install w
- Start LocalStack with CloudFront Lambda@Edge support:
LOCALSTACK_CLOUDFRONT_LAMBDA_EDGE=1 localstack start
- Initialize Terraform:
cd terraform
tflocal init
- Deploy the resources:
tflocal apply -auto-approve