- Newest
- Most votes
- Most comments
I found the answer by myself. As mentioned the AWS doc user has to create their own version of runtime interface client if aws doesn't provide a runtime interface client.
https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-ric
To deploy a function with custom runtime as image user has to run the runtime interface client code. This code has to invoke the APIs mentioned in the AWS doc.
https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-ric
The order is:
- invoke
/runtime/invocation/next
API - get the event and context response from the above API
- get the request ID from the above API and forward the request to actual handler function
- on successfully completing the function
- invoke
/runtime/invocation/AwsRequestId/response
API with the request ID that we got from step 3
All these steps has to inside a endless loop.
In the if there's chance for initialisation error or invocation error invoke following API from your code.
/runtime/init/error
/runtime/invocation/AwsRequestId/error
You can read the blog New for AWS Lambda – Container Image Support which walks through creation process including local testing using Lambda Runtime Interface Emulator
More details at Working with Lambda container images. Runtime interface clients (RIC) are available for several languages. Since yours is not supported, you have to create your own. RIC source codes are available from GitHub for Python and Node
Relevant content
- asked 6 months ago
- asked 3 months ago
- Accepted Answerasked 6 months ago
- AWS OFFICIALUpdated 17 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
Hi @Mike thanks for your response. I read the article you shared. However it didn't answer what I was expecting. Like the second example in the article you shared shows steps to use python custom runtime using the runtime api client provided by aws "awslambdaric". The runtime I intent to use doesn't have a runtime interface client provided by AWS. I have to create my own but the problem is there is no detailed doc on implementing that. Can you share which API should I can and in which order.