Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Andrew Warzon's presentation from AWS Chicago: "Serverless IoT Deep Dive"

317 views

Published on

Andrew Warzon
This presentation was given at the AWS Chicago user group event on 22 March 2017 on the Internet of Things (IoT)
https://www.meetup.com/AWS-Chicago/events/237737145/

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Andrew Warzon's presentation from AWS Chicago: "Serverless IoT Deep Dive"

  1. 1. Serverless IOT Deep Dive
  2. 2. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Serverless == ?
  3. 3. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Let’s Get Building
  4. 4. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com
  5. 5. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Your Inventory
  6. 6. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com AWS Platform (aka Serverless) Services Step Functions DynamoDB Streams Athena SQS ...
  7. 7. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Make Building Easier
  8. 8. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Serverless Framework + IOT
  9. 9. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com IOT Event Support
  10. 10. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Arbitrary CloudFormation in Serverless
  11. 11. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Other Building Tips ● Offline Testing Not Really Possible ● Automated Testing for IOT Rules ● MQTT Client in AWS Console
  12. 12. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Design Patterns
  13. 13. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Components of an AWS IOT System Control Plane ● Thing Security ● Thing Metadata ● Provisioning ● Claiming ● Firmware Updates Data Ingestion Data Storage Data Processing API To Front End
  14. 14. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Data Ingestion Options $5/million messages Cheap, except when it’s not Other options... Kinesis Streams Kinesis Firehose S3 (When you have the resources on your thing…) * Message size increment is a 512-byte block of data DynamoDB
  15. 15. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Queue at Serverless → Server-full Points Bottleneck
  16. 16. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Firmware Updates "firmware": { "version": "1.0.1", "urlForNewFirmware": "https://presignedS3URL" }
  17. 17. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com More About Shadows Data Flow $aws/things/{ThingName}/shadow/update/accepted /update/rejected /update/delta /update/documents /get/accepted /get/rejected /delete/accepted /delete/rejected MQTT or REST /update /get /delete Desired, Reported, & Delta States { "state": { "desired": { "color": "RED", "state": "STOP" }, "reported": { "color": "GREEN", "engine": "ON" }, "delta": { "color": "RED", "state": "STOP" } } } Metadata Versioning Timestamps
  18. 18. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Republish SQL Sql: Fn::Sub: > SELECT get_thing_shadow(topic(3), '${GetThingRole.Arn}').state.reported.picturesTaken + 1 AS state.reported.picturesTaken FROM 'increment/picturesTaken/+' Actions: - Republish: Topic: $$aws/things/${topic(3)}/shadow/update RoleArn: { "Fn::GetAtt": [ "IAMRoleGetPublishThingShadow", "Arn" ]} Device Updates Shadow IOT SQL Manipulates Shadow Data IOT Republish Action Updates Shadow
  19. 19. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Bonus Tips
  20. 20. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Bonus Tips ● Last Will & Testament ● Lifecycle Events ● CloudWatch Events ● Web Sockets
  21. 21. @2017 Trek10 – All Rights Reserved | 506 W. South St, South Bend, IN 46601 | info@trek10.com | (888) 736-2446 | www.trek10.com Thank You! Andy Warzon Trek10 awarzon@trek10.com

×