def lambda_handler()

in code/lab-4/account_credit/credit.py [0:0]


def lambda_handler(event, context):
    if not is_credit_request_valid(event):
        raise ValueError('Invalid credit request')

    if event['customerId'].endswith('fail_credit'):
        raise AccountCreditException('Forced account credit transaction failure', event)

    return event