- What is lab123/aws-sns and what does it do for Laravel?
- It is a Laravel notification channel driver that wraps aws/aws-sdk-php to send Amazon SNS messages from your application. It supports direct SMS delivery (Publish to a PhoneNumber) and topic fan-out (Publish to a TargetArn). You configure AWS credentials once and then send SNS notifications through Laravel's familiar notification API rather than calling the SDK directly. The package is intentionally thin, essentially glue code over the AWS SDK.
- How do I install lab123/aws-sns with Composer?
- Install it with composer require lab123/aws-sns. Version 2.0.0 requires PHP ^8.1, Laravel 10 through 13, Lumen 10 or 11, and aws/aws-sdk-php ^3.x. Because it pulls in the AWS SDK, expect Composer to resolve shared AWS dependencies alongside packages like Vapor, Flysystem S3, or SES mailers. Laravel 5 through 9 applications are stranded on the ^1.0 branch.
- Which Laravel and Lumen versions are supported?
- Version 2.0.0 declares support for Laravel 10, 11, 12, and 13, plus Lumen 10 and 11, on PHP ^8.1. Laravel 5 through 9 users must stay on the ^1.0 branch, which carries the older AWS SDK constraint and an undocumented security-patch status. Before adopting, confirm the framework matrix is backed by a real CI job per version rather than just composer.json declarations, and verify whether Laravel 13 is actually GA at the time you install.
- How do I send an SMS versus publishing to an SNS topic?
- The package exposes two paths that mirror SNS itself: a direct SMS send that calls Publish with a PhoneNumber, and a topic publish that calls Publish with a TargetArn. In practice you wire one or the other into a Laravel notification channel and let the driver translate the notification into the appropriate Publish call. Topic fan-out is the better fit when you need multiple subscribers, while direct SMS is for a single recipient number.
- Where do I configure AWS credentials and region for the package?
- Credentials are supplied through the standard AWS SDK resolution chain, so environment variables such as AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION are the normal approach. The package is described as configure-once, meaning you set the credentials and region for the SNS client rather than per message. In production prefer IAM roles or instance profiles over long-lived keys stored in .env.
- Composer audit reports PKSA-zwc5-qtrz-zm1n after installing this package — what is that?
- Version 2.0.0 documents an instruction for Laravel and Lumen 10 and 11 adopters to ignore advisory PKSA-zwc5-qtrz-zm1n because no upstream fix exists. The advisory is in the framework rather than in this SNS package, so the package is only publishing a known workaround. Treat it as a governance item: record a documented risk acceptance, define a compensating control such as input validation or a WAF rule, and track whether Laravel ships a fix so the ignore can eventually be removed. Note that the ignore has no built-in expiry date.
- Does lab123/aws-sns support retries, idempotency, or delivery status tracking?
- No. The 2.0.0 release notes do not address retry or backoff, idempotency keys, delivery-status capture, per-country SMS routing, opt-out handling, or MessageAttributes, SenderID, and SMSType support. The release is a compatibility and dependency-modernization update with no feature or reliability work. If you need any of those behaviors you will have to implement them yourself around the channel or choose a different integration.
- Should I use this package or just write the SNS glue myself?
- The durable value here is roughly 50 to 150 lines of glue over aws/aws-sdk-php, so the decision is whether owning that code is cheaper than consuming it. Writing it yourself avoids the advisory suppression instruction and gives you control over retries, idempotency, and message attributes from day one. Adopting the package buys you a maintained compatibility matrix, but with 31 stars, zero dependents, and a single maintainer, the adoption signal is weak. Both paths are defensible; pick based on how much of the missing reliability work you need anyway.
- Is lab123/aws-sns actively maintained, and what is the bus factor?
- It is a single-maintainer organization with a low community footprint, so the bus factor is one. The 2.0.0 release shows engagement and modernization, but it added no new adopters and shipped no feature work, which suggests future releases will be compatibility upkeep only. The project's release metadata once appeared future-dated, so verify tag history and commit log before treating any recent activity as a strong maintenance signal.
- How should I test SNS notifications in a Laravel application without hitting AWS?
- Because the package sits behind Laravel's notification system, the simplest approach is to fake the notification channel or swap the SNS client with a mock so no real Publish call leaves your test suite. Keep a small number of integration tests that run against a sandbox or a dedicated test topic to catch SDK-level changes. Also add a CI step for composer audit so any change to the PKSA-zwc5-qtrz-zm1n ignore is visible in review rather than silently accepted.