Debian day 4.5: AWS, Cli, dotnet, Docker and ECS

submited by
Style Pass
2021-08-19 05:30:04

In the last few installments, I put Debian on my recycled Proliant ML330 G6, installed all the dev tools I needed and am now tidying up all the deployment loose ends. Deploying a Lambda function to AWS is working, now the bad boy ECS based web service needs to work.

Again, we will be installing a NuGet package into the dotnet environment so we can closely replicate what normally happens in Visual Studio, within Visual Studio Code. There are no handy menus any more, but the command line tools are not difficult and now that I am becoming more familiar with the setup it's quite possible I will automate the entire thing, which is a major bonus.

Once that is done, change into the directory where your already existing Dockerfile is (in this case, from Docker Desktop on windows) and run:

It's basically as simple as that. It's not quite the same as right-clicking on the project and having the AWS Explorer do everything, but it's pretty damn close. Note that everything that the dotnet ecs command does will use the aws-ecs-tools-defaults.json file in your project directory, along with your working Docker file. In my case, I also need to go and reconfigure the load balancer to find the new version of the ECS Fargate container but Visual Studio didn't used to do that anyway unless you had your own ec2 instance you were using for ECS.

Leave a Comment