我认为DynamoDB不会将字符串削减到400KB,因为这是不安全的。那么当我尝试插入长度超过限制的字符串时,DynamoDB会抛出错误吗?
答案 0 :(得分:0)
根据您使用的语言,您会遇到异常。基本上,它将是第400个HTTP代码的包装,由低级DynamoDB REST API返回:
类似的东西:
ValidationException: ValidationException: 400 Bad Request
{u'message': u'Item size has exceeded the maximum allowed size', u'__type': u'com.amazon.coral.validate#ValidationException'}
或者:
Item size to update has exceeded the maximum allowed size (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ValidationException; Request ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXX)
或者:
Could not write to DynamoDB: ValidationException: ExpressionAttributeValues contains invalid value: Item size has exceeded the maximum allowed size for key :largeAttribute status code: 400, request id: XXXXXXXXXXXXXXXXXXXXXXXXXXXX