aws-samples / aws-modern-application-workshop

A tutorial for developers that want to learn about how to build modern applications on top of AWS. You will build a sample website that leverages infrastructure as code, containers, serverless code functions, CI/CD, and more.
Apache License 2.0
1.46k stars 832 forks source link

CreateECSService.ps1 container does not have a container port 8080 defined #165

Open Githrepo opened 4 years ago

Githrepo commented 4 years ago

Doing the workshop on Windows 10 developer workstation.

Module-2 Creating a Service with Fargate Creating a Service Linked Role for ECS

When run CreateECSService.ps1 get this error: New-ECSService : The container MythicalMysfits-Service did not have a container port 8080 defined.

I don't know if it is related but earlier in the module I applied this fix from issue 132: https://github.com/aws-samples/aws-modern-application-workshop/issues/132

voytekk1 commented 4 years ago

Go the same issue and fixed it by going to Amazon ECS -> Task Definitions -> mythicalmysfitsservice -> mythicalmysfitsservice:1 -> Create New Revision -> Configure via JSON and change: "portMappings": [], to: "portMappings": [ { "hostPort": 8080, "protocol": "tcp", "containerPort": 8080 } ], Than click save and ran again CreateECSService.ps1 script.

f00f commented 3 years ago

See my reply in https://github.com/aws-samples/aws-modern-application-workshop/issues/132#issuecomment-829209534 After I fixed that and ran RegisterECSTaskDefinition.ps1 again I got a valid task definition and CreateECSService.ps1 succeeded, too.