- Newest
- Most votes
- Most comments
Based on your current setup and usage, there are several strategies you can consider to optimize and reduce your AWS costs:
-
Application Load Balancer (ALB) Optimization: The ALB seems to be a significant cost factor. Consider using a single Application Load Balancer for multiple applications if possible. Also, review your ALB configuration to ensure you're not over-provisioning.
-
Auto Scaling Refinement: Fine-tune your Auto Scaling policies to more closely match your traffic patterns. This could potentially reduce the number of instances running during off-peak hours. Consider using more granular scaling policies based on metrics like CPU utilization, request count, or custom application metrics.
-
Instance Type Evaluation: Analyze if t3.large instances are the most cost-effective for your workload. You might be able to use a different instance family or size that provides better price-performance for your specific needs. AWS Compute Optimizer can help identify if your instances are over-provisioned.
-
Spot Instances: For non-critical workloads or batch processing, consider using Spot Instances in your Auto Scaling group. They can offer significant cost savings compared to On-Demand instances.
-
RDS Optimization: With 60% average CPU usage, your RDS instance might be slightly over-provisioned. Consider testing a smaller instance size or exploring Aurora Serverless if your workload has variable demand.
-
Data Transfer Cost Reduction: Review your data transfer patterns and ensure you're making the most of CloudFront. Optimize your caching strategies and TTLs to reduce origin fetches.
-
VPC Cost Analysis: Examine your VPC usage, particularly NAT Gateway usage if applicable. Consider using VPC endpoints for AWS services to reduce data transfer costs.
-
AWS Savings Plans: While you don't want to reserve the EC2 instances, consider Compute Savings Plans which provide flexibility across instance families, sizes, and even some AWS services.
-
CloudWatch and Monitoring: Use AWS Cost Explorer and CloudWatch to continuously monitor your usage and identify cost anomalies or optimization opportunities.
-
Serverless Options: For certain components of your application, consider if serverless options like AWS Lambda or Fargate could be more cost-effective, especially if you have variable traffic patterns.
Remember to test any changes in a non-production environment first to ensure they don't negatively impact your application's performance or reliability. Regularly review and refine your setup as your traffic patterns and application needs evolve.
Sources
Community | AWS cost optimization: Top tips and best practices to reduce your bill
Community | EC2 cost optimization:15 ways to save on Amazon EC2
Overview of cost optimization - Cost Modeling Data Lakes for Beginners
AWS Auto Scaling Features
The re:Post Agent is good but misses one specific thing:
How much of your content is static? Serving static content from a web server farm wastes capacity (all capacity - load balancer, servers, etc.).
Instead: Put the static content into S3. Less storage cost and S3 will scale automatically to deal with large-scale requests at no extra cost to you - you're still paying for the data transfer (but you will anyway coming from EC2/load balancer) but you don't have to pay for more instances and more load balancer capacity to deliver content.
In the frontend app, very few static parts is there, basically, everything is fetched from the API. I will look into the docs and everything to understand the first answer and your answer as well to terminate the extra cost.
Relevant content
- asked 2 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 4 months ago
Hi Gary, Just one question came into my mind, Will those ec2 instance under the ALB+Auto Scaling Group will charge for the Bandwidth or the Bandwidth will be count as ALB's bandwidth?