def _upgrade_lambda_functions()

in chalice/config.py [0:0]


    def _upgrade_lambda_functions(self,
                                  resources: List[Dict[str, Any]],
                                  deployed: Dict[str, Any],
                                  prefix: str) -> None:
        lambda_functions = deployed.get('lambda_functions', {})
        # In chalice 0.10.0, the lambda_functions had the format
        # {"function-name": "lambda_arn"} as opposed to
        # {"function-name": {"arn": "lambda_arn", "type": "...'}} used
        # in later versions of chalice.  We'll check for both cases
        # so people can upgrade from 0.10.0 to the new deployer.
        is_pre_10_format = not all(
            isinstance(v, dict)
            for v in lambda_functions.values()
        )
        if is_pre_10_format:
            lambda_functions = {
                # The only supported lambda functions in 0.10.0
                # was built in authorizers.
                k: {'type': 'authorizer', 'arn': v}
                for k, v in lambda_functions.items()
            }
        for name, values in lambda_functions.items():
            short_name = name[len(prefix):]
            current = {
                'resource_type': 'lambda_function',
                'lambda_arn': values['arn'],
                'name': short_name,
            }
            resources.append(current)