Giter Club home page Giter Club logo

lambda-runtime-graalvm's Introduction

lambda-runtime-graalvm's People

Contributors

mfriesen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lambda-runtime-graalvm's Issues

Implementing response streaming in a custom runtime

Runtime only supports response payload up to 6MB. Using response streaming increases to 20MB.

/runtime/invocation/AwsRequestId/response โ€“ Propagates the Content-Type header from the runtime to send to the client. Lambda returns the response payload in chunks via HTTP/1.1 chunked transfer encoding. The response stream can be a maximum size of 20 MiB.

Any HTTP client that supports streaming answers may be used with Lambda Function URL.

Lambda handler class is instantiated for each request

Each invocation of the LambdaFunction calls the constructor of the provided Lambda handler.

This goes against the normal behaviour of the Java runtime, which only instantiates the Lambda handler class on the first invocation. The [custom runtime documentation](Initialization tasks) also mentions that "Initialize the function" should happen in the Initialization step and not when processing tasks.

Looking at the code, I think it is a matter of moving line 207 of LambdaRuntime outside the while(true) loop, but don't have enough context to be sure that does not break anything else.

I might find some time to experiment with this next week.

Add Docker Image

Publishing a Docker Image to hub.docker.com will allow to test lambda-runtime locally and not require deploying to AWS to verify.

Add support for aws-lambda-java-events

aws-lambda-java-events allows converting of AWS JSON events to Java objects.

Adding support for:

  • DynamodbEvent
  • S3Event
  • SQSEvent
  • APIGatewayProxyRequestEvent

Propagate X-Ray tracing header

According to the custom runtime documentation, the processing task should

Propagate the tracing header โ€“ Get the X-Ray tracing header from the Lambda-Runtime-Trace-Id header in the API response. Set the _X_AMZN_TRACE_ID environment variable locally with the same value. The X-Ray SDK uses this value to connect trace data between services.

Without the _X_AMZN_TRACE_ID the X-Ray SDK cannot create subsegments which essentially means X-Ray cannot be used with Lambda functions running with this graalvm runtime.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.