- Le plus récent
- Le plus de votes
- La plupart des commentaires
These links would also help and give you some ideas:
The filters on the right will help to find a better match here: https://aws.amazon.com/iot/blog/
https://aws.amazon.com/blogs/architecture/category/internet-of-things/aws-iot-analytics/
Hi Ashish. AppSync is one of the major options to consider for real-time applications. That blog and code should be relatively easy to apply to a web application instead of mobile.
One of the main alternatives (for real-time data) to AppSync is to have your application publish and subscribe directly to AWS IoT Core. This is often best achieved using the Amplify pubsub library. You could also use one of the AWS IoT Device SDKs instead. This example uses Amplify and Cognito to authenticate and retrieve credentials, but then the IoT Device SDK to publish and subscribe: https://github.com/aws-samples/aws-amplify-react-iot-pub-sub-using-cp
Thanks Greg_B for your reply. On following the same lines, I found this blog for implementing a React web app to monitor real-time sensor data. https://theskenengineering.com/building-a-react-js-app-with-aws-iot/ I think it mentions the same steps as mentiond in Amplify PubSub tutorial. https://docs.amplify.aws/lib/pubsub/getting-started/q/platform/js/
But I am still not able to see real-time data when publishing from AWS IoT Core test client.
Can you help me with this? Question 1: When we create the policy how do I get the resource arn to be filled in the Resource ARN field?
Question 2: I am getting this error in browser console logs for React app. I think this error comes when IoT Policy is not properly attached. Error: 'AMQJS0008I Socket closed.'
Any guidance on this would be helpful?
Regards, Ashish
Contenus pertinents
- demandé il y a 7 mois
- demandé il y a 6 mois
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 4 ans
- AWS OFFICIELA mis à jour il y a 7 mois
Hi Ashish. The policy in the tutorial has placeholders for the Account ID and region. You can find this information by clicking your IAM user name and region near the top right corner of the screen when in the AWS Management Console. For example, if your region is N. Virginia, then it's us-east-1. Your account ID is a 12-digit number. So the resource ARN ends up looking something like arn:aws:iot:us-east-1:012345678901:*
The policy in the tutorial is very permissive and not intended for production. You should create a least privilege policy in due course: https://docs.aws.amazon.com/iot/latest/developerguide/example-iot-policies.html