amazon-ecr-containerd-resolver
amazon-ecr-containerd-resolver copied to clipboard
Endpoint construction
The correct ECR API endpoint to use depends on a few factors:
- region
- partition
- whether FIPS is desired
Every region is contained within a partition, and the AWS SDK for Go contains partition mappings so that it can guess the correct partition based on a region identifier. The newest version of the AWS SDK for Go has updated partition mappings including the aws-iso and aws-iso-b partitions, so we should update to use that version of the SDK. However, we also receive the partition identifier as part of the reference (ecr.aws/arn:<partition>:ecr...
), so we don't really need to guess; we should construct the ECR API endpoints using that explicit partition.
For FIPS, we'll need to provide an option that FIPS endpoints are desired so a client can specify that.