Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Awspushbundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  1. Consume as a library — require the package, ignore the bundle, instantiate its manager classes from a Laravel service provider. Cheapest, but you inherit Symfony-typed constructor dependencies and whatever configuration assumptions the bundle's extension makes (notably key/secret config arrays rather than the AWS credential provider chain).
  2. Fork and add a Laravel service provider — small effort, but you now own a fork with a single upstream maintainer.
  3. Reimplement the wrapper in-house against 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:

  • Does the configuration surface support APNS token-based auth (.p8 key) or only certificate paths? Certificate rotation is a recurring ops burden you may not want.
  • Is the FCM path aligned with FCM v1 (legacy HTTP API is retired)? Since the bundle hands off to SNS this should be inherited, but confirm the platform-application creation path is not pinned to legacy semantics.
  • Does it expose EndpointDisabled handling and any token-pruning hook, or does invalid-token cleanup fall entirely on us?
  • Are the 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.
  • Does it support per-tenant/multi-app platform ARNs (iOS prod + sandbox, multiple brands), or does it assume one platform application per type?
  • What observability hooks exist — PSR-3 logging only, or structured events we can bridge into our own telemetry?

Integration Approach

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.

  • Phase 0 — spike (1–2 days). Provision APNS and FCM platform applications in SNS, publish one test notification to one iOS and one Android device from a Laravel tinker session using the AWS SDK directly. This validates credentials, sandbox-vs-production ARNs, and payload shape before any code is written.
  • Phase 1 — wrapper + device registry (2–4 days). 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.
  • Phase 2 — asynchronous delivery (2–3 days). Queue jobs on Redis or SQS, one job per logical send, with exponential backoff and an idempotency key so retries don't duplicate notifications. SNS publishes are not idempotent.
  • Phase 3 — feedback loop and hygiene. Nightly job reconciling disabled endpoints, pruning stale tokens, and alerting on NumberOfNotificationsFailed drift.
  • Phase 4 — topics, segmentation, templating only if the product actually needs broadcast.

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.

Operational Impact

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.

  • Silent asynchronous rejection. SNS returns success, then APNS/FCM rejects the message. Nothing surfaces in the response. Only CloudWatch NumberOfNotificationsFailed and platform-side logs reveal it. Alert on the ratio, and reconcile against APNS/FCM dashboards during rollout.
  • Disabled endpoints. Expired or uninstalled-app tokens produce EndpointDisabled errors. Without pruning, the registry degrades and delivery rates silently fall. Handle the error code and disable the row.
  • Platform application misconfiguration. Wrong certificate, sandbox key against production, or a stale FCM credential causes total failure for that platform with unhelpful error text. Validate config on deploy, not on first send.
  • Payload rejection. Oversized or malformed APNS/FCM payloads fail at the provider. Enforce a serialization layer with size assertions in tests.
  • Duplicate sends. Job retries without an idempotency key will double-notify. Design for at-least-once and dedupe at the provider or the client.
  • Credential expiration and rotation. Key rotation is a recurring calendar event; missing it is an outage.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource