'Make sure the stage name matches the AWS-allowed pattern
(calls to apigateway_client.create_deployment, will fail with error
message "ClientError: An error occurred (BadRequestException) when
calling the CreateDeployment operation: Stage name only allows
a-zA-Z0-9_" if the pattern does not match)'

def check_stage_name(self, stage_name):

    if self.stage_name_env_pattern.match(stage_name):
        return True
    raise ValueError(u'AWS    requires    stage    name    to    match    a-zA-Z0-9_')
