EBS volumes are the most common way to store files on AWS. They offer scalable and reliable persistent storage. They can also get expensive if not managed properly.

If you follow a couple of basic rules, you can ensure your monthly AWS storage bills will remain at a reasonable level:
– make sure you update your volumes to the latest type of the same family (e.g. upgrade to the latest GP3 as it’s cheaper and more efficient)
– don’t over-allocate the volume size and IOPS level, it is easier to extend EBS volumes than it is to shrink them
– maintain CloudWatch alarms and review metrics regularly to ensure you use the correct type of EBS (some metrics are available only after installing the CloudWatch agent on your EC2)
– make sure you don’t keep any EBS volumes in the ‘Available’ state, those are not used by any resources. You can create a much cheaper snapshot and delete the volume
– use Trusted Advisor, and its Cost Optimization -> Underutilized EBS feature to get a quick glimpse as volumes that are reported as underutilized

The storage cost tends to take a large portion of the AWS bill. Remember to review your resources regularly to ensure you can get the most out of them.
2

Spot instances are a great way to save money for your EC2-based workloads on AWS. They allow using Amazon’s spare capacity for a discounted cost, up to 80% cheaper than a standard on-demand price.#

Admittedly that sounds tempting, but it is important to remember this option is not without risk. It may happen that AWS will need that capacity back and our resources get unexpectedly terminated. Your application needs to be fault-tolerant and flexible to handle this kind of disruption. 

To minimize the risk of running out of hardware, it is a good idea to run a mixture of on-demand and spot instances. That can be easily achieved through auto-scaling groups and launch templates. 

Also, it is possible to implement automation around the termination process. AWS triggers notifications in advance that can be then parsed by e.g. AWS Lambda and perform appropriate actions to ensure the continuity of your application.

There is no “one-fits-all” spot instance strategy, so it is important to review your workload patterns and requirements before any decisions are made.
0

AWS Cloud costs can sometimes be hiding and never found unless you explicitly “seek” them out. For example,  AWS Glue costs are partially calculated on the time needed for them to run. 

So, ensure you take measures to protect yourself against this wasted cost:
> Be sure to monitor and create alerts for Glue jobs that run longer than your expected job execution time. This can help you identify hanging jobs that are doing nothing more than costing you money
> Ensure you write jobs efficiently as possible to eliminate wasted execution time. The better the code, the more money you save.
> Avoid sprawling code as much as possible. If you can avoid a Glue job that calls an external piece of code or process that is out of your control, do it. And if you can’t , then code smart to ensure your code exits when the external code does not go as planned. Avoiding this wasted time will save you money.
0