Open DiTo97 opened 2 years ago
If you are using prebuilt images and have this in your Dockerfile FROM public.ecr.aws/lambda/python:3.8
for example
services:
myfunctionname:
Otherwise https://github.com/aws/aws-lambda-runtime-interface-emulator/issues/43 has a pull request which should help you
If you are using prebuilt images and have this in your Dockerfile
FROM public.ecr.aws/lambda/python:3.8
for exampleservices: myfunctionname:
Otherwise #43 has a pull request which should help you
It may sort of solve the issue, but I still think we should have full control on function naming while using RIE the same way we do while deploying on actual AWS environments. Why should any function have a fixed "function" name, or a one time name through env variables, instead of letting us choose?
One of the most cumbersome features while developing a suite of Lambda apps that depend on each other, is that you cannot exactly replicate the cloud behavior with RIE yet. Therefore, you have to resort to developing slightly different code bases, e.g. manually managing the way messages are sent/received, or skipping local development, favouring testing everything that regards Lambda functions inter-communication on a development AWS cloud environment (whose operative lifecycle is significantly slower than local development). All the above assuming being able to replicate cloud behaviour locally is one of the goals of RIE; otherwise, it is all empty talk.
On a side node, the PR you mentioned has been stale for quite some time. Is there any reason why it has not been merged in the code base yet?
Sorry I’m not 100% sure I understand, but when I use FROM public.ecr.aws/lambda/python:3.8
and test locally using the built in RIE I can name the function whatever I want ex: myfunction
. Is that not what you’re trying to do?
As for the PR I have no idea, the maintainers would likely know more
Sorry I’m not 100% sure I understand, but when I use
FROM public.ecr.aws/lambda/python:3.8
and test locally using the built in RIE I can name the function whatever I want ex:myfunction
. Is that not what you’re trying to do?As for the PR I have no idea, the maintainers would likely know more
Not entirely. I am talking about the behavior of the Boto3 package when inside RIE. Suppose you have two Lambda functions, where one of them is supposed to invoke the other using Boto3 when a certain event occurs. You would simply call the invoke
method (or similar) from the appropriate Boto3 client, passing the name of the target function as well as all the necessary parameters. Let's now say that you're trying to test their interaction locally, before actually moving to the cloud. Is there a way to do it with RIE, without having to change any lines of code, i.e., is Boto3 able to invoke a named Lambda function (running locally) when the caller function is run with RIE, by simply providing the function name?
This is what I'm trying to say and, from my experience, the answer is no, but I may very well be wrong on this one, and gladly so.
I hope I've given a clearer explanation.
On a side node, the PR you mentioned has been stale for quite some time. Is there any reason why it has not been merged in the code base yet?
As the creator of the PR I'm keen to get an answer to this question too.
Hi,
I have been using your interface extensively to build a suite of Lambda apps. Our architecture encompasses several Lambda functions, that are supposed to talk to each other via the boto3 Python client. Thus far, I'm handling everything with HTTP ports on localhost, having a slightly different code base from the actual one that will be hosted on AWS.
Is it possible to have named Lambda functions within RIE, in order to use
invoke
calls via the boto3 Python client?