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 — lambda-runtime-init/debugging at localstack · localstack/lambda-runtime-init

Expand file tree

/

debugging

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

debugging

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
build-delve
build-delve
 
 
init/var/rapid
init/var/rapid
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
app.py
app.py
 
 

README.md

Outline

Testing lambda-runtime-init

Testing in isolation

Useful if you want more control over the API between the init and LocalStack (e.g. for error responses)

Debugging with LocalStack

  1. Build init via make build

    • On ARM hosts, use make ARCH=arm64 build because debugging only works with native containers.
  2. Start LocalStack with the following flags:

    LAMBDA_INIT_BIN_PATH=/Users/joe/Projects/LocalStack/lambda-runtime-init/custom-tests/init/var/rapid/init
    LAMBDA_INIT_BOOTSTRAP_PATH=/Users/joe/Projects/LocalStack/lambda-runtime-init/custom-tests/init/var/rapid/entrypoint.sh
    LAMBDA_INIT_DEBUG=1
    LAMBDA_INIT_DELVE_PATH=/Users/joe/Projects/LocalStack/lambda-runtime-init/custom-tests/init/var/rapid/dlv
    LAMBDA_INIT_DELVE_PORT=40000
    LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT=3600
    TEST_DISABLE_RETRIES_AND_TIMEOUTS=1
    
    • LAMBDA_INIT_DEBUG=1|0 enables or disables RIE copying and debugging.
    • LAMBDA_REMOVE_CONTAINERS=0 keeps exited containers
    • Adjust the path to lambda-runtime-init accordingly
  3. Start Delve debugger and connect to localhost:40000

Advice for function configuration

Within create_lambda_function:

  • Increase the timeout=3600
  • On ARM hosts, debugging only works with ARM containers. Use LAMBDA_IGNORE_ARCHITECTURE=1 or explicitly configure the Lambda function with Architectures=[Architecture.arm64]
You are visitor 01402503 — 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.