Don't error out on lambda functions with no VPC info

This commit is contained in:
Kris Raney 2016-03-07 09:05:33 -06:00
parent bed98d8061
commit 73334a19cc

View File

@ -301,8 +301,9 @@ def _function_config_present(FunctionName, Role, Handler, Description, Timeout,
ret['changes'].setdefault('new', {})[var] = locals()[var]
ret['changes'].setdefault('old', {})[var] = func[val]
# VpcConfig returns the extra value 'VpcId' so do a special compare
oldval = func.get('VpcConfig', {})
oldval.pop('VpcId', None)
oldval = func.get('VpcConfig')
if oldval is not None:
oldval.pop('VpcId', None)
if oldval != VpcConfig:
need_update = True
ret['changes'].setdefault('new', {})['VpcConfig'] = VpcConfig