Skip to content

AWS Cost Optimization

0

Enter image description here As far as you can see, I have gathered the top costly services per month. What step(s) can I follow to decrease cost without breaking my infrastructure? Let's do it from easy to hard.

3 Answers
1
Accepted Answer

You can reduce cost of

  • EC2: by using savings plan or reserved instance. You commit to a fix payment each month for a period of 1 or 3 years but it will also lower the cost by about 30%
  • ECS: by using Savings Plan. Again same as EC2. Alternatively, you can use spot for ECS fargate, that will reduce the running cost
  • CloudWatch: if you writing debug logs, you can stop doing that. You can also reduce the log retention period. However, CloudWatch ingestion fees are high, so reducing writing logs will lower cost.
  • VPC: will need more details on the cost - is Nat Gateway, endpoints or what exactly is costing? If you are writing data to S3, make sure to have a VPC gateway endpoint configured to reduce cost.
  • EC2 other: this might be EBS volumes. Optimise your volumes and use st1 or gp3. You might also have also lot of snapshots, if you don't need it, you can delete it. Some servers will change data a lot, and keeping regular snapshots of it will cost a lot.
EXPERT
answered 10 months ago
0

To decrease costs without breaking your infrastructure, you can follow these steps from easy to hard:

  1. Analyze and optimize EC2 instances:

    • Use AWS Cost Explorer to identify underutilized EC2 instances.
    • Consider rightsizing instances by switching to smaller instance types that still meet your performance needs.
    • Implement Auto Scaling to automatically adjust the number of instances based on demand.
  2. Optimize EBS volumes:

    • Review and delete unnecessary or unused EBS volumes.
    • Consider changing the volume type to a more cost-effective option if performance allows.
  3. Optimize S3 storage:

    • Implement lifecycle policies to automatically move infrequently accessed data to cheaper storage classes like S3 Standard-IA or Glacier.
    • Delete unnecessary or outdated objects.
  4. Review and optimize data transfer costs:

    • Analyze your data transfer patterns and consider using Amazon CloudFront to reduce data transfer costs.
    • Optimize your application to minimize unnecessary data transfers.
  5. Leverage cost-effective pricing options:

    • Consider using Reserved Instances or Savings Plans for EC2 and RDS to get discounted rates for long-term commitments.
    • Utilize Spot Instances for non-critical, interruptible workloads to save on EC2 costs.
  6. Implement governance and monitoring:

    • Set up AWS Budgets to track and alert on spending.
    • Use AWS Cost Anomaly Detection to identify unusual spending patterns.
    • Implement tagging strategies to better track and allocate costs across different projects or departments.
  7. Optimize database usage:

    • Review and optimize your RDS instances, considering factors like instance size, storage type, and multi-AZ deployments.
    • Consider using Amazon Aurora Serverless for variable workloads to automatically scale capacity and reduce costs during idle periods.
  8. Explore serverless options:

    • Evaluate if any of your workloads can be migrated to serverless services like AWS Lambda, which can be more cost-effective for certain use cases.

Remember to carefully test any changes to ensure they don't negatively impact your infrastructure's performance or reliability. Continuously monitor and iterate on your cost optimization efforts as your workloads and AWS usage evolve.
Sources
Community | AWS cost optimization: Top tips and best practices to reduce your bill
AWS Cost Optimization | AWS Cloud Financial Management
AWS Cost Optimization | AWS Cloud Financial Management

answered 10 months ago
0

A lot of this will depend on your need for availability and/or uptime. Does EC2 or ECS need to running 24x7x365? If not, scheduling the instance to stop and start as needed will provide significant savings and should be your first step. Using tools like trusted advisor or compute optimizer may help in understanding if the instances you're running are optimized. If you are able to move to a different instance type, or especially a lower size, you can see significant cost savings. Only after you've done those two would I start to consider a savings plan. As was pointed out already in these responses, a savings plan is a commitment, minimally 1 year. So if you choose to go down that path then ensure your infrastructure will be up and running for a year. For EC2 alone, you'll save the most in terms of percentage off on-demand pricing with an EC2 Instance savings plan, but a generic compute savings plan may apply to your ECS usage as well, plus offers flexibility if you do intend to change around the instance family you're using.

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.