anchor.diff: -= Installation: Multi-Tier Option
  -
  -Single AMI deployments are a way to deploy the Kill Bill stack, that is both the Kill Bill server and the administrative UI (KAUI), from one AMI. There are two options: *single-tier* and *multi-tier*. The https://docs.killbill.io/latest//aws-singletier.html[*single-tier* option] is a good way to deploy a limited version of Kill Bill quickly for trial and experimentation. For production deployments, we recommend the *multi-tier* configuration, using two or more EC2 instances and a separate database provided by the AWS *Relational Database Service (RDS)*. This configuration also makes use of an AWS *Elastic Load Balancer (ELB)* to correctly spread the traffic among the various nodes, and to route traffic to either the Kill Bill Server or KAUI based on the incoming port.
  -
  -As a third option, we also provide an easier way to deploy a production system using https://docs.killbill.io/latest//aws-cf.html[CloudFormation templates]. The multi-tier option requires more setup, but provides more control over the deployment.
  -
  -This document describes the installation process for the multi-tier option. The diagram below shows the principal components of the multi-tier system: The ELB, the RDS, and two or more EC2 instances. Each EC2 is an instance of Ubuntu Linux, running both Kill Bill and KAUI within a Tomcat server. Clients interact only with the ELB, which routes requests to the rest of the system.
  += Multi-Tier Option
  +
  +== Overview
  +
  +There are at least three different ways to setup a working Kill Bill system on AWS. Two options are based on a single *Amazon Machine Image (AMI)* containing the complete Kill Bill stack, that is both the Kill Bill server and the administrative UI (KAUI). These options are *single-tier* and *multi-tier*. The https://docs.killbill.io/latest//aws-singletier.html[*single-tier* option] is designed to deploy a limited version of Kill Bill quickly for trial and experimentation. For production deployments, we offer the multi-tier option. A third alternative available for deploying a production system is https://docs.killbill.io/latest//aws-cf.html[CloudFormation templates]. The multi-tier option requires more setup than CloudFormation, but provides more control over the deployment.
  +
  +
  +This document describes the multi-tier option. This configuration uses two or more EC2 instances and a separate database provided by the AWS *Relational Database Service (RDS)*. It also includes an AWS *Elastic Load Balancer (ELB)* to correctly spread the traffic among the various nodes, and to route traffic to either the Kill Bill Server or KAUI based on the incoming port. 
  +
  +The diagram below shows the principal components of the multi-tier system: The ELB, the RDS, and two or more EC2 instances. Each EC2 is an instance of Ubuntu Linux, running both Kill Bill and KAUI within a `tomcat` server. Clients interact only with the ELB, which routes requests to the rest of the system.
   
   image:https://github.com/killbill/killbill-docs/raw/v3/userguide/assets/aws/multi-tier-ami_deployment.png[align=center]
   
  -== Multi-Tier Installation
  +== Installation
   
   === Login to AWS
   
  
positive.code:  
  Congratulations! Your multi-tier installation is ready to go!
  
  
negative.code: When your certificate is successfully created, you may delete the temporary (validation) CNAME. Then proceed as described above.
  
  
  == Testing
  
  When your ELB is complete you can proceed to testing. If you are using HTTPS you should be able to login to KAUI from your browser using the URL https://kaui.DOMAIN, where DOMAIN is *your* domain that you have used for your certificate. If you are using HTTP you will need to use the URL http://DNS_NAME where DNS_NAME is the *DNS name* for the KAUI load balancer as given on the Load Balancer dashboard.
  
  