github aws-powertools/powertools-lambda-python v2.3.1

latest releases: v2.40.1, v2.40.0, v2.39.1...
19 months ago

Summary

This patch release address an issue in Event Handler REST API to support dynamic routes with an equal sign (=).

Big thanks to @baraksalomon for the bug report!

Previously, a dynamic route containing = would result in a not found response (HTTP 404).

Example

from aws_lambda_powertools.event_handler import APIGatewayRestResolver
from aws_lambda_powertools.utilities.typing import LambdaContext

app = APIGatewayRestResolver()

# NOTE: `/token/bXl0b2tlbg==` should be matched and not return 404 now
@app.get("/token/<token>")
def get_token(token: str):
    return {"received": f"{token}"}


def lambda_handler(event: dict, context: LambdaContext) -> dict:
    return app.resolve(event, context)

Changes

🐛 Bug and hot fixes

  • fix(apigateway): support dynamic routes with equal sign (RFC3986) (#1737) by @heitorlessa

🔧 Maintenance

  • chore(deps-dev): bump mypy-boto3-xray from 1.26.9 to 1.26.11.post1 (#1734) by @dependabot

This release was made possible by the following contributors:

@dependabot, @dependabot[bot], @heitorlessa and Release bot

Don't miss a new powertools-lambda-python release

NewReleases is sending notifications on new releases.