【发布时间】:2016-12-29 10:37:22
【问题描述】:
我正在尝试在 AWS Kinesis 中实现动态分片。我创建了一个示例 python 脚本来更新 kinesis 流中的分片计数,使用 Boto3 库将 python 与 AWS Kinesis 连接。
但是当我使用 update_shard_count 方法时,它会给出 Kinesis object no attribute update_shard_count 错误。
import boto3
client = boto3.client('kinesis',region_name='us-east-1')
response = client.update_shard_count(
StreamName='xyzstream',
TargetShardCount=2,
ScalingType='UNIFORM_SCALING' )
Traceback(最近一次调用最后一次):文件“”,第 1 行,in AttributeError:“Kinesis”对象没有属性 'update_shard_count'
那么我如何使用 API 更新 kinesis 分片计数?
【问题讨论】:
-
我刚刚在 boto3 的 1.4.2 版本中尝试过这个,Kinesis 客户端对象肯定有一个
update_shard_count方法。你用的是什么版本?
标签: python amazon-web-services boto3 amazon-kinesis