Test your lambda@edge functions locally.
Have you ever found it frustrating to develop lambda@edge functions? Are you tired of editing your code, publishing a new version, updating the Cloudfront distribution, clear the cache, waiting for propagation to finish, and waiting to see your logs in Cloudwatch?
To demo this, clone the repo down and run
go run ./cmd/emulator/... example/cookie-redirect
---
config:
port: 3000 # defaults to 443
addr: localhost # defaults to localhost
origins:
example:
domain: example.com
path: /
behaviors:
- path: /*
origin: example
events:
viewer-request:
path: ./ # defaults to the path passed into the emulator
handler: index.handler
origin-request:
handler: index.handler
origin-response:
handler: index.handler
viewer-response:
handler: index.handler
- emulator CLI command
- use terraform to determine origin and behavior configurations
- validate header modification
- viewer-request
- origin-request
- origin-response
- viewer-response