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
asked 3 years ago625 views
2 Answers
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
answered 3 years ago
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.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions