Closed sergii-mamedov closed 10 months ago
Hi @sergii-mamedov, in #1211 I changed the function name, so now it looks like this:
Regarding having Lambda functions for different environments (production, staging); In most of the backends, like CE, they have the concept of namespace
that can be used for this. In lambda we don't have this, so I was thinking on creating a namesapce
config key in the aws_lamda
section to simulate virtual namespaces and then prefix the function names with it, so that if you set namesapce: prod
, you will see something like: prod-lithops-worker-75h4-302dev0-ae547294ec
. What do you think?
I think this would be the best option considering the limitations of AWS Lambda.
I added the 'namesapce' config key in #1213
I only have one concern. For each new release of the lambda function, I will have a separate Log group in the Cloud Watch. I have already encountered this problem during tests.
Do you mean you will have a separate group because of the Lithops version appearing in the name of the worker function? or is there another reason?
Do you mean you will have a separate group because of the Lithops version appearing in the name of the worker function?
Yes
Of course, I can override the name of the log group, but I have to remember to do it every time.
In this case, I'm not sure if it is a good idea to change and remove the lithops version from the function name. Changing this may introduce inconsistencies, as the current implementation relies on this specific naming convention to detect whether the corresponding worker version is deployed or not. Removing the version from the name has the potential to lead to inconsistencies, as Lithops won't be able to determine which version contains the "function worker" being invoked.
Ok, then I'll manually specify the name of the log group for the lambda function. Thanks a lot.
@sergii-mamedov would a configuration key to specify the log groups to attach the function to solve your issue?
@aitorarjona yes
I usually create names of docker images like
metaspace-aws-lambda:3.0.1
ormetaspace-ibm-ce:3.0.1
where in the tag I store the current version of lithops. I'd like to have full freedom to provide names, butlithops-worker-xxxxxxxx
works fine for me as well. Although I want to have separate lambda functions for different environments (production, staging) so I need to be able to specify this in the function name.