get_download_url_for_layer

ECR.Client.get_download_url_for_layer(**kwargs)

Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer. You can only get URLs for image layers that are referenced in an image.

When an image is pulled, the GetDownloadUrlForLayer API is called once per image layer that is not already cached.

Note

This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.

See also: AWS API Documentation

Request Syntax

response = client.get_download_url_for_layer(
    registryId='string',
    repositoryName='string',
    layerDigest='string'
)
Parameters
  • registryId (string) -- The Amazon Web Services account ID associated with the registry that contains the image layer to download. If you do not specify a registry, the default registry is assumed.
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository that is associated with the image layer to download.

  • layerDigest (string) --

    [REQUIRED]

    The digest of the image layer to download.

Return type

dict

Returns

Response Syntax

{
    'downloadUrl': 'string',
    'layerDigest': 'string'
}

Response Structure

  • (dict) --

    • downloadUrl (string) --

      The pre-signed Amazon S3 download URL for the requested layer.

    • layerDigest (string) --

      The digest of the image layer to download.

Exceptions

  • ECR.Client.exceptions.ServerException
  • ECR.Client.exceptions.InvalidParameterException
  • ECR.Client.exceptions.LayersNotFoundException
  • ECR.Client.exceptions.LayerInaccessibleException
  • ECR.Client.exceptions.RepositoryNotFoundException