-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Labels
discussingThe issue needs to be discussed, elaborated, or refinedThe issue needs to be discussed, elaborated, or refinedevent-handlerThis item relates to the Event Handler UtilityThis item relates to the Event Handler Utilityfeature-requestThis item refers to a feature request for an existing or new utilityThis item refers to a feature request for an existing or new utility
Description
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
- This feature request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
nabetti1720
Metadata
Metadata
Assignees
Labels
discussingThe issue needs to be discussed, elaborated, or refinedThe issue needs to be discussed, elaborated, or refinedevent-handlerThis item relates to the Event Handler UtilityThis item relates to the Event Handler Utilityfeature-requestThis item refers to a feature request for an existing or new utilityThis item refers to a feature request for an existing or new utility
Type
Projects
Status
Ideas