Response from the backend:
And renders the response as HTML We’ll package the two apps as Docker containers… Amazon ECS Deploy those Docker containers using Amazon ECS… TERRAFORM And define our infrastructure-ascode using Terraform resource "aws_ecs_service" "sinatra_backend" { ( ) load_balancer { elb_name = "${aws_elb.sinatra_backend.id}" container_name = "sinatra-backend" container_port = 4567 } } Associate the ELB with the Sinatra Backend ECS Service { "name": "example", "image": "foo/example", "cpu": 1024, "memory": 2048, "essential": true, } { "cluster": "example", "serviceName": ”foo", "taskDefinition": "", "desiredCount": } ECS Agent ECS Tasks ECS Task Definition ECS Service Definition EC2 Instance ECS Cluster Set up service discovery between the ECS Services resource "aws_ecs_task_definition" "rails_frontend" { family = "rails-frontend" container_definitions =