Tag Archives: netcore

My recent studies in .Net Core have lead me to the new world of Docker (new for .Net developers, anyway). The idea of developing low-cost microservices while still working using my favorite development platform is very exciting. In the process, I began using the Amazon AWS Docker platform, Elastic Container Services (ECS).

I quickly found that documentation for using ECS from Windows is a bit scarce. In particular, the Powershell tools are missing a pretty key helper method, get-login. Calling “aws ecr get-login” on a Linux box delivers you a complete “docker login” command for authenticating to the Elastic Container Registry (ECR). There is currently no such helper for Windows. At least, not that I can find, someone correct me if I’m just missing it.

This login should then be valid for 12 hours. Note that if you use your own Region, AccessKey, and SecretKey on the first line. Alternatively, you could use Set-DefaultAWSRegion and Set-AWSCredentials to store them in your Powershell session. If you’re on a build server running in AWS you could also use IAM roles to grant access directly to the build server.

Update 2/8/2017

You can add the section below to your PowerShell profile to add an easy to use cmdlet. To install: