Lambda alias and deployments

0

Hi,

We are starting to use greengrass for our home automation device. I have a question regarding lambda version and the group deployment. I have associated the lambda to the core using an alias ("production" in our case). If I change the alias version number, do I have to create a deploy for each group? Can be this done automatically when I change the alias version number or do we have to create a script that creates a deployment for each group? And in this case, how can I understand which version of the lambda is deployed into the device without ssh into it? Because from the group and core the only thing I can see is the alias and not the associated version number.
For me makes a lot of sense to use an alias for each lambda. In this case we could create an alias "testing" to try new lambda version. But if the deployment is not done automatically and there is not way to see which version number is actually deployed to the device, I cannot see how it can be useful.
Maybe is just a matter of configuration that I have missed. I'm open to any suggestions.
I hope I have well explained my doubts.
Thank you very much for the replies!
Pier

piergre
preguntada hace 3 años635 visualizaciones
2 Respuestas
0

Hi piergre:

We are happy to help you.

Question 1: If I change the alias version number, do I have to create a deploy for each group? Can be this done automatically when I change the alias version number or do we have to create a script that creates a deployment for each group?

Answer 2: Usually we point lambda alias to a lambda version, then that means whenever you create a new version of lambda(even through you have created a alias before), you still need to point your alias to your very last lambda version in lambda console and creates a deployment for each group.

Question 2:how can I understand which version of the lambda is deployed into the device without ssh into it

Answer 2: If you use a alias version, then without ssh into device, you can navigate to Greengrass console(IoT Core -> Greengrass on left panel -> Groups -> select <your_group> -> deployment -> lambdas)to check the alias version, but you will not see the version that this alias is pointing to, you have to go to lambda console to check which version this alias is pointing to now.

Thanks

AWS
respondido hace 3 años
0

To add to the answer for question 1, yes you do need to re-deploy the associated greengrass groups if you change the version number for a certain alias. Re-deploying the group will copy the new lambda function onto the edge device. If you do not re-deploy, it will continue using the version number that you used during the last deployment.

respondido hace 3 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas