Skip to content

AWS Context not exposed #18

Open
Open
@moeriki

Description

@moeriki

The default AWS handler has two arguments: event, and context.

It seems like context is not used in curveball, which is fine. But it would be convenient to have it available on the ctx.request.

Right now if I want to access the AWS context I have to do this before forwarding the event to Curveball.

export function handle(event: any, context: Context): Promise<any> {
  context.callbackWaitsForEmptyEventLoop = false;
  return handler(app)(event);
}

Additionally there are internal types for AwsRequest and AwsResponse that are not exposed. I had to type them as any in the code above.

Would you accept PR to:

  • add AWS context under ctx.request.awsContext, or other suggestions?
  • expose types AwsRequest and AwsResponse

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions