region == region_name
region == region_name

Specifying that during inline client creation, "region_name" needs to be used in place of "region".
Eg:
lambda_client = boto3.client('lambda', aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key, region_name='us-east-1')
boto/boto3