Using Amazon ECR from CLI with AWS SSO

Sun, Mar 24, 2024

Read in 3 minutes

AWS CLI can be used to access ECR repositories, but it may be a bit confusing to get it to work the first time -- especially if you are using AWS SSO for authentication. Here's a step-by-step guide.

There is good documentation for Amazon ECR but if you are using AWS SSO then blindly following the documentation could trip you up the first time,

Pre-requisites / Assumptions

AWS CLI Setup and Configure

AWS Configure SSO

Get Authentication Token

Build and Tag Docker Images Locally, Push to ECR