This project demonstrates the setup of a highly available and secure multi-tier application on AWS, using Terraform for Infrastructure as Code (IaC). The application includes an application server tier, a backend database, and incorporates various AWS services for security, performance, and scalability.
The project sets up the following components:
- EC2 Instances: Hosted within an Auto Scaling Group for scalability and resilience.
- RDS Instance: The backend database, configured with encryption for security.
- Elastic Load Balancer (ELB): To distribute traffic across the EC2 instances.
- S3 Bucket: For storing application logs and data.
- AWS CloudWatch: For monitoring the infrastructure and setting alarms.
- IAM Roles and Policies: For secure and restricted access to AWS services.
- Security Groups: To control inbound and outbound traffic for EC2 and RDS.
- AWS Key Management Service (KMS): For managing encryption keys.
- AWS Secrets Manager: To securely manage database credentials.
- An AWS account with required permissions.
- Terraform installed on your local machine.
- AWS CLI, configured with appropriate credentials.
.
├── ec2.tf
├── cloudwatch.tf
├── iam.tf
├── outputs.tf
├── provider.tf
├── rds.tf
├── s3.tf
├── sg.tf
├── vpc.tf
└── variables.tf
-
Clone the Repository:
git clone [repository_url]
-
Initialize Terraform: Navigate to the cloned repository and run:
terraform init
-
Deploy the Infrastructure: Apply the Terraform configurations:
terraform apply
Confirm the deployment when prompted.
-
Verify Resources: Check the AWS Management Console to ensure all resources are deployed correctly.
- Access the EC2 instances and RDS database via the AWS Console.
- Validate the load balancing through the ELB DNS endpoint.
- Monitor infrastructure performance and alerts through CloudWatch.
To tear down the infrastructure and avoid unnecessary charges, run:
terraform destroyContributions are welcome. Please adhere to the project's code of conduct and follow the pull request process.
This project is licensed under the MIT License - see the LICENSE file for details.