PHPackages                             happyr/bref-hook-handler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. happyr/bref-hook-handler

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

happyr/bref-hook-handler
========================

Simple way to handle Bref Lambda hooks

0.2.6(5y ago)961.5kMITPHPPHP &gt;=7.3

Since May 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Happyr/bref-hook-handler)[ Packagist](https://packagist.org/packages/happyr/bref-hook-handler)[ GitHub Sponsors](https://github.com/Nyholm)[ RSS](/packages/happyr-bref-hook-handler/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (5)Versions (9)Used By (0)

Bref Hook Handler
=================

[](#bref-hook-handler)

[![Latest Version](https://camo.githubusercontent.com/a9e47bd47a81bd30082b477336a4c9f97d2584711d8047c8e854b9924160c606/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4861707079722f627265662d686f6f6b2d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/Happyr/bref-hook-handler/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/860c1a7b0e5d978b20dd52dcc888a8a37f2815ab0a483a596713e7ad66d0cf50/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6861707079722f627265662d686f6f6b2d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/happyr/bref-hook-handler)

This small library helps you to make sure the new version of your lambda application is actually working before you directing traffic it. It makes it simple to run a "PreTrafficHook".

Install
-------

[](#install)

```
composer require happyr/bref-hook-handler

```

We also need `serverless-plugin-canary-deployments` from [davidgf](https://github.com/davidgf/serverless-plugin-canary-deployments):

```
npm i --save-dev serverless-plugin-canary-deployments

```

Configure
---------

[](#configure)

The idea is to create a new lambda function that can verify that everything is working. When we are sure all things are green, we will signal CodeDeploy to allow real traffic.

### Example serverless.yml

[](#example-serverlessyml)

```
service: canary-example
frameworkVersion: ">=1.69.0
