Deployed Monolith
This is the starting configuration. The monolithic node.js app running in a container on Amazon ECS.
Start Microservices
Using the three container images you built and pushed to Amazon ECR in the previous module, you will start up three microservices on your existing Amazon ECS cluster.
Configure Target Groups
Like in Module 2, you will add a target group for each service and update the ALB Rules to connect the new microservices.
Switch Traffic & Shut Down Monolith
By changing one rule in the ALB, you will start routing traffic to the running microservices. Once everything is healthy, shut down the monolith.
Navigate to the 'Clusters' menu on the left side of the Amazon ECS console.
Select your cluster: BreakTheMonolith-Demo-ECSCluster.
Under the services tab, select Create.
Configure the service (do not modify any default values) Task definition = select the highest value for X: [service-name]:X (X should = 1 for most cases) Service name = [service-name] Number of tasks = 1
Select Configure ELB
ELB Type = Application Load Balancer
For IAM role, select BreakTheMonolith-Demo-ECSServiceRole
Select your Load Balancer demo
Select Add to ELB
Add your service to the target group:
Listener port = 80:HTTP
Target group name = select your group: [service-name]
Select Save.
Select Create Service.
Select View Service.
It should only take a few seconds for all your services to start. Double check that all services and tasks are running and healthy before you proceed.
https://aws.amazon.com/getting-started/container-microservices-tutorial/module-four/