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.
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인