- Newest
- Most votes
- Most comments
You can push or pull images to or from an Amazon ECR repository in another account. First, you must create a policy that allows the secondary account to perform API calls against the repository. Then, use a Docker authentication token generated from the secondary account to use push and pull commands against the primary account's repository.
More information: https://aws.amazon.com/premiumsupport/knowledge-center/secondary-account-access-ecr/
Have you thought about cross account ECR replication? You could replicate the images to the local account, from the remote account, and then ECS could pull them.
These two stack overflow articles detail how to actually implement cross-account access via IAM. Two key things: make sure your repository policy allows access from the ARN of the task EXECUTION role, not the task role, and vice versa.
Thanks all, I've managed to work out this now and this youtube tutorial is helpful too. Ref: https://www.youtube.com/watch?v=YvqImD7pe9g&ab_channel=AmazonWebServices
Relevant content
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a month ago
Yep, it works for me. Thank you!