AWS Summit Tel Aviv - Enterprise Track - Cost Optimization & TCO
Building IoT TCO calculators on AWS
Transcript of Building IoT TCO calculators on AWS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Building IoT TCO calculators on AWS
G P S T E C 4 1 4
Craig Williams
Principal Solutions Architect, IoT
Amazon Web Service
Agenda
Understanding cost components of an IoT solution
Modeling your solution
Building your pricing spreadsheet
Considerations for SaaS & multi-tenant providers
Hardware considerations
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Components of an IoT solution
Components of an IoT solution
• Hardware costs
• Fixed asset AWS costs
• Amazon EC2
• Always model out a highly available solution
• Databases
• Amazon Aurora, Amazon Redshift
• Analytics
• Amazon SageMaker
• Amazon Kinesis
• Serverless components
• AWS IoT Core, all platform services
• AWS Lambda, Amazon DynamoDB, etc.
How to think about calculating your TCO
• Normalize service pricing
• Break down any service cost to daily cost, per message, per Gb
• Storage costs, Amazon S3 aggregate cost over time
• Don’t include tiering as a buffer for mistakes
• Fixed asset costs
• It’s not linear but try swag a # of devices per allocated instances to calculate cost at scale
• Device modeling vs. AWS IoT Greengrass/Gateway modeling
• Gateways reduces connectivity costs
• Reduce the amount of data sent to the cloud
• Architecture model
• Define how services are used across the solution
• Ultimate goal
• What does it cost per day for a device?
• What does it cost for each message a device sends or receives?
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Building a TCO calculator
TCO spreadsheet
• Summary page
• Not 100% of your data is always processed
• Gateways can process x amount of data locally
• Service costing page
• Pricing normalization
• Architecture page
• How does our solution use services
Amazon S3 Storage
AWS IoT Core
AWS IoT Core
AWS IoT Analytics
AWS IoT Analytics
Summary pageSolution overview – Quick changes
o At-a-glance view of the solution cost
o Allow editing of critical solution
components
o Display serverless, fixed, and aggregate
costs
o Remember to calculate the cost of data storage
over time
o You can model device usage on this
page
o Different from the architecture, this can be how
a device itself is used such as 3 hours per day
Amazon S3 Storage
Service cost pageCost normalization
o Simplify to a daily cost, per message
cost or GB cost
o Cost units
o IoT Example
o $1 / 1,000,000 = $0.0000001 per message
o $0.15 / 1,000,000 = $0.00000015 per rule
(Action cost is the same)
o Amazon S3
o GB cost per day, assuming we store our data
o Fixed cost resources
o Always on monthly cost
o # of devices this can support
Elasticsearch=(0.151*24*2)/E3
Example, cost per device per day …
(Fixed resource)
AWS IoT Analytics
Core
Amazon S3 Storage
Architecture pageDefine service usage in your solution
o Costs are still per message per device
o For each rule there is a rule + action
cost
o Lambda
o Work out average compute time
o Work out memory requirements
Note: Remember to consider batching to optimize your Lambda usage and payload
sizes.
AWS IoT Analytics==((E5*'Summary Page'!B5/1024/1024/1024)*'Service Costs'!B25)*E25
Example, cost per message per device …
(serverless)
AWS IoT Analytics
AWS IoT Core
Example solution
AWS
IoT CoreAWS Lambda
Data source
Data source
AWS Lambda
AWS Lambda Amazon
DynamoDB
AWS IoT
AnalyticsAmazon S3
Amazon S3 Storage
Example solution with gateway
AWS
IoT CoreAWS Lambda
Data source
Data source
AWS Lambda
AWS Lambda Amazon
DynamoDB
AWS IoT
AnalyticsAmazon S3
AWS
IoT Greengrass
Filtering, ML, batching, lower
connectivity costsAmazon S3 Storage
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Optimizing costs
Design considerations
• Batching
• Device to cloud
• AWS IoT Core to other AWS services
• Basic ingest
• Messages are routed directly to rule targets
• Payload sizes
• Billing is in 5k blocks, optimize for this size
• Shadows can be up to 8k and billed in 1k changes
• Use the correct service for ingest
• Not all data belongs on a broker
• Some services are better suited for constant queries
• Amazon DynamoDB vs registry calls vs shadow calls
Optimize payload sizes, downstream
processing
o Batching from device to cloud
o Optimizes the AWS IoT Core
message size
o Optimize the downstream
processing
o Services like Amazon Kinesis will
batch for you
o Execution improvements
o AWS Lambda can work more
efficiently
Buffering/Batching Data
AWS
IoT Core
Amazon
KinesisAWS Lambda
Buffering your data to optimize cost
Data source
Data source
Batch on device
Unpack in Lambda
Use the correct service for ingest and
cost optimization
o Not all data belongs on a broker
o Control is over the broker
o Expensive data such as logs, video,
or images can be sent directly to
streaming services
o Can be more cost effective
o Use credentials provider or TES for
security
Ingest options
AWS
IoT Core
Amazon
KinesisAWS Lambda
High volume telemetry, video, etc.
Two-way control channel, MQTT
Amazon S3
Data source
Data source
Using the best service for your type of data
AWS IoT
Analytics
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hardware costs
Elements of hardware costs
• Cost of development
• Team, balance of experience and new ideas, training, finding the right skills, turnover, recruiting
• Maintenance
• Firmware costs
• OTA vs. Truck roll
• Cloud costs
• Fixed and on-demand
• Customer service
• Optimize by
• Portability across families of product
• Adopt existing platforms
• Partner with Silicon, SI, and OS partners
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Calculator links
Calculator links
• AWS IoT Core calculator – https://aws.amazon.com/iot-core/pricing/
• This is an adjustable spreadsheet you can download
• AWS Lambda calculator – https://s3.amazonaws.com/lambda-tools/pricing-calculator.html
• AWS Pricing calculator – https://calculator.s3.amazonaws.com/index.html
• AWS calculator – https://calculator.aws
• TCO calculator template – https://iotcalculator.s3.amazonaws.com/iottco.xlsx
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Craig Williams
[email protected]://www.linkedin.com/in/typemismatch/@manicasteroid
Please complete the session survey in the mobile app.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.