frontier is a deployment tool for Amazon CloudFront Functions.
The concept is heavily inspired by Lambroll.
Simply run as below:
frontier deploy
frontier deploy
does:
- create or update function
- publish the function by default
- you can stop this behavior by using
--publish=false
- you can stop this behavior by using
frontier deploy
does not:
- compile your function code implicitly
- or anything else
The function config is almost same as CreateFunction
or UpdateFunction
's input except of Code
.
---
name: your-edge-function
config:
comment: this is edge function
runtime: cloudfront-js-1.0
code:
path: ./path/to/fn.js
fn.js:
function handler(event) {
var response = event.response,
origin = event.request.headers.origin;
response.headers["access-control-allow-origin"] = {
value: origin.value,
};
return response;
}
go install github.com/aereal/frontier@latest
See LICENSE file.