Search⌘ K
AI Features

Using Terraform to Configure an AWS Environment

Explore how to configure an AWS environment using Terraform to deploy a microservices-based application on EKS. Understand setting up essential AWS resources such as Kubernetes clusters, container registries, databases, and security configurations to support event-driven architecture deployments.

The MallBots application is going to be run from AWS Elastic Kubernetes Service (EKS), a managed Kubernetes environment. The IaC to create the infrastructure is going to be found in the /deployment/infrastructure directory.

Setting up infrastructure on AWS with Terraform

We will be configuring a small typical AWS environment across two Availability Zones (AZs):

Our AWS infrastructure
Our AWS infrastructure

In the infrastructure directory, there are several Terraform files. Altogether, they are going to be used to set up the following in AWS:

  • Docker repositories with Elastic Container Service (ECS). We will be uploading the built microservice images here.

  • A Kubernetes cluster in EKS. We will be deploying our application here from images stored in ECS.

  • A PostgreSQL database using Relational Database Service (RDS). A single instance will serve all of the microservice databases and schemas. ...