プロビジョニングモードの Kinesis Streams を利用する際のシャード数の見積もり方法は、ドキュメントに記載されています。
With the provisioned mode, you must specify the number of shards for the data stream. To determine the size of a data stream with the provisioned mode, you need the following input values:
- The average size of the data record written to the stream in kilobytes (KB), rounded up to the nearest 1 KB (
average_data_size_in_KB
).- The number of data records written to and read from the stream per second (
records_per_second
).- The number of consumers, which are Kinesis Data Streams applications that consume data concurrently and independently from the stream (
number_of_consumers
).- The incoming write bandwidth in KB (
incoming_write_bandwidth_in_KB
), which is equal to theaverage_data_size_in_KB
multiplied by therecords_per_second
.- The outgoing read bandwidth in KB (
outgoing_read_bandwidth_in_KB
), which is equal to theincoming_write_bandwidth_in_KB
multiplied by thenumber_of_consumers
.You can calculate the number of shards (
https://docs.aws.amazon.com/streams/latest/dev/how-do-i-size-a-stream.html#provisionedmodenumber_of_shards
) that your stream needs by using the input values in the following formula.number_of_shards = max(incoming_write_bandwidth_in_KiB/1024, outgoing_read_bandwidth_in_KiB/2048)