CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-aws-lambda-powertools

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

89

1.21x
Overview
Eval results
Files

rubric.jsonevals/scenario-6/

{
  "context": "This criteria evaluates how effectively the engineer utilizes AWS Lambda Powertools' Logger module with Lambda context auto-injection capabilities. The focus is on proper use of the Logger initialization, the @inject_lambda_context decorator, and custom context key management.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Logger instantiation",
      "description": "Creates a Logger instance from aws_lambda_powertools.logging (using Logger class) with appropriate service name configuration",
      "max_score": 15
    },
    {
      "name": "@inject_lambda_context decorator",
      "description": "Uses the @logger.inject_lambda_context decorator (or @inject_lambda_context with logger parameter) on the lambda_handler function to automatically capture Lambda context information",
      "max_score": 35
    },
    {
      "name": "Automatic context capture",
      "description": "Relies on the decorator to automatically capture function name, request ID, memory limit, and cold start status without manually extracting these from the context object",
      "max_score": 20
    },
    {
      "name": "Custom context keys",
      "description": "Uses logger.append_keys() or logger.set_correlation_id() or similar methods to add userId as a persistent context key that appears in all subsequent log statements",
      "max_score": 20
    },
    {
      "name": "Structured logging calls",
      "description": "Uses logger.info(), logger.error(), or other logging methods to generate structured JSON logs rather than using print() or standard logging module",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-aws-lambda-powertools

tile.json