Skip to content

Instantly share code, notes, and snippets.

@brianfoody
Created October 28, 2022 07:14
Show Gist options
  • Save brianfoody/2c62cecc912dbd97bc759eba427e84cf to your computer and use it in GitHub Desktop.
Save brianfoody/2c62cecc912dbd97bc759eba427e84cf to your computer and use it in GitHub Desktop.
Example GPT-3 cost calculator
# Prompt AWS Pricing for IOT Core Example
Pricing example for a workload using all AWS IoT Core components
You have 100,000 devices that maintain a constant connection to AWS IoT Core for 30 days in the Europe (Ireland) region. Each day, each device sends 325 messages of 1 KB in size. Of the 325 messages sent per device each day, 100 trigger a Device Shadow update and 200 trigger a rule that executes one action. Your charges would be calculated as follows:
Connectivity Charges
Minutes of connection = 100,000 connections * 60 minutes/hour * 24 hours/day * 30 days = 4,320,000,000 minutes of connection
Connectivity charges = 4,320,000,000 minutes of connection * $0.08/1,000,000 minutes of connection = $345.60
Messaging Charges
Messages = 100,000 devices * 325 messages/device-day * 30 days = 975,000,000 messages
Messaging charges = 975,000,000 messages * $1.00/1,000,000 messages = $975.00
Device Shadow & Registry Charges
Device Shadow requests = 100,000 devices * 100 requests/device-day * 30 days = 300,000,000 requests
Device Shadow size is less than 1 KB, so it is rounded up to the nearest KB (1 KB)
Device Shadow charges = 300,000,000 requests * $1.25/1,000,000 operations = $375.00
Rules Engine Charges
Rules triggered = 100,000 devices * 200 rules triggered/device-day * 30 days = 600,000,000 rules triggered
Actions executed = 600,000,000 rules triggered * 1 action executed/rule triggered = 600,000,000 actions executed
Rules triggered charges = 600,000,000 rules triggered * $0.15/1,000,000 rules triggered = $90.00
Actions executed charges = 600,000,000 actions executed * $0.15/1,000,000 actions executed = $90.00
Total Rules Engine charges = $90.00 + $90.00 = $180.00
Total Workload Charges
Total charges = $346.60 + $975.00 + $375.00 + $180.00 = $1,876.60
# Question: How much would it cost to have 50 devices that maintain a constant connection to AWS IoT Core for 365 days in the Europe (Ireland) region with each device sending 2.5 KB per second. There are no device shadow updates or rules. What would my charges be?
Connectivity Charges
Minutes of connection = 50 connections * 60 minutes/hour * 24 hours/day * 365 days = 525,600,000 minutes of connection
Connectivity charges = 525,600,000 minutes of connection * $0.08/1,000,000 minutes of connection = $42.05
Messaging Charges
Messages = 50 devices * 2.5 KB/device-second * 60 seconds/minute * 60 minutes/hour * 24 hours/day * 365 days = 1,814,400,000 KB
Messaging charges = 1,814,400,000 KB * $1.00/1,000,000 KB = $2,805.43336
Device Shadow & Registry Charges
Device Shadow requests = 0
Device Shadow charges = 0
Rules Engine Charges
Rules triggered = 0
Actions executed = 0
Rules triggered charges = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment