Welcome to another AWS Cost optimization blog rather about tracking or being on track for saving costs
In earlier posts, we have seen on creating on budgets to alert us and to keep track of our spend, reservation utilization or savings plans utilizations can be created & alerted when threshold is reached
But when we study AWS Bill, monthly or weekly or daily level, we have a "Dimension" on specific service level and yet again there is another level of granularity that gives "Usage Type" level of filter. This "Usage Type" is reporting the level of hours( in terms of utilization in 'Cost & Unit Graph')
While studying a monthly bill, I noticed majority is utilized against Usage Type "NATGateway Hours". With this in agenda, let us see what can be done or looked into to reduce the usage & track them on monthly basis
Basically, a NAT Gateway is created in a VPC, it is essentially a 'Network Address Translator'. When 'Public' it gives internet access for EC2 instances in private subnet and when 'Private' it allows access between VPC(s), on-premise instances.
Ideally, the consumption of NAT Gateway usage costs needs to be tracked, analyzed & re-worked based on use case scenarios, but that is for another day. Before all that, I am setting a budget for usage type, as my use case is around Nat Gateway
Please follow the below steps to track the 'Usage Type' budget alert, so that we are on track for where the most of the utilization goes
Step 1
i) Create a budget from AWS Budget service
ii) select 'Custom Template' while creating the budget
Step 2
i) Name the budget with description
ii) select 'Usage Type' as 'USE2-NAT Gateway Hours'
iii) This is being selected, as the use case revolves around tracking this cost from the monthly bill
iii) There are many other 'Usage Types' provided in AWS and use them as according to your requirement
Step 3
i) Next, is about seeing the budget that you plan or budget to spend on this category
ii) 'Monthly' type budget
iii) 'Recurring' helps to keep track of the same amount/hours every month for this 'USE2-NAT gateway hours' category. This will help in understanding the usage beyond the limit, and steps can be taken to reduce the usage first hand
Step 4
i) Interestingly, most useful part is that, more than one service could have costed this usage/amount for 'Usage Type' and we can restrict with those, as well
ii) I have selected "AWS All services" but if required services could be limited too. For example, EC2 services etc
Step 5
i) Now, all that is left out is set the email ids, for which the alert has to be sent out
ii) Alerts can be AWS SNS Topic as well or AWS Chime to inform teams/groups
iii) Here, I have given simple email id, but officially, this will be your official group which has to be alerted on the threshold
iv) my alert threshold is '90%' and this could be defined as needed
Step 6
i) Below is the budget post the creation
ii) Budget already is in alert state with 120% breach as I have set 'Oct 2023' as start month. Ideally if set for future date the alert would be on time any day while the 90% usage has been met with
Step 7
i) Yet, got the email alert from AWS Budgets, regarding the threshold breach for 500 Hours usage of NAT Gateway for month of Oct, 2023
Please note that this 'Usage Type' I created targeting 'Nat Gateway' usage to track based on by requirement but go ahead and create one for your business or personal requirement as per your services usage or usage types. There are lot of other Usage Types available for tracking
Thanks again !!
Top comments (0)