Issues in adding Lambda as actions to an IoT routing rule

0

My ioT rule was using Lambda $LATEST version as action. I created a new version and alias for the same lambda. Now, I wanted to point the IoT rule action to point to the alias of my lambda.

Problems/Bugs:

  1. In IoT console, the edit page for IoT rule doesn't allow option to select an alias of the lambda as actions.
  2. Used Lambda console's alias page to create a trigger to the existing IoT rule. Now issue is my IoT rule had two lambda actions and thus needed to delete one. No option for deleting the individual action. You can edit the rule as a whole but issue in that is when you save the role, it updates your lambda action to default version i.e. $LATEST because no option to select an alias.
  3. Falling to AWS CLI, even IoT rule CLI supports only replacing the existing IoT rule and its actions but no update/addition can be done to the existing Actions in the current rule.
  4. Even using the replace-topic-rule from CLI doesn't help. Because IoT rule replacement takes lambda ARN for actions. When executed, the changes are reflected in IoT console but somehow action doesn't get executed when rule is triggered. Also, when a lambda action is added for an IoT rule via CLI, it should reflect the same on the Lambda console, which it does when same change is applied via IoT console.
  5. When an IoT rule trigger is deleted from lambda console Triggers, IoT rule doesn't reflect the updates.
  6. Lastly, No AWS CLI to add trigger to a given lambda. Event-source-mapping doesn't support IoT rule.

A way around:

  • Goto lambda alias and create a new trigger from Lambda console and go with creating a new IoT rule instead of using an existing rule. Disable or delete the old rule.
No Answers

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