> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/admin-guide/33/vulnerability-management/registry-scanning/scan-ecr.md).

# Amazon Elastic Container Registry

To scan a repository, Prisma Cloud has to authenticate with Amazon ECR using either an IAM user (service account) or IAM role. The minimum permissions policy required is **AmazonEC2ContainerRegistryReadOnly**. It is a managed, predefined policy. AWS managed policies grant the minimum set of permissions required for common use cases so you don’t need to spend a lot of time investigating permissions yourself.

## Authenticate Prisma Cloud to ECR

The **AmazonEC2ContainerRegistryReadOnly** permissions policy is currently defined as follows:

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PrismaCloudComputeECRScanning",
            "Effect": "Allow",
            "Action": [
                "ecr:BatchCheckLayerAvailability",
                "ecr:BatchGetImage",
                "ecr:DescribeImages",
                "ecr:DescribeRepositories",
                "ecr:GetAuthorizationToken",
                "ecr:GetDownloadUrlForLayer",
                "ecr:GetRepositoryPolicy",
                "ecr:ListImages"
            ],
            "Resource": "*"
        }
    ]
}
```

**Prerequisites:** You have [installed a Defender](/admin-guide/33/install/deploy-defender/defender-types.md) somewhere in your environment.

1. Open Console and go to **Defend > Vulnerabilities > Images > Registry settings**.
2. Select **Add registry**.
3. In the dialog, enter the following information:
   1. In **Version**, select **Amazon EC2 Container Registry**.
   2. In **Registry**, enter the URL for the registry. This should be of format: **\<acct\_id>.dkr.ecr.\<region>.amazonaws.com**
   3. In **Repository**, enter the name of the repository to scan.
   4. In **Tag**, enter an image tag. Leave this field blank to scan all tags.
   5. Configure how [Prisma Cloud authenticates with AWS](https://github.com/PaloAltoNetworks/pc-docs-md/tree/main/compute-edition/33/admin-guide/authentication/credentials-store/credentials-store.md).

      You can use an IAM user, IAM role, or AWS STS.
   6. In **OS type**, specify whether the repo holds **Linux** or **Windows** images.
   7. In **Scanners scope**, specify the collections of defenders to use for the scan.

      Console selects the available Defenders from the scope to execute the scan job according to the **Number of scanners** setting. For more information, see [deployment patterns](/admin-guide/33/vulnerability-management/registry-scanning/configure-registry-scanning.md#deployment-patterns).
   8. In **Number of scanners**, enter the number of Defenders across which scan jobs can be distributed.
   9. Set **Cap** to the number of most recent images to scan. Leaving **Cap** set to **5** will scan the 5 most recent images. Setting this field to **0** will scan all images.
4. Select **Add and scan**.

   Verify that the images in the repository are being scanned under **Monitor > Vulnerabilities > Images > Registries**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.prismacloud.io/admin-guide/33/vulnerability-management/registry-scanning/scan-ecr.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
