This guide is intended to assist developers in creating the minimal cloud infrastructure for securely and durably hosting web applications on AWS. Please refer to the Knowledge section to learn more about the cloud resources provisioned through the Ansible playbook provided in this project (playbook-create.yml)
- AWS Account
- AWS User with the following policies/permissions attached:
- AmazonVPCFullAccess
- AmazonEC2FullAccess
- AWS User with programmatic access keys
- Ansible installed
- Boto3 installed
Note: Make sure to refer to the 'Deletion' section to deprovision the resources created from this section. You will be charged for these resources on AWS while they're up and running.
The following command will run a playbook that will provision network resources with a sample web application to test the resources work as expected (Should take 10-20 minutes):
ansible-playbook playbook-create.yml
If the resources are provisioned correctly, then in your terminal you should see above 'PLAY RECAP' something simlilar to below
ok: [localhost] => {
"msg": "app_name-xxxxxxxxxx.us-east-1.elb.amazonaws.com"
}
Copy that DNS name and open it in your browser. If you see a page with the header "Amazon ECS Sample App" then congratulations! You're up and running.
To deprovision the resources you've created, enter the following command into your terminal. It will delete the web application stack and then the network stack (Should take 10-20 minutes):
ansible-playbook playbook-delete.yml