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-2/

{
  "context": "This criteria evaluates how effectively the engineer uses aws-lambda-powertools' batch processing utilities to handle partial failures when processing SQS messages in a Lambda function. The focus is on proper usage of BatchProcessor, record extraction, exception handling, and failure reporting mechanisms.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "BatchProcessor Usage",
      "description": "Uses BatchProcessor class from aws_lambda_powertools.utilities.batch to handle the batch processing logic with proper initialization",
      "max_score": 25
    },
    {
      "name": "Record Handler Implementation",
      "description": "Implements a record handler function that is passed to BatchProcessor.process() or used as a processor callback, correctly extracting and parsing the JSON body from each SQS record",
      "max_score": 20
    },
    {
      "name": "Partial Failure Response",
      "description": "Returns the batch item failures using processor.response() or equivalent method that provides the proper response format with batchItemFailures for failed messages",
      "max_score": 20
    },
    {
      "name": "Exception Handling",
      "description": "Allows exceptions to be raised within the record handler for processing failures, relying on BatchProcessor to catch and track them (rather than catching all exceptions manually)",
      "max_score": 15
    },
    {
      "name": "SQS Record Parsing",
      "description": "Correctly accesses the message body from SQS records using the appropriate record structure (e.g., record.body or record['body']) and parses JSON content",
      "max_score": 10
    },
    {
      "name": "Decorator Alternative",
      "description": "Uses @batch_processor decorator with proper configuration (processor=BatchProcessor, record_handler=...) as an alternative to manual BatchProcessor instantiation (bonus points for cleaner implementation)",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json