Table of Contents
AWS VPC Architecture
This project will provision a VPC with basic components as follows:
- VPC
- Subnets (Private, Public, DB)
- InternetGateway
- NAT Gateway (Highly Available)
- Route Tables
- VPC Endpoints (S3, EC2, ECR, CloudWatch)
- Bastion Host for SSH connection
AWS EC2 ECS Architecture Using VPC Endpoints
This project will provision ECS cluster in private subnet and uses VPC endpoints for communication:
- EC2 ECS Cluster
- Security Groups
- Launch Template & Autoscaling Group
- Elastic LoadBalancer (Application)
- IAM role for ECS
Used below tools:
To run the terraform deployment from local we should have below installation in our machine
-
Terraform
-
Install AWS Cli V2
-
Install Packer
- Configure IAM credentials to access AWS environment.
- To trigger the deployment of all the TF modules, please use below script.
./local-deployment-script.sh >> output-logs.txt
- User can use below script to generate temporary credentials (Optional)
- Terraform backend configuration using S3 & DynamoDB table (Optional)
- If you are using any CI tool GitLab pipelines, GitHub Action, Jenkins then configure the aws credentials accordingly. In this example I am using GitHub Actions to provision AWS resources.
- Some useful terraform & aws commands
Vivek Mishra - @linkedin - [email protected]