Alternatives to using AWS IoT in US-West-2 connecting to AWS Lambda in US-West-1

101 Views Asked by At

I have hosted IoT in USW2 because USW1 doesnt have IOT support. I created a rule to call with a trigger to call a lambda in USW1.

I followed https://aws.amazon.com/blogs/iot/access-cross-account-resources-using-aws-iot-rules-engine/ but instead of using a cross account ID, i typed in the same account ID so that i just calls the other region. This failed with 404. I dont see a straight forward way of passing my MQTT messages to my computer cluster in USW1. Is there a workaround here.

2

There are 2 best solutions below

0
John Veldboom On

Sounds like you may have your account numbers mixed up.

The basic flow is:

  • IoT rule from your USW2 account forwards messages to a Lambda function in your USW1 account
  • Function in USW2 needs to have permission to be invoked by the USW1 rule
0
Aleksiej On

The cross account lambda execution from IoT rule does work, but the rule and lambda need to be in the same region.

So in your case you'd have

USW2 (IoT) -> USW2 (Lambda) -> ... -> USW1