PHPackages                             mensbeam/catcher-awsnshandler - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. mensbeam/catcher-awsnshandler

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mensbeam/catcher-awsnshandler
=============================

Amazon AWS SNS Message Handler for MensBeam's Catcher

1.0.1(2y ago)027MITPHPPHP &gt;=8.1

Since Nov 9Pushed 2y ago2 watchersCompare

[ Source](https://github.com/mensbeam/Catcher-AWSSNSHandler)[ Packagist](https://packagist.org/packages/mensbeam/catcher-awsnshandler)[ RSS](/packages/mensbeam-catcher-awsnshandler/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (5)Versions (3)Used By (0)

AWSSNSHandler
=============

[](#awssnshandler)

*AWSSNSHandler* is a Throwable handler for use in [*Catcher*](https://code.mensbeam.com/MensBeam/Catcher), a Throwable and error handling library for PHP. It sends throwables and errors to Amazon SNS topics. Right now *AWSSNSHandler* only supports sending to standard topics.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- [mensbeam/catcher](https://code.mensbeam.com/MensBeam/Catcher) ^2.1.2
- [aws/aws-sdk-php](https://packagist.org/packages/aws/aws-sdk-php) ^3.283

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

[](#installation)

```
composer require mensbeam/catcher-awssnshandler
```

Usage
-----

[](#usage)

For most use cases this library requires no configuration and little effort to integrate into non-complex environments:

```
use MensBeam\Catcher,
    MensBeam\Catcher\AWSSNSHandler,
    Aws\Sns\SnsClient;

$client = new SnsClient([
    'version' => 'latest',
    'region' => 'us-west-2',
    'credentials' => [
        'key' => '',
        'secret' => ''
    ]
]);
$catcher = new Catcher(new AWSSNSHandler($client, 'arn:aws:sns:us-west-2:701867229025:ook_eek'));
```

That's it. It will automatically register Catcher as an exception, error, and shutdown handler and use `AWSSNSHandler` as its sole handler. Like other *Catcher* handlers, *AWSSNSHandler* can be configured with a logger. When logging it behaves identically to *JSONHandler*. See the [*Catcher*](https://code.mensbeam.com/MensBeam/Catcher) documentation for more info on how to configure a logger.

Documentation
-------------

[](#documentation)

### MensBeam\\Catcher\\AWSSNSHandler

[](#mensbeamcatcherawssnshandler)

```
namespace MensBeam\Catcher;
use Aws\Sns\SnsClient;

class AWSSNSHandler extends JSONHandler {
    protected SnsClient $client;
    protected string $topicARN;

    public function __construct(SnsClient $client, string $topicARN, array $options = []);

    public function getClient(): SnsClient;
    public function setClient(SnsClient $client): void;
    public function getTopicARN(): string;
    public function setTopicARN(string $topicARN): void;
}
```

#### MensBeam\\Catcher\\AWSSNSHandler::getClient

[](#mensbeamcatcherawssnshandlergetclient)

Returns the `Aws\Sns\SnsClient` the handler uses

#### MensBeam\\Catcher\\AWSSNSHandler::getTopicARN

[](#mensbeamcatcherawssnshandlergettopicarn)

Returns the AWS SNS topic ARN the handler sends messages to

#### MensBeam\\Catcher\\AWSSNSHandler::setClient

[](#mensbeamcatcherawssnshandlersetclient)

Replaces the `Aws\Sns\SnsClient` the handler uses with one specified

#### MensBeam\\Catcher\\AWSSNSHandler::setTopicARN

[](#mensbeamcatcherawssnshandlersettopicarn)

Replaces the AWS SNS topic ARN the handler sends messages to with one specified

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

967d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/89590?v=4)[J. King](/maintainers/JKingweb)[@JKingweb](https://github.com/JKingweb)

![](https://www.gravatar.com/avatar/fa45644fa8847647e3d12802571072bbd4f3da8d27ed03f6f8df3c3859db6f6e?d=identicon)[dustinwilson](/maintainers/dustinwilson)

---

Top Contributors

[![dustinwilson](https://avatars.githubusercontent.com/u/1885928?v=4)](https://github.com/dustinwilson "dustinwilson (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mensbeam-catcher-awsnshandler/health.svg)

```
[![Health](https://phpackages.com/badges/mensbeam-catcher-awsnshandler/health.svg)](https://phpackages.com/packages/mensbeam-catcher-awsnshandler)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k285.7M1.0k](/packages/league-flysystem-aws-s3-v3)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[georgeboot/laravel-echo-api-gateway

Use Laravel Echo with API Gateway Websockets

10540.3k](/packages/georgeboot-laravel-echo-api-gateway)[altis/core

Core module for Altis

19228.0k3](/packages/altis-core)[keboola/storage-api-client

Keboola Storage API PHP Client

10405.9k40](/packages/keboola-storage-api-client)

PHPackages © 2026

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