def _test_dynamodb(dynamodb, tracer):
    users = dynamodb.Table('users')

    response = users.put_item(Item={
        'username': 'janedoe',
        'first_name': 'Jane',
        'last_name': 'Doe',
    })
    assert_last_span('resource', 'dynamodb', 'put_item', tracer, response)

    response = users.get_item(Key={'username': 'janedoe'})
    user = response['Item']
    assert user['first_name'] == 'Jane'
    assert user['last_name'] == 'Doe'
    assert_last_span('resource', 'dynamodb', 'get_item', tracer, response)

    try:
        dynamodb.Table('test').delete_item(Key={'username': 'janedoe'})
    except ClientError as error:
        response = error.response
    assert_last_span('resource', 'dynamodb', 'delete_item', tracer, response)

    response = users.creation_date_time
    assert isinstance(response, datetime.datetime)
    assert_last_span('resource', 'dynamodb', 'describe_table', tracer)