-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emulate Development with lambda runtime interface emulator #19
Comments
You don’t need the emulator. Just run your http server locally, test and debug using existing tools normally. When you are ready to deploy, add the adapter to your container as an extension. That’s all you need to do.
|
Hi Harold, Thank you so much for your response. I understand that the adapter could work transparently, but for our pipeline, we would have the opportunity to do some tests on the local environment without making Deploy. Today we use serverlessish, and we want to migrate to lambda-adapter because the code is well sustained and robust. We want to maintain our pipeline from development to production with local tests through the emulator for simulating some events coming from APIGW or ALB, for example. Below I'll share my docker file, entry-point file, and one main.go file with a simple http-server to understand how we are working today. I'll be very grateful if you could suggest or advise how to use the emulator with lambda-adapter. Tks. Dockerfile
entry.sh
maing.go
|
I see. Let me check how to do this. |
The Dockerfile needs a bit of changes. Here is the updated version. But I discovered an issue awslabs/aws-lambda-rust-runtime#365 with aws rust runtime that breaks this emulation. This issue is fixed in aws rust runtime v0.5.0 release a few days ago. I will update the adapter to use that version and release a new version.
|
Great! Thank you very much! I'll do new test as soon you release adjustments. |
Hi, did you have any idea when this improvement could be made? is necessary only update lambda runtime package in cargo to use new package or is necessary make changes on code? |
It's not a simple update. Rust Runtime 0.5.0 has major breaking changes. I'm working on it. Hopefully to get the new release out soon. |
@jpaulolins I just released Adapter v0.3.0. Could you check if the new version solve this issue? |
@jpaulolins I will close this issue for now. If you still see issues, please reopen this one. |
Hi Guys,
I'm trying to emulate lambda in a local development environment using lambda runtime interface emulator[1]. When making the invocation to lambda runtime, the adapter attempts to find something on /var/task instead of passing the event request to my HTTP daemon running at the same container.
I tried to create /var/task/ into the container. After that, the adapter tried to find a bootstrap script without success.
I started my daemon and runtime emulator using bash script in the ENTRYPOINT container.
Any idea how I can use lambda runtime to test lambda in a development environment without deployment?
Regards.
[1] - https://github.com/aws/aws-lambda-runtime-interface-emulator
The text was updated successfully, but these errors were encountered: