Skip to content

Expose AWS Lambda execution context for Vapor logging#196

Merged
taylorotwell merged 2 commits intolaravel:2.0from
sahil7194:feat/aws-context-vapor
Dec 19, 2025
Merged

Expose AWS Lambda execution context for Vapor logging#196
taylorotwell merged 2 commits intolaravel:2.0from
sahil7194:feat/aws-context-vapor

Conversation

@sahil7194
Copy link
Contributor

@sahil7194 sahil7194 commented Dec 19, 2025

Expose AWS Lambda execution context for Vapor logging

Overview

Debugging production issues in Vapor can be difficult when attempting to correlate application logs with their corresponding AWS CloudWatch entries.

This change introduces a small helper trait that exposes commonly needed AWS Lambda execution metadata directly from the environment, including the request ID, function name, function version, and CloudWatch log identifiers.

Motivation

Providing easy access to this context allows logs and exceptions to include Lambda-specific identifiers, making it significantly easier to locate the relevant log stream in CloudWatch and trace individual requests during debugging.

Details

The helper is lightweight, has no external dependencies, and can be used wherever logging or error reporting occurs. It does not modify existing behavior and introduces no breaking changes.

Benefits

  • Improves log traceability in Vapor environments
  • Reduces time spent locating CloudWatch logs
  • Enhances production debugging without additional overhead

@taylorotwell taylorotwell merged commit fb0db5c into laravel:2.0 Dec 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants