# Path: lamvery/clients/base.py
# class BaseClient:
# 
#     __metaclass__ = ABCMeta
# 
#     def __init__(self, region=None, profile=None, dry_run=False):
#         self._session = boto3.session.Session(
#             profile_name=profile, region_name=region)
#         self._dry_run = dry_run
#         self._sts = self._session.client('sts')
# 
#     def get_account_id(self):
#         return self._sts.get_caller_identity().get('Account')
# 
# Path: lamvery/utils.py
# def previous_alias(alias):
#     return '{}-pre'.format(alias)


import botocore
import hashlib
import lamvery.config
from lamvery.clients.base import BaseClient
from lamvery.utils import previous_alias

        vpc_config = conf.get('vpc_config')
        if vpc_config is not None:
            kwargs['VpcConfig'] = self._build_vpc_config(vpc_config)

        environment_variables = conf.get('environment_variables')
        if environment_variables is not None:
            kwargs['Environment'] = {'Variables': {}}
            kwargs['Environment']['Variables'] = conf['environment_variables']

        if not self._dry_run:
            self._lambda.update_function_configuration(**kwargs)

    def get_alias(self, function, alias):
        try:
            return self._lambda.get_alias(
                FunctionName=function,
                Name=alias)
        except botocore.exceptions.ClientError:
            return {}

    def create_alias(self, function, alias, version):
        if not self._dry_run:
            self._lambda.create_alias(
                FunctionName=function,
                Name=alias,
                FunctionVersion=version)

    def update_alias(self, function, alias, version):
        if not self._dry_run:

# Path: lamvery/clients/base.py
# class BaseClient:
# 
#     __metaclass__ = ABCMeta
# 
#     def __init__(self, region=None, profile=None, dry_run=False):
#         self._session = boto3.session.Session(
#             profile_name=profile, region_name=region)
#         self._dry_run = dry_run
#         self._sts = self._session.client('sts')
# 
#     def get_account_id(self):
#         return self._sts.get_caller_identity().get('Account')
# 
# Path: lamvery/utils.py
# def previous_alias(alias):
#     return '{}-pre'.format(alias)


# Path: lamvery/clients/function.py
import botocore
import hashlib
import lamvery.config
from lamvery.clients.base import BaseClient
from lamvery.utils import previous_alias


        vpc_config = conf.get('vpc_config')
        if vpc_config is not None:
            kwargs['VpcConfig'] = self._build_vpc_config(vpc_config)

        environment_variables = conf.get('environment_variables')
        if environment_variables is not None:
            kwargs['Environment'] = {'Variables': {}}
            kwargs['Environment']['Variables'] = conf['environment_variables']

        if not self._dry_run:
            self._lambda.update_function_configuration(**kwargs)

    def get_alias(self, function, alias):
        try:
            return self._lambda.get_alias(
                FunctionName=function,
                Name=alias)
        except botocore.exceptions.ClientError:
            return {}

    def create_alias(self, function, alias, version):
        if not self._dry_run:
            self._lambda.create_alias(
                FunctionName=function,
                Name=alias,
                FunctionVersion=version)

    def update_alias(self, function, alias, version):
        if not self._dry_run:

            self._lambda.update_alias(