Gavin Lewis
1 min readJun 5, 2019

Hi Vladyslav,

It depends on how you look at it — yes it is expensive when you’re looking at 10s of thousands of devices, but when you break it down the cost per device for the API Gateway component is relatively small. Let me provide an example (and hope my maths is correct!).

If we have 10,000 devices set up to transmit once per minute each (which is extremely frequent for a LoRAWAN device), we’re looking at:

  • 600,000 transmissions per hour
  • 14,400,000 transmissions per day
  • 432,000,000 transmissions per month

Let's say each response is also 1KB in size, so 432GB of data per month.

API Gateway: (432,000,000 / 1,000,000) * 3.50 = $1512
Data Transfer: 432 * 0.09 = $38.88
Total: $1550.88

If we divide that by our 10,000 devices, the API Gateway component is around $0.16 per device. Given most clients would be paying upwards of $10 per device per month, it’s a small percentage.

In terms of using the device Id as the partition key — the thought behind this was so when you have multiple shards in use, if you have sequential data going to multiple different shards for the same device, a less busy shard could be consumed from faster than a busy shard, which means your data is consumed out of order. By using the device Id as the partition key, in theory, data relating to a device should go via the same shard and then processed in order by the Kinesis consumers.

Hope this helps!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Gavin Lewis
Gavin Lewis

Written by Gavin Lewis

Passionate about building and delivering solutions in the Cloud! Principal Cloud Architect @ Rapid Circle. Views are my own.

No responses yet

Write a response