Deploy Ansible AWX Automation Tool On Debian 11.4 in the cloud on AWS Lightsail.
Requirements
In order to complete this tutorial, the following is a list of items that may be needed or required. Please ensure to have these items available before taking implementation action on this tutorial to ensure success:
1) An Amazon Web Services account or IAM user account
2) A web browser i.e Google Chrome, Safari, Internet Explorer, or Firefox
3) A desktop or laptop with 4GB RAM, a dual-core processor, and at least 50GB of free disk space
4) Docker and docker-compose
5) Installation files for Ansible AWX and Ansible.
Overview
The following is an overview of the steps covered in this tutorial:
1) Sign into your AWS account and open the Lightsail service
2) Create a new Debian 11.4 instance. Create an A record and point it to the public IP address of the instance
3) Connect to the instance via SSH and install docker as well as docker-compose
4) Add the ansible repository and install Ansible & Ansible AWX
5) Access the Ansible AWX dashboard.
Step 1: Sign into your AWS account and open the Lightsail services.

Step 2: Create a new Debian 11.4 instance. Create an A record and point it to the public IP address of the instance
Click on the CREATE INSTANCE button to open up the instance creation wizard. On the ‘Select a platform’ section choose Linux / Unix and on the ‘Select a blueprint’ section click the OS Only button. Select the Debian 11.4 (Bullseye) blueprint and scroll down to the ‘Choose your instance plan section’. We recommend selecting the $10 monthly plan that allows the creation of an instance with 2GB of memory, 1 vCPU, and 60GB SSD disk space. Scroll down once again and enter a name for the instance on the ‘Identify your instance’ input box. Click Create Instance to start the deployment process.

When the instance creation process is complete, copy the public IPv4 address and open the Route53 service. Click Hosted Zones and select any hosted zone for your registered domain names. Click ‘Create record’ and set the record name to ‘ansible’. Paste the public IPv4 address on the Value field and click Create Record.
If you do not have a domain registered in Route53, you can use a domain registered with any other registrar. The important this is to create an A record that points to the public IP address of the Debian 11.4 instance.
TIP: We also recommend configuring a static IP address on the Debian 11.4 instance, click HERE to learn how to set it up

Step 3: Connect to the instance via SSH and install docker as well as docker-compose
The next step is to connect to the instance using an SSH client. If you are an Apple MacOS device or Linux-based PC, open the built-it terminal app.
Return to the Lightsail dashboard and click on the Debian 11.4 instance name. Click the connect tab and click Download default key.
Run the following commands in the terminal app to connect to the Debian 11.4 instance
If you are using a Windows-based device, download and install Putty. Use PuTTYgen to convert the .pem file to a .ppk file. Open Putty and enter the public IP address of the instance on the Host Name (or IP address) field. Set the port to 22 and click the SSH tab. Click Auth and Choose Browse. Select the .ppk file that you generated for your key pair and choose Open. Under Category, choose Session, enter a name for the session in Saved Sessions, and then choose Save. Click the Open button at the bottom of the Window top start the SSH session.
Add the following configuration to the file:
127.0.0.1 ansible.yourdomain.com ansible
127.0.0.1 localhost
127.0.1.1 ansiblesvr
Run the command nano /etc/cloud/cloud.cfg and set the preserve_hostname parameter to true. Run the command nano /etc/cloud/templates/hosts.debain.tmpl and add the configuration:
127.0.0.1 ansible.yourdomain.com ansible
127.0.0.1 localhost
127.0.1.1 ansiblesvr
Run the commands below to install docker and docker-compose