Deploying an ECS service using CloudFormation

With your ECS service configuration in place, it's time to deploy the changes to your stack using the aws cloudformation deploy command. Once deployment is complete, you ECS service should register with the target group you created earlier in this chapter, and if you browse to the URL of your Application Load Balancer, you should see that the root URL of the sample application is loading correctly:

Testing the todobackend application

If, however, you click on the todos link shown in the preceding screenshot, you will receive an error, as demonstrated in the following screenshot:

todobackend application error

The problem in the preceding screenshot is that the database tables expected in the application database have not been created, as we have not yet run database migrations against the application database. We will learn how to address this issue shortly, but before we do this, we have one more topic to discuss related to deploying ECS services: rolling deployments.