def _fetch_layer_uri(self, layer):
try:<EOL><INDENT>layer_version_response = self.lambda_client.get_layer_version(LayerName=layer.layer_arn,<EOL>VersionNumber=layer.version)<EOL><DEDENT>except NoCredentialsError:<EOL><INDENT>raise CredentialsRequired("<STR_LIT>")<EOL><DEDENT>except ClientError as e:<EOL><INDENT>error_code = e.response.get('<STR_LIT>').get('<STR_LIT>')<EOL>error_exc = {<EOL>'<STR_LIT>': CredentialsRequired(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"),<EOL>'<STR_LIT>': ResourceNotFound("<STR_LIT>".format(layer.arn))<EOL>}<EOL>if error_code in error_exc:<EOL><INDENT>raise error_exc[error_code]<EOL><DEDENT>raise e<EOL><DEDENT>return layer_version_response.get("<STR_LIT>").get("<STR_LIT>")<EOL>
Fetch the Layer Uri based on the LayerVersion Arn

Parameters
----------
layer samcli.commands.local.lib.provider.LayerVersion
    LayerVersion to fetch

Returns
-------
str
    The Uri to download the LayerVersion Content from

Raises
------
samcli.commands.local.cli_common.user_exceptions.NoCredentialsError
    When the Credentials given are not sufficient to call AWS Lambda