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 1mo ago

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 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

916d 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

[cybernox/amazon-webservices-bundle

A Symfony2 Bundle for interfacing with Amazon Web Services (AWS)

114248.6k](/packages/cybernox-amazon-webservices-bundle)[georgeboot/laravel-echo-api-gateway

Use Laravel Echo with API Gateway Websockets

10435.5k](/packages/georgeboot-laravel-echo-api-gateway)[meema/laravel-cloudfront

Easily &amp; quickly integrate your application with AWS CloudFront.

31113.4k](/packages/meema-laravel-cloudfront)[akhan619/laravel-ses-tracking

A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.

149.9k](/packages/akhan619-laravel-ses-tracking)[akhan619/laravel-ses-event-manager

A Laravel package to manage incoming SES email events with http/s webhooks.

148.8k](/packages/akhan619-laravel-ses-event-manager)

PHPackages © 2026

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