擅长:python、mysql、java
<p>问题出在语法上。在</p>
<p>正确的语法是:</p>
<pre><code>response = dynamo_client.transact_write_items(
TransactItems=[
{
'ConditionCheck': {
'Key': {
'indicator_id': {
'S': 'indicator_1'
}
},
'ConditionExpression': 'attribute_exists(#indicator_id)',
'ExpressionAttributeNames': {
'#indicator_id': 'indicator_id'
},
'TableName': 'CAS'
}
},
{
'Put': {
'Key': {
'indicator_id': {
'S': 'update_indicator_1'
}
},
'TableName': 'CAS'
}
}
]
)
</code></pre>