> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beam.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Private Container Registries

## Using private AWS ECR images

Export your AWS credentials in your shell and pass the environment variable names to `base_image_creds` as a list. This syntax will lookup the environment variable values for you.

```python theme={null}
image = Image(
    base_image="111111111111.dkr.ecr.us-east-1.amazonaws.com/my-app:latest",
    base_image_creds=[
        "AWS_ACCESS_KEY_ID",
        "AWS_SECRET_ACCESS_KEY",
        "AWS_SESSION_TOKEN",
        "AWS_REGION"
    ],
)

@endpoint(image=image)
def squared(i: int = 0) -> int:
    return i**2
```

We also accept a dict where you can provide the values.

```python theme={null}
image = Image(
    base_image="111111111111.dkr.ecr.us-east-1.amazonaws.com/my-app:latest",
    base_image_creds={
      "AWS_ACCESS_KEY_ID": "xxxx",
      "AWS_SECRET_ACCESS_KEY": "xxxx",
      "AWS_REGION": "xxxx"
    },
)
```

<Info>
  You can authenticate with either your static AWS credentials or an AWS STS
  token. The latter requires that the `AWS_SESSION_TOKEN` key be set.
</Info>
