GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - driverpt/aws-lambda-runtime-simulator

BranchesTags
Open more actions menu

Latest commit

 

History

46 Commits
46 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
cmd/simulator
cmd/simulator
 
 
pkg
pkg
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
lambda-runtime-simulator.iml
lambda-runtime-simulator.iml
 
 

Repository files navigation

Workflow "Buy Me A Coffee"

aws-lambda-runtime-simulator

⚠️ This Software is meant only for local testing purposes ⚠️

  1. Use it at your own risk
  2. Contributions Accepted

Why was this project created?

I develop a lot of projects using AWS Lambda, and one of my biggest frustrations is the fact that it's not possible to Test End-To-End the Lambda call (e.g.: Simulate the real Lambda Call). Currently, AWS provides a Lambda Runtime Interface Emulator for testing purposes, but you're required to create a Docker Image and wrap your "executable" into the Container Entrypoint. The goal of this is to use TestContainers and just start your lambda Handler with AWS_LAMBDA_RUNTIME_API pointing to this container.

How to use

This package is also available as Docker Container.

TL;DR

docker run -p 8080:8080 -d driverpt/aws-lambda-runtime-simulator

Start your handler by setting AWS_LAMBDA_RUNTIME_API Env Var to localhost:8080

Send invocations

curl -X POST localhost:8080/invocation -d <Invocation Payload>

Will return something like

{
  "InvocationId": "<UUID>"
}

Access invocation result with

curl localhost:8080/invocation/<InvocationId>

Additional options

If you do not want to use Docker Container, go to the Releases Page and download the proper package for your System Arch.

Configurations

Everything is configured via environment variables

SERVER_PORT=<NewServerPort> # Defaults to 8080
FUNCTION_TIMEOUT=<FunctionTimeoutInSeconds> # Defaults to 120, simulates Timeouts
ARN=<LambdaArn> # AWS Lambda ARN that you want in the HTTP Headers
LOG_LEVEL=<LogLevel> # Log verbosity, defaults to INFO

Limitations

This only simulates AWS Lambda Runtime API Calls, does not simulate Lambda Interruptions. If you need to simulate interruptions, I strongly recommend using official Lambda Runtime Interface Emulator

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

5 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.