Step 2:

ARTIFACTORY: Mirroring Amazon ECR repository in Artifactory

AuthorFullName__c
Palak Sahu
articleNumber
000005612
ft:sourceType
Salesforce
FirstPublishedDate
2023-03-12T10:28:55Z
lastModifiedDate
2023-03-13T09:14:36Z
VersionNumber
1
Created a docker remote repository pointing to the ECR url “https://aws_account_id.dkr.ecr.ap-northeast-1.amazonaws.com” and passed the username as AWS and generated password or token as shown in the below screenshots:

User-added image

Please note: In Artifactory, the remote repository authentication is done using a username and password. On the other hand, AWS ECR uses a base64-encoded authentication token, which is valid for 12 hours. We can generate the password or token for the ECR using the AWS CLI where we need to configure the AWS client with ECR and get the password for authentication.

For reference, find the steps below:

Install the AWS CLI and execute the below commands to achieve the same:

1. aws  configure
(requires AWS Access Key ID, AWS Secret Access Key, region name and output format)

2. aws ecr get-login-password
( It will provide the password or token that can be used for authentication in the remote repository)

Find the output of the above commands here:
User-added image

Once the token is generated, pass the AWS as username and generated token as a password under the advanced tab in the edited remote repository and check the Test Connection on the same.