

Terraform is software from the same guys who make Vagrant and Consul, that allows us to write our desired state in a language that’s a lot user-friendlier than CloudFormation JSON. CloudFormation is a solution that allows us to describe a desired infrastructure in JSON which can then be applied to AWS. The CLI makes scripting easy, but it’s hard to make scripts that are idempotent and allow for easy changes. The next options come from AWS themselves: the CLI and CloudFormation. However, that would be hard to reproduce, and impossible to version control. We could manually go into the AWS Console and configure everything from there. Now that we know the configuration we want on AWS, we need a way to make it happen. It would be very hard to install PostgreSQL on it without it. Not shown in the diagram is the NAT gateway that’s necessary to make sure we can access the internet from the DB host. We’ll also run Ansible configuration changes from this box.Īs only the management and web hosts need to be exposed to the internet, we can put the database host in a private subnet. We’ll use that as an SSH bastion to connect to the other machines. In line with this practice, we’ll add a third EC2 instance to be a ‘management host’. To keep in line with best practices, we’ll want to make only the absolutely necessary ports open.

We’ll create a two-tier environment on AWS: a web server, and a database server. There are some difficulties on Windows with the SSH configuration for Terraform. This blog post was written on Ubuntu it should work as well on macOS.
#AWS TOOLKIT FOR VISUAL STUDIO 2017 SET CREDENTIALS HOW TO#
If you’re interested in seeing how to prepare this application for production, let me know in the comments! The environment we’ll describe here is configured for development, not production. Today, we’ll take our app to AWS, and we’ll set up a remote development environment. In the last two blog posts of this series we discussed how to set up a local VM-based development environment for a cloud application, and then built a Flask-RESTful app within this environment.
