Closed vigneshtdev closed 11 months ago
Hey @vigneshtdev - I believe you are referring to local testing of the RIC not working and this would be because of a missing Runtime API Server when you're trying to run the function. For local testing scenarios, I'd recommend having a look at the AWS Documentation on Testing Lambda container images locally with the Runtime Interface Emulator.
Does the image run successfully when invoked within Lambda?
I wonder if someone can understand Runtime - Runtime API - Runtime API Emulator - RIC - etc combination AWS Lambda very easy to understand in promo but very hard to work :( Im trying to test very simple task last three days. Without AWS Lambda I can do this in a few minutes.
@carlzogh Maybe you can give me a peace of advice how to do this shortly?
@vigneshtdev @carlzogh @alexey2baranov anybody managed to solve this? Facing the same problem
@umarta85 no :(
@alexey2baranov Sad to hear that..
Facing the same issue
I just hit this too. Looking at the code, it appears that it is expected for you to define an environment variable called "AWS_LAMBDA_RUNTIME_API" for the npm library:
These lines have been in the code for over 2 years, yet the examples in the README don't show this value being set in either the Dockerfile or specified in the example for running the image locally, so perhaps those instructions need an update.
This env var is mentioned on the following page for "Using AWS Lambda environment variables" as meaning "The host and port of the runtime API": https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
I haven't quite figured out what the expectation is here, but will update if I figure something out...
These examples helped me a lot:
Hi, In our README we have a section about local testing.
There are multiple ways to test a Lambda container image locally. They are described in more detail here: https://docs.aws.amazon.com/lambda/latest/dg/images-test.html#images-test-alternative
Here's my docker file
app.js