[英]how to create a table in dynamodb that is on-demand using python?
I tried this way but I get the error Invalid type for parameter ProvisionedThroughput.ReadCapacityUnits, value: on-demand, type: <class 'str'>, valid types: <class 'int'>我尝试过这种方式,但出现错误 Invalid type for parameter ProvisionedThroughput.ReadCapacityUnits, value: on-demand, type: <class 'str'>, valid types: <class 'int'>
ProvisionedThroughput={ 'ReadCapacityUnits': 'on-demand', 'WriteCapacityUnits': 'on-demand' }
ddb.create_table(
TableName='my_table',
KeySchema=[
{'AttributeName': 'id', 'KeyType': 'HASH'},
],
AttributeDefinitions=[
{'AttributeName': 'id', 'AttributeType': 'S'},
],
BillingMode='PAY_PER_REQUEST',
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.