I have this code below where I create a table and then I insert a first item in the table.
Then Im just doing a scan because I want "ConsumedReadCapacityUnits" and "ConsumedWriteCapacityUnits" metrics available to use in cloudwatch.
So Im doing a scan so the ConsumedReadCapacityUnits metric become available.
But Im not understanding why, only the ConsumedWriteCapacityUnits metric become available.
In terms of read the only metric that becomes available is "ProvisionedReadCapacityUnits" but "ConsumedReadCapacityUnits" not.
Doing just a scan like in the code below its not enough?
table = dynamo.create_table(
name=tableName,
schema=table_schema,
read_units=1,
write_units=1
)
name = "test"
password = "pass"
email = "email@email.email"
item_data = {
'name':name,
'email':email,
'password':password,
}
item = table.new_item(
hash_key=email,
attrs=item_data
)
item.put()
result = table.scan(scan_filter={'email':boto.dynamodb.condition.EQ(email),'password':boto.dynamodb.condition.EQ(password)})
print result
Aucun commentaire:
Enregistrer un commentaire