Skip to content

Feature request: LLRT support for Event Handler #4499

@perpil

Description

@perpil

Use case

Along with the Metrics and Logger modules, since building a REST API is a popular use case for using Lambda, the event handler should be tested with LLRT for compatibility.

Solution/User Experience

Currently when you run the sample from the docs using the LLRT runtime (v0.6.2 beta):

import { Router } from '@aws-lambda-powertools/event-handler/experimental-rest';
import type { Context } from 'aws-lambda';

const app = new Router();

app.get('/ping', async () => {
  return { message: 'pong' }; 
});

export const handler = async (event: unknown, context: Context) => {
  return app.resolve(event, context);
};

It spits out:

[Object object]

Instead of

{
  "message": "pong"
}

The issue could be with LLRT, but it would be useful to understand what the current issue is so these two pieces of tech can work together at some point.

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussingThe issue needs to be discussed, elaborated, or refinedevent-handlerThis item relates to the Event Handler Utilityfeature-requestThis item refers to a feature request for an existing or new utility

    Type

    No type

    Projects

    Status

    Ideas

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions