Lets say I want to have a staging environment and a production environment. The application works by adding topic rules and processes the ingest with AWS lambda.
What is the best way to have multiple environments in AWS IoT Core?
I thought about doing this:
- Set up two accounts (not possible in my project)
- Split environments by topic prefix like
dev/*orprod/*- Means the device needs to know in advance where it belongs to
- Add devices to a group and do rule based filtering
- Is there any guidance how to do this? I know I can call a lambda function, but this seems a bad idea. It would be great to have a group based filter but afaik there is no access to the device`s groups or properties right now
I would strongly prefer 3. as it allows me to also use production devices for testing. 1. and 2. are alright but not very flexible.
Maybe there are some best practices?