AWS IoT Core Integration in Mobile IoT App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
AWS IoT Core Integration in Mobile IoT App
Medium
~3-5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

AWS IoT Core Integration in Mobile IoT Applications

AWS IoT Core — managed MQTT broker with X.509 certificate authentication, access policies via AWS IAM/IoT Policies, and ability to scale to millions of devices. Integrating it into mobile app isn't hard but has several places where almost everyone makes mistakes.

Authentication: What to Choose for Mobile Client

AWS IoT Core supports three auth methods for mobile: X.509 certificates, AWS Cognito Identity Pools, and SigV4. Certificates are for devices, not mobile apps: storing private key in app is unsafe, rotation is complex.

Right path for mobile clients — Cognito Identity Pool + IoT Core. User logs in via Cognito User Pool (or federated auth via Google/Apple), gets temporary AWS credentials via AssumeRoleWithWebIdentity, and already with these credentials connects to IoT Core via aws-iot-device-sdk or native MQTT over WebSocket.

On Flutter use amplify_auth_cognito for auth and mqtt_client with custom WebSocket endpoint:

wss://[endpoint].iot.[region].amazonaws.com/mqtt

Sign WebSocket Upgrade request via SigV4 — headers X-Amz-Security-Token, X-Amz-Date, Authorization. aws_common from Amplify SDK knows how to do this.

On React Native — AWS Amplify with @aws-amplify/pubsub, which under the hood uses MQTT over WebSocket with automatic SigV4 signing.

IoT Policies: Where Rights Are Cut

IoT Policy is separate from IAM. Even if Cognito role has iotdata:Publish, without IoT Policy on iot:Publish for specific topics requests return 403. Typical policy for mobile client:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["iot:Connect"],
      "Resource": "arn:aws:iot:region:account:client/${cognito-identity.amazonaws.com:sub}"
    },
    {
      "Effect": "Allow",
      "Action": ["iot:Subscribe", "iot:Receive"],
      "Resource": "arn:aws:iot:region:account:topicfilter/home/${cognito-identity.amazonaws.com:sub}/*"
    },
    {
      "Effect": "Allow",
      "Action": ["iot:Publish"],
      "Resource": "arn:aws:iot:region:account:topic/home/${cognito-identity.amazonaws.com:sub}/*"
    }
  ]
}

${cognito-identity.amazonaws.com:sub} — policy variable substituting Cognito Identity ID. Each user sees only their devices. Standard multi-tenant IoT pattern.

Device Shadow: State Without Persistent Connection

AWS IoT Device Shadow — key feature for mobile apps. Device can be offline but Shadow stores its last known state. Mobile client writes to desired, device reads on reconnect and updates reported.

In practice: user turned off light via app. Command goes to Shadow desired. Device was offline 10 minutes — on reconnect read delta and executed. Without Shadow would need maintain command queue yourself.

For reading Shadow from mobile — REST API or MQTT topics $aws/things/{thingName}/shadow/get. Update — publish to $aws/things/{thingName}/shadow/update with {"state": {"desired": {"power": "OFF"}}}.

Rules Engine for Notifications

AWS IoT Rules trigger Lambda, SNS, SQS by conditions from MQTT. For push: IoT Rule → Lambda → SNS → Firebase Cloud Messaging / APNs. Cleaner than keeping persistent MQTT connection only for notifications.

Typical Problems

Reconnect storm: 1000 devices reconnect simultaneously after network failure → IoT Core throttling → avalanche of errors. Solution: exponential backoff with jitter in client code, mqtt_client doesn't do it automatically — implement yourself.

Endpoint throttling: iotdata endpoint limits to 20 transactions per second per account by default. For production loads request limits via AWS Support beforehand.

Process and Timeline

Cognito + IoT Core + IoT Policies + basic integration setup — 1–2 weeks. Device Shadow, Rules Engine, notifications — another 1–2 weeks. Full integration with real devices and load testing — 4–6 weeks. Pricing calculated after assessing device count and message frequency.