Q:

DynamoDB UpdateItem with ReturnValues parameter returns nothing on failed ConditionExpression

Using aws/aws-sdk-php 3.21.6. I must be misunderstanding how ReturnValues works when a ConditionExpression meets the ConditionalCheckFailedException error.
What I'm hoping is that if the ConditionExpression fails, which in turn triggers the ConditionalCheckFailedException, that I can catch this exception and then get access via ReturnValues to the new Attributes from DD.
The docs Attributes I'm expecting from ReturnValues seem to imply this. 
From testing, however, ReturnValues only returns Attributes if the ConditionExpression is true, not when it fails.
$response = $client->updateItem([
    'TableName' => 'MyTable',
    'Key' => [
        'customer_url' => [
            'S' => 'someurl.com'
        ],
        'customer_platform' => [
            'S' => 'some_platform'
        ]
    ],
    'ExpressionAttributeNames' => [
        '#C' => 'createdAt'
    ],
    'ExpressionAttributeValues' =>  [
        ':val1' => [
            'S' => '2017-01-24T14:15:32'
        ],
        ':val2' => [
            'S' => '2017-01-24T14:15:30'
        ]
    ],
    'UpdateExpression' => 'set #C = :val1',
    'ConditionExpression' => '#C = :val2', // :val2 originally was 2017-01-24T14:15:30, before attempting to update to 2017-01-24T14:15:32. If I change the field to 2017-01-24T14:15:31, before running this update it will throw the ConditionalCheckFailedException
    'ReturnValues' => 'ALL_NEW'
]);

A:

Yes, ReturnValues is populated only if an updateItem succeeds. If it fails, because of ConditionalCheckFailedException or any other reason, ReturnValues will be null.
Supporting documentation from here, with emphasis mine:

Use ReturnValues if you want to get the item attributes as they appeared either before or after they were updated.

