mcfedr/awspushbundle
Symfony bundle for sending mobile push notifications through Amazon SNS. Configure AWS credentials and platform applications, then target iOS, Android, and other devices with a simple service for device tokens, topics, and payloads. Ideal for integrating AWS-backed push into Symfony apps.
Architecture fit — this is not a Laravel package. mcfedr/awspushbundle is a Symfony bundle: it ships a Bundle subclass, a DI Extension with a Configuration tree, and compiler passes. Laravel has no equivalent bootstrapping path for any of that. Installing it via Composer gets you autoloaded classes and nothing else — no service provider, no config publishing, no auto-discovery, no container wiring. What remains usable are the underlying plain-PHP service classes that wrap Aws\Sns\SnsClient (createPlatformEndpoint, subscribe, publish). The functional value of that layer is thin — realistically a few hundred lines of glue — and it is not written against Laravel's contracts (no Illuminate\Contracts\Queue, no events, no logging integration).
Integration feasibility. Three viable paths, in ascending order of ownership:
aws/aws-sdk-php — ~2–4 dev days, zero dependency risk, and this is almost certainly the right answer given the surface area.Technical risk. Low-to-moderate, and mostly not about the bundle. Code volume is small, license is MIT, and the last release (Feb 2025) shows signs of maintenance. The real risks are: bus factor of one, 40 stars and 0 dependents (no battle-testing, no Stack Overflow corpus, no commercial backing), and a hard architectural mismatch with the stated target stack. The composite score of 1.22 tracks that adoption reality; the opportunity score of 24.03 should be read as speculative demand for cross-platform push, not as validation of this artifact.
Dependency and capability risk sits in SNS, not the bundle. Because delivery is delegated to Amazon SNS, the platform's constraints become yours: 256 KB payload ceiling, no rich media or per-message delivery receipts (only CloudWatch aggregates), no scheduling, no templating beyond simple attribute substitution, and no PublishBatch support for direct-to-endpoint mobile push. Those limits are the same whether you use this bundle, a fork, or your own 300-line wrapper.
Key questions to resolve before committing:
.p8 key) or only certificate paths? Certificate rotation is a recurring ops burden you may not want.EndpointDisabled handling and any token-pruning hook, or does invalid-token cleanup fall entirely on us?symfony/* version constraints compatible with the Symfony components pinned by our Laravel version (Laravel 11 → Symfony 7, Laravel 10 → 6.2)? A conflict here kills path 1 entirely.Stack fit. Assume Laravel 10/11 on PHP 8.1+. Do not attempt to register the bundle. Treat the repository as a reference implementation and build a thin internal abstraction: a PushGateway interface with registerDevice, unregisterDevice, sendToDevice, sendToTopic, bound in a service provider to an SnsPushGateway that talks to Aws\Sns\SnsClient directly. This keeps the SNS domain knowledge visible in our codebase rather than buried in a dependency we can't debug.
Migration path.
PushGateway implementation, a device_tokens table (user, platform, token, endpoint ARN, enabled flag, last_seen), and an artisan command for registration. Store the endpoint ARN, not just the token — it saves a lookup on every send.NumberOfNotificationsFailed drift.Compatibility checks to gate Phase 0. PHP and symfony/* constraint resolution against our Laravel version; aws/aws-sdk-php major version and its credential provider chain; whether we run on IAM roles (ECS/EC2/Lambda) — if so, ensure nothing in the config path expects static keys, since committing key/secret config is a non-starter.
Build vs. buy. Before writing the wrapper, run a one-week bake-off against Firebase Cloud Messaging directly (unified APNS+FCM, better delivery diagnostics, free) and against a managed layer (OneSignal, Braze, Courier) if the roadmap includes campaigns, segmentation, or analytics. SNS is attractive only when the notification volume is low, the payloads are simple, and AWS is already the trust boundary. If any of those fail, skip this package and the SNS path entirely.
Maintenance. MIT, single maintainer, small codebase, recent release — but 0 dependents means we are effectively the first production user. If we take path 2 (fork), pin the upstream commit, keep our diff to a single service provider file, and schedule a quarterly rebase check. If we take path 3 (in-house wrapper), maintenance drops to AWS SDK major-version bumps, which are routine.
Support. No vendor, no SLA, no commercial backing. Issues surface through GitHub only. The practical consequence: someone on the team must own SNS domain expertise — platform application lifecycle, APNS certificate/key rotation, sandbox-vs-production endpoint separation, FCM sender ID configuration. Budget that as a standing 10–15% of one engineer, not a one-time setup cost.
Scaling. SNS absorbs volume horizontally, but the client side does not: mobile push has no PublishBatch API, so every notification is an individual HTTPS call. At high volume you need bounded concurrency and rate limiting on the queue workers, plus awareness of per-account-per-region publish quotas. Cost model is roughly $0.50 per million mobile push notifications plus request charges, with a monthly free tier — cheap at low volume, but re-verify against current AWS pricing before forecasting. Topic subscriptions are eventually consistent, so a device registered seconds before a broadcast may miss it; don't build time-critical fan-out on topics.
Failure modes to instrument explicitly.
NumberOfNotificationsFailed and platform-side logs reveal it. Alert on the ratio, and reconcile against APNS/FCM dashboards during rollout.EndpointDisabled errors. Without pruning, the registry degrades and delivery rates silently fall. Handle the error code and disable the row.Ramp-up. A mid-level Laravel engineer becomes productive on the wrapper in 1–2 days because the API surface is four methods. The genuine learning curve is SNS semantics — platform ARNs, endpoint ARNs, sandbox separation, feedback interpretation — and that is knowledge the package does not abstract away. Plan for one engineer to own it end to end, with a runbook covering credential rotation, platform application creation, and the disabled-endpoint reconciliation job.
How can I help you explore Laravel packages today?