aws-lambda-runtime-interface-emulator | Lambda Runtime Interface Emulator is a proxy for Lambda ’ s | Cloud Functions library

 by   aws Go Version: v1.12 License: Apache-2.0

kandi X-RAY | aws-lambda-runtime-interface-emulator Summary

kandi X-RAY | aws-lambda-runtime-interface-emulator Summary

aws-lambda-runtime-interface-emulator is a Go library typically used in Serverless, Cloud Functions, Nodejs applications. aws-lambda-runtime-interface-emulator has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

The Lambda Runtime Interface Emulator is a proxy for Lambda’s Runtime and Extensions APIs, which allows customers to locally test their Lambda function packaged as a container image. It is a lightweight web-server that converts HTTP requests to JSON events and maintains functional parity with the Lambda Runtime API in the cloud. It allows you to locally test your functions using familiar tools such as cURL and the Docker CLI (when testing functions packaged as container images). It also simplifies running your application on additional computes. You can include the Lambda Runtime Interface Emulator in your container image to have it accept HTTP requests instead of the JSON events required for deployment to Lambda. This component does not emulate Lambda’s orchestrator, or security and authentication configurations. You can get started by downloading and installing it on your local machine. When the Lambda Runtime API emulator is executed, a /2015-03-31/functions/function/invocations endpoint will be stood up within the container that you post data to it in order to invoke your function for testing.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              aws-lambda-runtime-interface-emulator has a low active ecosystem.
              It has 751 star(s) with 73 fork(s). There are 26 watchers for this library.
              There were 2 major release(s) in the last 12 months.
              There are 26 open issues and 18 have been closed. On average issues are closed in 71 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of aws-lambda-runtime-interface-emulator is v1.12

            kandi-Quality Quality

              aws-lambda-runtime-interface-emulator has 0 bugs and 0 code smells.

            kandi-Security Security

              aws-lambda-runtime-interface-emulator has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              aws-lambda-runtime-interface-emulator code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              aws-lambda-runtime-interface-emulator is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              aws-lambda-runtime-interface-emulator releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 11966 lines of code, 936 functions and 143 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aws-lambda-runtime-interface-emulator
            Get all kandi verified functions for this library.

            aws-lambda-runtime-interface-emulator Key Features

            No Key Features are available at this moment for aws-lambda-runtime-interface-emulator.

            aws-lambda-runtime-interface-emulator Examples and Code Snippets

            No Code Snippets are available at this moment for aws-lambda-runtime-interface-emulator.

            Community Discussions

            QUESTION

            curl: (56) Recv failure: Connection reset by peer aws lambda typescript
            Asked 2022-Mar-06 at 12:10

            I have a small app (just testing it out for now) written in typescript and I would like to deploy to lambda. I have followed the official tutorial for creating lambda container images in AWS official guide. I have only changed the location of the handler to src/index.ts

            When I run curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}' I get curl: (56) Recv failure: Connection reset by peer.

            Dockerfile

            ...

            ANSWER

            Answered 2022-Jan-06 at 12:51

            The problem was that when building the image I mapped port 9000 to 8000 when the container application binds to 8080. It solved the issue by changing:

            Source https://stackoverflow.com/questions/70606685

            QUESTION

            Locally test AWS Lambda container with .NET 5 web api and Lambda RIE
            Asked 2021-Feb-22 at 15:32

            I'm following the instructions to locally test lambda container https://docs.aws.amazon.com/lambda/latest/dg/images-test.html

            but I am unable to do so.

            I've created a sample project to reproduce it https://gitlab.com/sunnyatticsoftware/sandbox/lambda-dotnet5-webapi (see the README for step by step on its generation)

            Basically I am using an Amazon dotnet template that generates an AWS Lambda function as a .NET 5 web api using containers.

            It's all good with the project. The Dockerfile is described as

            ...

            ANSWER

            Answered 2021-Feb-22 at 15:32

            The lambda docker images for dotnet already include the RIE, so it's enough with the following (see repo with further details):

            To build image

            Source https://stackoverflow.com/questions/66316813

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install aws-lambda-runtime-interface-emulator

            There are a few ways you use the Runtime Interface Emulator (RIE) to locally test your function depending on the base image used.
            You can build RIE into a base image. Download the RIE from GitHub to your local machine and update your Dockerfile to install RIE. The script checks for the presence of the AWS_LAMBDA_RUNTIME_API environment variable, which indicates the presence of the runtime API. If the runtime API is present, the script runs the runtime interface client. Otherwise, the script runs the runtime interface emulator. The following example shows a typical script for a Node.js function. #!/bin/sh if [ -z "${AWS_LAMBDA_RUNTIME_API}" ]; then exec /usr/local/bin/aws-lambda-rie /usr/bin/npx aws-lambda-ric else exec /usr/bin/npx aws-lambda-ric fi. To use the default x86_64 architecture ADD aws-lambda-rie /usr/local/bin/aws-lambda-rie ENTRYPOINT [ "/entry_script.sh" ]. To use the arm64 architecture: ADD aws-lambda-rie-arm64 /usr/local/bin/aws-lambda-rie ENTRYPOINT [ "/entry_script.sh" ].
            Create a script and save it in your project directory. Set execution permissions for the script file.
            Download the runtime interface emulator for your target architecture (aws-lambda-rie for x86_64 or aws-lambda-rie-arm64 for arm64) from GitHub into your project directory.
            Install the emulator package and change ENTRYPOINT to run the new script by adding the following lines to your Dockerfile:
            Build your image locally using the docker build command. docker build -t myfunction:latest .
            Run your image locally using the docker run command. docker run -p 9000:8080 myfunction:latest

            Support

            You can use the emulator to test if your function code is compatible with the Lambda environment, executes successfully and provides the expected output. For example, you can mock test events from different event sources. You can also use it to test extensions and agents built into the container image against the Lambda Extensions API. This component does *not emulate *the orchestration behavior of AWS Lambda. For example, Lambda has a network and security configurations that will not be emulated by this component.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/aws/aws-lambda-runtime-interface-emulator.git

          • CLI

            gh repo clone aws/aws-lambda-runtime-interface-emulator

          • sshUrl

            git@github.com:aws/aws-lambda-runtime-interface-emulator.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Cloud Functions Libraries

            Try Top Libraries by aws

            aws-cli

            by awsPython

            aws-cdk

            by awsTypeScript

            chalice

            by awsPython

            amazon-sagemaker-examples

            by awsJupyter Notebook