tessl install tessl/pypi-aws-lambda-powertools@3.19.0Comprehensive 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%
A Lambda function that processes events from multiple AWS services and extracts relevant data in a type-safe manner.
@generates
def process_sqs_event(event: dict) -> list[dict]:
"""
Process SQS event and extract message details.
Args:
event: Raw SQS event dictionary
Returns:
List of dictionaries containing:
- body: Message body as string
- receipt_handle: Receipt handle for the message
- attributes: Message attributes dictionary
"""
pass
def process_s3_event(event: dict) -> list[dict]:
"""
Process S3 event and extract object details.
Args:
event: Raw S3 event dictionary
Returns:
List of dictionaries containing:
- bucket: Bucket name
- key: Object key (URL-decoded)
- event_name: Event name (e.g., 'ObjectCreated:Put')
"""
pass
def process_dynamodb_event(event: dict) -> list[dict]:
"""
Process DynamoDB stream event and extract record details.
Args:
event: Raw DynamoDB stream event dictionary
Returns:
List of dictionaries containing:
- event_name: Event name (INSERT, MODIFY, REMOVE)
- new_image: New image as native Python dict (None for REMOVE)
- old_image: Old image as native Python dict (None for INSERT)
"""
pass
def process_apigateway_event(event: dict) -> dict:
"""
Process API Gateway REST event and extract request details.
Args:
event: Raw API Gateway REST event dictionary
Returns:
Dictionary containing:
- method: HTTP method
- path: Request path
- query_params: Query string parameters as dict
- user_agent: User-Agent header value (case-insensitive lookup)
"""
passProvides type-safe event source data classes for AWS Lambda events.
@satisfied-by