or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/aws-lambda-powertools@3.19.x
tile.json

tessl/pypi-aws-lambda-powertools

tessl install tessl/pypi-aws-lambda-powertools@3.19.0

Comprehensive developer toolkit implementing serverless best practices for AWS Lambda functions in Python

Agent Success

Agent success rate when using this tile

89%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.22x

Baseline

Agent success rate without this tile

73%

task.mdevals/scenario-6/

Lambda Request Processor

A Lambda function that processes user requests and generates structured logs with automatic context enrichment.

Capabilities

Processes incoming requests

  • The function accepts an event with a "userId" and "action" field and returns a success response with both values echoed back. @test
  • When the event is missing the "userId" field, the function raises a ValueError with message "userId is required". @test

Logs request processing with Lambda context

  • The logger automatically captures Lambda function name, request ID, memory limit, and cold start status without explicit code. @test
  • The logger includes the userId from the event in all log statements as a persistent context key. @test

Implementation

@generates

API

def lambda_handler(event: dict, context) -> dict:
    """
    Process user requests with automatic Lambda context logging.

    Args:
        event: Dictionary containing 'userId' (str) and 'action' (str)
        context: Lambda context object

    Returns:
        Dictionary with 'statusCode' (200), and 'body' containing 'userId' and 'action'

    Raises:
        ValueError: If userId is missing from event
    """
    pass

Dependencies { .dependencies }

aws-lambda-powertools { .dependency }

Provides structured logging with automatic Lambda context injection.

@satisfied-by