Skip to content

Commit d3210af

Browse files
authored
add ecr endpoint strategy docs (#111)
1 parent 8e850c0 commit d3210af

File tree

1 file changed

+19
-0
lines changed
  • src/content/docs/aws/services

1 file changed

+19
-0
lines changed

src/content/docs/aws/services/ecr.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,25 @@ awslocal ecr list-images --repository-name localstack-ecr-repository
136136
}
137137
```
138138

139+
## Endpoint Strategy
140+
141+
The `ECR_ENDPOINT_STRATEGY` configuration variable in LocalStack determines how the endpoints for ECR repositories are constructed. The different values for `ECR_ENDPOINT_STRATEGY` are:
142+
143+
- `ECR_ENDPOINT_STRATEGY=domain`: Uses a domain-based approach for the repository URIs. In this case, the URI includes the AWS account ID and the region, similar to how it would appear in a real AWS environment.
144+
For example:
145+
```bash
146+
"repositoryUri": "000000000000.dkr.ecr.us-east-1.localhost.localstack.cloud:4566/lambda-ecr-repo"
147+
```
148+
This mimics the structure of real AWS ECR URIs, which can help ensure compatibility with tools and scripts that expect this format.
149+
- `ECR_ENDPOINT_STRATEGY=off`: This strategy disables the domain-based structure and uses a simpler, direct approach. The repository URI is more straightforward and does not include the account ID or region.
150+
For example:
151+
```bash
152+
"repositoryUri": "localhost.localstack.cloud:4510/lambda-ecr-repo"
153+
```
154+
This can simplify configurations and reduce potential issues with domain resolution.
155+
156+
If you are experiencing issues with domain name resolution or formatting, switching from `domain` to `off` will likely resolve the problem by simplifying the repository URI and avoiding potential complications.
157+
139158
## Resource Browser
140159

141160
The LocalStack Web Application provides a Resource Browser for managing ECR repositories and images.

0 commit comments

Comments
 (0)