tarfin-labs/laravel-cloudwatch-logger
Send Laravel application logs directly to AWS CloudWatch Logs with this ready-to-use logging driver. Configure a log group and stream, then let Laravel’s logging system ship messages to AWS for centralized monitoring and retention.
Scope of this release. v2.7.0 is a single-change maintenance release: a dependency bump enabling Laravel 12 and PHP 8.4 (PR #11). No new features, no deprecations, no breaking changes are signaled in the notes. Its practical effect is to keep the package inside the supported-version envelope rather than to change its architecture. This is the first assessment for this package — there is no prior baseline to diff against, so the evaluation below is a first pass built from the release metadata plus the package's known shape as a Laravel logging channel driver for AWS CloudWatch Logs.
Architecture fit. The package occupies a narrow, well-understood seam: a custom Laravel log channel that routes Monolog records to CloudWatch Logs via the AWS SDK. That is a low-invasiveness position — it plugs into config/logging.php and the existing Log facade rather than requiring application code changes. For teams already on AWS with centralized observability in CloudWatch, it removes a sidecar/agent (e.g., Fluent Bit, FireLens) from the container. For teams not on AWS, or with an existing OTLP/Datadog pipeline, it adds a second, narrower log path with no consolidation benefit. Fit is therefore conditional on CloudWatch being the intended destination of record, not merely an available one.
Integration feasibility. Low effort in principle: composer require, publish config, add a channel entry, supply credentials through the instance role. The real work is not code — it is IAM scoping, log group/stream naming conventions, and confirming batching behavior. A competent Laravel engineer should reach a working staging integration in well under a day. The v2.7.0 bump removes a likely blocker for anyone evaluating this on Laravel 12 / PHP 8.4, which is the main reason it merits an assessment update at all.
Technical risk.
Key questions.
aws/aws-sdk-php directly, or a lighter client? What is the added image/dependency weight?pcntl restarts?Stack fit. Appropriate for Laravel services on AWS where CloudWatch is the aggregation target and the team wants to avoid container-level log agents. Poor fit where an OTLP collector, Datadog, or ELK pipeline already exists — running two log paths doubles configuration surface and splits the truth during incidents. The v2.7.0 constraints make this viable on current-generation runtimes (Laravel 12, PHP 8.4) without pinning the framework back.
Migration path. Treat CloudWatch as an additive sink, not a replacement, for the first phase. Configure a stack channel that fans out to the existing daily (or stderr) driver plus the CloudWatch channel. This preserves local durability and gives a one-line rollback: remove the channel from the stack. Only after confidence is established — verified ingestion, correct stream naming, acceptable latency — should CloudWatch become the primary or sole sink for alertable logs. This staged path is the main reason the integration is low-risk despite the unknowns above.
Compatibility. Confirm three things before committing: the composer.json constraints actually admit your Laravel and PHP versions; Monolog major version alignment (Laravel 10+ ships Monolog 3, older lines ship Monolog 2 — a mismatched handler is the most common failure here); and that PHP 8.4 is the target runtime rather than an incidental allow. If the application is on an older Laravel LTS, verify the backward constraint was widened rather than replaced.
Sequencing.
logs:CreateLogStream and logs:PutLogEvents on that group's ARN.Maintenance. Low day-to-day surface — a config block and a composer constraint. The maintenance burden is upstream-watch: track Laravel and PHP minor releases and confirm the package follows within a reasonable window. v2.7.0 is exactly that pattern and should be read as reassuring on compatibility but neutral on feature health. Budget a recurring review item rather than assuming passive safety.
Support. Community open source with no vendor SLA. Internal ownership must be explicit — name a team that owns the channel config, the IAM policy, and the retention settings. The realistic worst case is not the package breaking but nobody noticing that logs stopped, which is why step 5 above (alarm on the logging path) is not optional.
Scaling. Two independent scaling axes, both cost-bearing. Ingestion scales linearly with log volume and is billed per GB; verbose debug logging in production becomes a visible line item quickly. Throughput is bounded by CloudWatch's per-stream PutLogEvents rate limits; high-volume services with a single shared stream will throttle, and the failure policy under throttling determines whether that surfaces as backpressure or as gaps. Stream naming strategy — per-service, ideally per-instance with a bounded set — is the main lever. Also model the added per-request latency if writes are synchronous; on latency-sensitive endpoints this can be material.
Failure modes. Expect and plan for: expired or misconfigured credentials (silent drop or 500s depending on policy); region/log-group misconfiguration discovered only at first write; API throttling under burst; blocked egress in locked-down VPCs; stream name collisions across horizontally scaled containers; and buffered records lost on OOM, fatal error, or abrupt container termination. Each maps to a monitoring or configuration control — none is exotic, but each is invisible until it happens if the channel is rolled out without fan-out and alarms.
Ramp-up. Low for anyone fluent in Laravel's logging config: roughly half a day to a working staging integration, plus a day for IAM scoping, retention policy, and alarm wiring. Teams unfamiliar with Laravel's stack/channel indirection will need a short orientation, and someone must own the AWS-side cost and retention decisions — that is a platform/FinOps conversation, not a framework one.
How can I help you explore Laravel packages today?