Mais conteúdo relacionado Semelhante a Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit (20) Mais de Amazon Web Services (20) Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Connecting your devices at scale,
ft. Discovery
S V C 2 0 5
Adam Chugg
Sr. Solutions Architect
Amazon Web Services
Igor Brezac
Chief Systems Architect
Discovery, Inc.
Wayne Cheng
Engineering Manager
Discovery, Inc.
Gene Ting
Sr. Solutions Architect
Amazon Web Services
2. If you knew the state of everything and could
reason on top of that data…
what problems would you solve?
3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS IoT customers solve problems in all sectors
4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Device fleet maintenance Energy efficiency
monitoring
Safeguard manufacturing
facilities
Payment, insurance, and
connected commerce
Predictive maintenance Wellness and
health solutions
Connected buildings
and city systems
Productivity and process
optimization
What customers are doing with AWS IoT
6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Revenue growth
IoT data drives business growth
Operational efficiency
IoT data decreases OpEx
New services &
business models
Products that get
better with time
Better relationship
with customers
Increased
efficiency
Intelligent
decision-making
Data driven
discipline
Business outcomes with IoT
7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Connect, communicate,
secure
Onboard,
provision,
manage
Devices &
sensors
Connectivity &
infrastructure
Analyze,
visualize,
act
Analytics &
insights
Engage,
empower,
delight
Applications &
services
Transform,
shift culture
Change
management
IoT solutions are complex & multidimensional
8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS IoT architecture
10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS IoT architecture
11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
IoT virtuous cycle
12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
How can I connect my devices
securely and handle the data
they generate at scale?
13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
To securely connect devices to
the AWS Cloud & other
devices at scale
To fully integrate with other AWS
services to reason on top of the
data
(analytics, databases, AI, etc.)
To route, process, and act
upon data from connected
devices
AWS IoT Core is a managed service that lets connected devices easily
and securely interact with cloud applications and other devices
To enable applications to
interact with devices even
when they are offline
AWS IoT Core
14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Device
gateway
Rules
engine
Message
broker
Device
shadow
Registry
Identity
service
AWS IoT Core
Manage
authorization
of devices &
provision unique
identities at scale
Fully manage
connectivity optimized
for
IoT workloads
Define and catalog
device for easy use by
AWS services
Understand and
control the status of
your device at any
time
Reliable and fast
communication
across your
IoT fleet
Ingest large amounts of
IoT data at a low cost,
pre-process it, and make
it available to 10+
services for analytics,
reporting, and
visualization
15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Identity service
SigV4
X.509
Custom auth
tokens
Manage authorization of devices and
provision unique identities at scale
Bring your own root CA and client certificates,
or let AWS IoT Core generate certificates for you
Automatic device provisioning
with just-in-time registration
Supports SigV4, X.509, and token-based
authentication (via custom authorizers)
Flexible and fine-grained access control with
IoT policies
Policies can be associated with identities or registry items
Can control access all the way down to the MQTT topic
level
16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Device gateway
Fully manage connectivity
optimized for IoT workloads
Support for multiple protocols
including MQTT, WebSockets, HTTP
Secure communications over
TLS 1.2
Optimizations for constrained devices
ECC key exchange and certificates
17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Reliable & fast communication
across your IoT fleet
Two-way message streaming between
devices and applications
Message queuing for offline devices
Publish/subscribe for decoupled devices
and applications
Support for QoS0 and QoS1 messaging
Customizable topic space with support for
wildcard topic filters
Message broker
18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Ingest large amounts of data at a
low cost, pre-process it, and make it
available to 10+ services for
analytics, reporting, and
visualization
Transform—built-in functions for math, string
manipulation, dates, etc.
Filter—use the WHERE clause to capture only the
data you want
Enrich—bring in context from the device shadow and
Amazon Machine Learning or from external sources
via inline AWS Lambda execution
Route—send your data to over 10 AWS services and
third-party services like Salesforce, HERE, etc.
Analytics
Kinesis
Amazon ES
IoT Analytics
Database
DynamoDB
Manage
CloudWatch
Compute
Lambda
Application Integration
SNS
SQS
Step Functions
Rules engine
19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Understand and control the status of
your device at any time
Reporting the last known state of the device; e.g.,
the last known color of the light bulb is red
Changing the state of the device; e.g., change the
color of the light bulb to blue
Real-time notification of state changes
using MQTT
Asynchronous communication with offline devices
Device SDK integration for easy implementation
on devices
REST APIs for applications to interact with devices
Device shadow
APIs
20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Define and catalog device for
easy use by AWS services
Simple searches (e.g., which devices
were made in 2010?)
Defining ThingTypes (e.g., a Honda
and a Toyota are of the ThingType
car) to enable standardization of
attributes and policies across devices
Defining Groups (e.g., sensors in
a car) to enable simpler management
(running jobs, setting policies, etc.)
Static data
Serial #, metadata, etc.
Registry
21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Problem
A large number of people trying out the new connected
Roomba vacuums resulted in large volumes of traffic
through the iRobot HOME App, the mobile app that
customers use to set up and control their connected
robots. In other words, iRobot, which had so far operated
primarily as a hardware vendor, was about to bet its central
line of business on its ability to run a high-availability,
customer-facing cloud application and an Internet of Things
(IoT) backend platform.
Solution
By using a serverless architecture based on AWS IoT Core
and AWS Lambda, iRobot is able to keep the cost of the
cloud platform low, avoid the need for subscription
services, and manage the solution with fewer than 10
people. AWS IoT Core, which can process trillions of
messages between billions of devices and AWS or other
endpoints, provides the connectivity layer between the
robots and the iRobot cloud platform.
22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS IoT Partner Network
Edge
Silicon OEM ODM/CM
Connectivity
Gateway Network/Carrier
Solution
ISV Regional SI Global SI
We build IoT solutions through our partners
23. Now that you can know the state of
everything and can reason on top of that
data…
what problems will you solve?
24. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
About the Direct to Consumer team
• Globally distributed team
• Responsible for a diverse set of Discovery applications
• Large-scale operation
• 6,500 average events per second
• 1M+ daily hours watched
• 2M daily videos watched
27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
What problem are we trying to solve?
• Platform fragmentation; it takes several months to implement a partner SDK
• Partner integrations should only happen once
• Security and legal compliance
• Support devices where third-party SDKs are not available
• Observability
• Consistent application monitoring and alarming
• Capture events from all applications in a consistent way
28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Server-to-server integration and AWS IoT
• Leverage AWS managed platform, since our team is small
• Entire platform can be orchestrated via AWS CloudFormation
• IoT is built to be scalable with high throughput
• Built-in event multiplexing with IoT rules
• Tightly integrated with Amazon S3, Amazon SQS, Amazon Kinesis, and other
AWS services
• Data on Amazon S3 is query-able using Amazon Athena and AWS Glue
29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Benefits for Discovery
• Partner integration timeline went from 2 months to 2 weeks
• Versioning
• Direct relevant data to consumers
• Extremely low maintenance
• Scalable
• Ability to monitor and alert on application-level metrics
• Query data
30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Architecture diagram
31. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example event
{
"action": "view",
"type”: "show",
"version": 1,
"timestamp": "2019-06-
20T00:00:25.109Z",
"platform": "desktop",
"network": "animalplanet",
"data": {
"url": "www.animalplanet.com/tv-
shows/tanked/",
"id": "abc123”
},
"browser": {
"name": "Chrome",
"version": "75.0.3770.80"
},
"os": {
"name": "macOS",
"version": "10.12.6"
},
"uuid": "3cc7a38c-c628-463e-b3b8-
cdfe6eeaa52a",
"client_ip": "1.2.3.4",
"userAgent": "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10_12_6)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/75.0.3770.80 Safari/537.36"
}
32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Decide on an AWS IoT topic format
Topic format: version/network/platform/type/action
Example: 1/animalplanet/desktop/view/show/#
33. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Publish onto AWS IoT example
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient
iot = AWSIoTMQTTClient("myClientID")
iot.configureEndpoint("example-ats.iot.us-east-1.amazonaws.com", 8883)
iot.connect()
iot.publish("1/animalplanet/desktop/view/show", exampleJSON, 0)
34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Add IoT rules and actions
Example IoT rule for events that are from
• Version 1
• The Animal Planet network
• Android users
• Viewing a show page
35. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Add IoT rules and actions
{
"ruleArn": "arn:aws:iot:us-east-1:12345:rule/animalplanet_android_view_show_events",
"rule": {
"sql": "SELECT * FROM '1/animalplanet/android/view/show/#'",
"actions": [
{
"sqs": {
"roleArn": "arn:aws:iam::12345:role/iot-publisher-role",
"queueUrl": "https://sqs.us-east-
1.amazonaws.com/12345/animalplanet_android_view_show_events_sqs"
}
}
],
"awsIotSqlVersion": "2015-10-08"
}
}
36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Add IoT rules and actions
Rule for events that are
• Version 1
• On the Animal Planet network
• All platforms
• Any view event
37. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Add IoT rules and actions
{
"ruleArn": "arn:aws:iot:us-east-1:12345:rule/all_animalplanet_view_events",
"rule": {
"sql": "SELECT * FROM '1/animalplanet/+/view/#’”,
"actions": [
{
"sqs": {
"roleArn": "arn:aws:iam::12345:role/iot-publisher-role",
"queueUrl": "https://sqs.us-east-
1.amazonaws.com/12345/all_animalplanet_view_events_sqs"
}
}
],
"awsIotSqlVersion": "2015-10-08"
}
}
38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Consume event from Amazon SQS
Use cases
• Enrich event data
• Google Analytics for analytics team to create insights
• Machine learning platforms to provide recommendations
• Observability
• Business intelligence
39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Future plans
• Global deployment
• More events from more sources
• More partners
• As the event volume grows, optimize for cost
40. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Thank you!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Adam Chugg
Sr. Solutions Architect
Amazon Web Services
Igor Brezac
Chief Systems Architect
Discovery, Inc.
Wayne Cheng
Engineering Manager
Discovery, Inc.
Gene Ting
Sr. Solutions Architect
Amazon Web Services