Python AWS Kinesis对象没有属性:update\u shard\u count
我试图在AWS动觉中实现动态切分。我已经创建了一个示例python脚本,以使用Boto3库更新kinesis流中的碎片数,从而将python与AWS kinesis连接起来。 但是当我使用Python AWS Kinesis对象没有属性:update\u shard\u count,python,amazon-web-services,boto3,amazon-kinesis,Python,Amazon Web Services,Boto3,Amazon Kinesis,我试图在AWS动觉中实现动态切分。我已经创建了一个示例python脚本,以使用Boto3库更新kinesis流中的碎片数,从而将python与AWS kinesis连接起来。 但是当我使用update\u shard\u count方法时,它给出了运动对象无属性更新\u shard\u count错误 import boto3 client = boto3.client('kinesis',region_name='us-east-1') response = client.update_sh
update\u shard\u count
方法时,它给出了运动对象无属性更新\u shard\u count错误
import boto3
client = boto3.client('kinesis',region_name='us-east-1')
response = client.update_shard_count(
StreamName='xyzstream',
TargetShardCount=2,
ScalingType='UNIFORM_SCALING' )
回溯(最近一次调用):文件“”,第1行,在
AttributeError:“运动”对象没有属性
“更新碎片计数”
那么我如何使用API更新kinesis shard count呢?您必须升级您的Boto3。我有Boto3 1.4.3,我在动觉模块中看到了
update\u shard\u count
方法。接下来,我签入了一个旧版本,但没有看到该方法
>>> import boto3
>>> boto3.__version__
'1.4.3'
>>> client = boto3.client('kinesis')
>>> client.update_shard_count
<bound method Kinesis.update_shard_count of <botocore.client.Kinesis object at 0x7fbfb7445b90>>
回溯(最近一次调用):文件“”,第1行,在
AttributeError:“运动”对象没有属性
“更新碎片计数”
我刚刚在boto3的1.4.2版本中尝试过这个,而Kinesis客户端对象肯定有一个
更新\u shard\u count
方法。你用的是什么版本?
>>> import boto3
>>> boto3.__version__
'1.4.0'
>>> client = boto3.client('kinesis')
>>> client.update_shard_count