Skip to content

a deployment tool for Amazon CloudFront Functions

License

Notifications You must be signed in to change notification settings

aereal/frontier

Repository files navigation

status PkgGoDev

frontier

frontier is a deployment tool for Amazon CloudFront Functions.

The concept is heavily inspired by Lambroll.

Synopsis

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

frontier deploy does not:

  • compile your function code implicitly
  • or anything else

Function Config (function.yml)

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;
}

Installation

go install github.com/aereal/frontier@latest

License

See LICENSE file.

About

a deployment tool for Amazon CloudFront Functions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages