PHPackages                             ttsuru/bref-layer-arns - 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. ttsuru/bref-layer-arns

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

ttsuru/bref-layer-arns
======================

Resolve latest Bref and extra PHP extension layer ARNs from layers.json

v1.1.0(11mo ago)22.9k↓46.7%MITPHPPHP ^8.0CI failing

Since Jun 2Pushed 7mo agoCompare

[ Source](https://github.com/ttsuru/bref-layer-arns)[ Packagist](https://packagist.org/packages/ttsuru/bref-layer-arns)[ RSS](/packages/ttsuru-bref-layer-arns/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

Bref Layer ARNs Resolver
========================

[](#bref-layer-arns-resolver)

This library provides a CLI tool and PHP API to resolve the latest Lambda Layer ARNs published by [Bref](https://bref.sh), including layers from `bref/bref` and optionally from `bref/extra-php-extensions`.

Installation
------------

[](#installation)

Install via Composer:

```
composer require ttsuru/bref-layer-arns

```

If you also use layers from `bref/extra-php-extensions`, you should require it as well:

```
composer require bref/extra-php-extensions

```

Usage
-----

[](#usage)

### CLI

[](#cli)

Use the CLI to output a comma-separated list of ARNs for the specified layers:

```
vendor/bin/bref-layer-arns php-84-fpm gd-php-84 insights --region=ap-northeast-1

```

You can omit the region if you set the `AWS_REGION` environment variable:

```
export AWS_REGION=ap-northeast-1
vendor/bin/bref-layer-arns php-84-fpm gd-php-84 insights

```

The output will be something like:

```
arn:aws:lambda:ap-northeast-1:534081306603:layer:php-84-fpm:24,arn:aws:lambda:ap-northeast-1:403367587399:layer:gd-php-84:2,arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:14

```

To use ARM64-specific layers, pass `arm-insights` instead of `insights`:

```
vendor/bin/bref-layer-arns arm-php-84-fpm arm-insights --region=ap-northeast-1

```

Warning

`bref/extra-php-extensions` does not provide ARM64 layers. Only x86\_64 is supported.

### PHP API

[](#php-api)

You can also use it programmatically:

```
use Bref\LayerArns\Resolver;

$arns = Resolver::resolve(['php-84-fpm', 'gd-php-84'], 'ap-northeast-1');

```

Features
--------

[](#features)

- Resolves layers from `bref/bref`
- Supports optional `bref/extra-php-extensions`
- Automatically determines correct AWS account ID
- CLI output ready for GitHub Actions or SAM parameter overrides

Testing
-------

[](#testing)

Install dev dependencies and run PHPUnit:

```
composer install
vendor/bin/phpunit

```

Usage with AWS SAM
------------------

[](#usage-with-aws-sam)

You can use the resolved ARNs in your `template.yaml` with `Parameters` and `Globals` like this (supporting multiple layers):

```
Globals:
  Function:
    Layers: !Ref BrefLayerArns

Parameters:
  BrefLayerArns:
    Type: CommaDelimitedList
    Default: >-
      arn:aws:lambda:ap-northeast-1:534081306603:layer:php-84-fpm:24,
      arn:aws:lambda:ap-northeast-1:403367587399:layer:gd-php-84:2

```

And pass in the latest ARNs dynamically from GitHub Actions:

```
sam deploy --parameter-overrides BrefLayerArns=$(vendor/bin/bref-layer-arns php-84-fpm --region=$AWS_REGION)

```

Usage with GitHub Actions
-------------------------

[](#usage-with-github-actions)

You can dynamically resolve and inject the latest Bref Layer ARNs in your GitHub Actions workflow using this tool.

Example:

```
env:
  AWS_REGION: ap-northeast-1
  BREF_LAYERS: php-84-fpm gd-php-84 insights

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Set up PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '8.4'

      - name: Install dependencies
        run: composer install --no-dev

      - name: Resolve Bref Layer ARNs
        run: |
          BREF_LAYER_ARNS=$(vendor/bin/bref-layer-arns $BREF_LAYERS)
          if [ -z "$BREF_LAYER_ARNS" ]; then
            echo "Failed to resolve Bref layers." >&2
            exit 1
          fi
          echo "BREF_LAYER_ARNS=$BREF_LAYER_ARNS" >> $GITHUB_ENV

      - name: Deploy with SAM
        run: |
          sam deploy \
            --parameter-overrides BrefLayerArns=$BREF_LAYER_ARNS
```

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for release history.

License
-------

[](#license)

MIT License – see [LICENSE](LICENSE) for full text.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance57

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

350d ago

PHP version history (2 changes)v1.0.0PHP ^7.4 || ^8.0

v1.1.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/578548?v=4)[TSURU](/maintainers/ttsuru)[@ttsuru](https://github.com/ttsuru)

---

Top Contributors

[![ttsuru](https://avatars.githubusercontent.com/u/578548?v=4)](https://github.com/ttsuru "ttsuru (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ttsuru-bref-layer-arns/health.svg)

```
[![Health](https://phpackages.com/badges/ttsuru-bref-layer-arns/health.svg)](https://phpackages.com/packages/ttsuru-bref-layer-arns)
```

###  Alternatives

[ocramius/proxy-manager

A library providing utilities to generate, instantiate and generally operate with Object Proxies

5.0k82.4M230](/packages/ocramius-proxy-manager)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[ocramius/package-versions

Provides efficient querying for installed package versions (no runtime IO)

3.2k74.3M117](/packages/ocramius-package-versions)[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M63](/packages/jean85-pretty-package-versions)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.0M188](/packages/icanhazstring-composer-unused)[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k74.6k86](/packages/pocketmine-pocketmine-mp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
