Database Management & Administration
Terraform, Amazon API Gateway, Fleet Management, Amazon Web Services, Load Balancing, Web Application Firewall, GitHub
Client background
This Ukrainian startup aims to enhance the user experience of automotive blogs through a social network-like interface and seamless integration with other platforms and import tools.
Business challenge
Immediate infrastructure cost adjustment was needed for a basic setup, along with best-practice improvements to the layout.
Project goals
- Database setup review
- Database cost optimization and capacity verification
- Creation of Terraform IaC unified setup from scattered manifests
- DynamoDB access refinement
- CloudFront implementation instead of direct S3 bucket site hosting
- Implementation of AWS Web Application Firewall for CloudFront
- Shift left from Lambda functions for traffic-intensive operations due to natural product limitations
Solution overview
After assessment, we identified that the initial database setup was excessive for the intended use, some configurations were potential vulnerability points, and although infrastructure was written in Terraform, it was not unified for full deployment and had no state management.
Implementation
- After revision of the infrastructure code, we performed a cleanup, added missing parts, endorsed modularity, and created a setup that deploys the whole footprint as one unified solution.
- Cost optimization was performed and showed a decrease of 40% due to verification of the required capacity.
- Web interface responsiveness improved with CloudFront and caching policies.
- The concept design of EC2 Fleet adoption for traffic-intensive processes showed a moderate increase in bandwidth allocation for each process.
- WAF2 detected and mitigated major security risks and allowed regional traffic filtering with additional DDoS protection.
- Additional CloudFront integration for image distribution from S3 improved performance, benchmarked at 3× the initial download score.
Resources
AWS, RDS Postgres, EC2 Fleet, Terraform, Route53, WAF2, DynamoDB, S3, API Gateway
Results
The application is performing better than expected, surpassing MVP targets. We implemented baseline security controls and addressed S3 bucket access with an AWS policy that only allows access through CloudFront. We also optimized costs, refined the IaC, and made its modular structure ready for creating new environments with minimal changes.
