문의 주신 내용에 맞는 전문 컨설턴트 배정 후 연락드리겠습니다.
· Intro
· Transaction 기능 소개 및 간단 확인
· On-demand 옵션 소개 및 간단 확인
· 마무리
Operation | Isolation level |
---|---|
DeleteItem | Serializable |
PutItem | Serializable |
UpdateItem | Serializable |
GetItem | Serializable |
BatchGetItem | Read-committed (단, 배치내 개별 작업은 Serializable) |
BatchWriteItem | Not Serializable (단, 배치내 개별 작업은 Serializable) |
Query | Read-committed |
Scan | Read-committed |
TransactWriteItems | Serializable |
TransactGetItems | Serializable |
response = client.transact_write_items(
ReturnConsumedCapacity='INDEXES',
TransactItems=[
{
'Update': {
'TableName': table_name,
'Key': {
'name': {'S': 'tester1'}
},
'ConditionExpression': 'age = :ac',
'UpdateExpression': 'SET age = :au',
'ExpressionAttributeValues': {
':ac': {'N': '25'},
':au': {'N': '26'},
}
}
},
{
'Update': {
'TableName': table_name,
'Key': {
'name': {'S': 'tester2'}
},
'ConditionExpression': 'age = :ac',
'UpdateExpression': 'SET age = :au',
'ExpressionAttributeValues': {
':ac': {'N': '30'},
':au': {'N': '31'},
}
}
}
]
)
{u'CapacityUnits': 1.0, u'TableName': u'gstest1', u'Table': {u'CapacityUnits': 1.0}}
{'ResponseMetadata': {'RetryAttempts': 0, 'HTTPStatusCode': 200, 'RequestId': 'N10USCNNO3VG2917M5C175A7C3VV4KQNSO5AEMVJF66Q9ASUAAJG', 'HTTPHeaders': {'x-amzn-requestid': 'N10USCNNO3VG2917M5C175A7C3VV4KQNSO5AEMVJF66Q9ASUAAJG', 'content-length': '176', 'server': 'Server', 'connection': 'keep-alive', 'x-amz-crc32': '2753013158', 'date': 'Thu, 20 Dec 2018 07:27:11 GMT', 'content-type': 'application/x-amz-json-1.0'}}, u'ConsumedCapacity': [{u'WriteCapacityUnits': 4.0, u'CapacityUnits': 4.0, u'TableName': u'gstest1', u'Table': {u'WriteCapacityUnits': 4.0, u'CapacityUnits': 4.0}}]}
An error occurred (ValidationException) when calling the TransactWriteItems operation: Transaction request cannot include multiple operations on one item
An error occurred (TransactionCanceledException) when calling the TransactWriteItems operation: Transaction cancelled, please refer cancellation reasons for specific reasons [ConditionalCheckFailed, None]