<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Saksham Awasthi</title>
    <description>The latest articles on Forem by Saksham Awasthi (@sakshamawasthi).</description>
    <link>https://forem.com/sakshamawasthi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F561591%2Ff15c6573-ffc7-488d-8c43-9b0d1610829b.jpeg</url>
      <title>Forem: Saksham Awasthi</title>
      <link>https://forem.com/sakshamawasthi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sakshamawasthi"/>
    <language>en</language>
    <item>
      <title>I Was About to Run terraform apply - Then I Saw the Price Tag</title>
      <dc:creator>Saksham Awasthi</dc:creator>
      <pubDate>Tue, 22 Apr 2025 20:33:57 +0000</pubDate>
      <link>https://forem.com/sakshamawasthi/i-was-about-to-run-terraform-apply-then-i-saw-the-price-tag-4n8g</link>
      <guid>https://forem.com/sakshamawasthi/i-was-about-to-run-terraform-apply-then-i-saw-the-price-tag-4n8g</guid>
      <description>&lt;h2&gt;
  
  
  Just Another Infra Change - Or So I Thought
&lt;/h2&gt;

&lt;p&gt;I was working on a small update to the infrastructure. We needed to scale out a couple of services—specifically, adding extra capacity to our web servers and database tier. So, I had to add two EC2 instances of type &lt;code&gt;m5.large&lt;/code&gt; and resize an existing EBS volume from 100GB to 250GB for more storage. Simple stuff—just another change to keep things running smoothly within the infra.&lt;/p&gt;

&lt;p&gt;I quickly wrote the Terraform config, added the new instances and the resized EBS volume, and ran &lt;code&gt;terraform plan&lt;/code&gt;. The output looked good—two new EC2 instances and a larger storage volume. Nothing unexpected, everything was as it should be. I was about to hit &lt;code&gt;terraform apply&lt;/code&gt; and move on with my day.&lt;/p&gt;

&lt;p&gt;Then I stopped for a second. Something felt off. I’ve been through this before—what seems like a small change can easily end up costing a lot more than expected. In the past, I’ve had EC2 instances running at &lt;code&gt;m5.xlarge&lt;/code&gt; when &lt;code&gt;t3.medium&lt;/code&gt; would have been enough, costing $100/month instead of $40. I’ve also spun up additional NAT Gateways without fully considering the implications. Those small, overlooked things can quickly add up. I wasn’t about to make that mistake again.&lt;/p&gt;

&lt;p&gt;So I thought, “Let me check the price before I apply this.” Better safe than sorry.&lt;/p&gt;

&lt;h2&gt;
  
  
  This Tool Helped Me Dodge a Big Bill
&lt;/h2&gt;

&lt;p&gt;What I needed was a way to check the cost of my changes directly in the terminal—without logging into any UI or cloud dashboard. I wanted to get the cost estimate as part of my workflow, right alongside running &lt;code&gt;terraform plan&lt;/code&gt;, so I could catch any surprises before actually deploying.&lt;/p&gt;

&lt;p&gt;I did some quick research, just scrolling through Reddit, LinkedIn, and Twitter for about 20 minutes, looking for a tool that could do exactly that. After a bit of digging, I found &lt;a href="https://github.com/terrateamio/openinfraquote" rel="noopener noreferrer"&gt;OpenInfraQuote&lt;/a&gt;. It seemed to check all the boxes: a command-line tool that would pull in your &lt;code&gt;terraform plan&lt;/code&gt;, match it with AWS pricing, and give you an estimate without leaving your terminal.&lt;/p&gt;

&lt;p&gt;Curious to try it out, I gave it a shot. Here’s how it worked:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I ran the standard Terraform plan:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform plan -out=tf.plan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Then, I converted the plan into JSON format:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform show -json tf.plan &amp;gt; tfplan.json

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Finally, I used OpenInfraQuote with the pricing sheet:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;oiq match --pricesheet prices.csv tfplan.json | oiq price --region us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result was eye-opening. The tool estimated the cost increase at around $560.64/month. Here’s a breakdown of the cost:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajb8q87ygoq72twwnknh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajb8q87ygoq72twwnknh.png" alt="Cost estimate for smaller infra setup" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two &lt;code&gt;m5.2xlarge&lt;/code&gt; EC2 instances were added, each costing about $280.32/month.&lt;/p&gt;

&lt;p&gt;If I had gone ahead and applied the plan without checking this, I would’ve ended up deploying two high-cost instances that would have added a significant amount to the monthly bill. This check saved me from making that mistake, ensuring I didn’t deploy unnecessary resources that would have pushed the cloud costs higher than expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  It's Simple to Use and Doesn’t Get in the Way
&lt;/h2&gt;

&lt;p&gt;What I really appreciated about OpenInfraQuote was how easy it was to use. There was no need to sign up for anything, no cloud credentials to manage, and I didn’t have to leave my terminal. It worked simply with the &lt;code&gt;terraform plan&lt;/code&gt; I already had.&lt;/p&gt;

&lt;p&gt;Once I ran the command, the tool immediately gave me a clear, easy-to-read breakdown of the cost estimate. It didn’t require any extra configuration or setup. The output showed exactly what each resource would cost per month.&lt;/p&gt;

&lt;p&gt;The estimate included the two EC2 instances I was adding, with their individual costs clearly listed. However, it didn’t include the EBS volume resizing, which was interesting. I had resized an EBS volume from 100GB to 250GB, but the output didn’t break down the cost for that specifically. It only focused on the main resources that would have the most significant cost impact, like the EC2 instances.&lt;/p&gt;

&lt;p&gt;While the EBS volume resizing didn’t show up in the output, I knew from experience that resizing volumes can still contribute to costs—especially if you’re working with a lot of data or higher performance disks. Even though the tool didn’t call it out directly, the main concern in this case was clearly the EC2 instances.&lt;/p&gt;

&lt;h2&gt;
  
  
  I Tried It On a Real-World Setup — That’s Where It Shine
&lt;/h2&gt;

&lt;p&gt;After seeing how useful OpenInfraQuote was in a smaller test environment, I wanted to see how it performed on something more complex—a real-world, production-like setup. This wasn’t just a simple tweak; I needed to test it on a more intricate configuration involving auto-scaling, load balancers, CloudWatch alarms, launch templates, along with a mix of EC2 instances, EBS volumes, and NAT Gateways spread across availability zones.&lt;/p&gt;

&lt;p&gt;I thought, “Let me scale this setup to see where the tool might struggle or hit its limits.” I wasn’t expecting it to handle everything perfectly, but I was curious if it could manage the complexity and still deliver a useful cost estimate.&lt;/p&gt;

&lt;p&gt;I ran the tool expecting a similar clear, concise breakdown—and sure enough, it delivered. Here’s the result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgn39wh1v2r97teoj4f89.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgn39wh1v2r97teoj4f89.png" alt="Cost estimate for larger infra" width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As seen in the output, the cost increase was significant—$17,870.40 per month. The main contributors to the cost were the two EC2 GPU instances, each costing around $8,935.20 per month. This immediately caught my attention and made me realize I had some high-cost resources in the mix.&lt;/p&gt;

&lt;p&gt;The tool helped me pinpoint where the costs were escalating—mainly the EC2 instances and NAT Gateways—and gave me the opportunity to adjust the configuration before pushing it to production. Without that check, I could have ended up deploying these resources, resulting in an unexpectedly high cloud bill.&lt;/p&gt;

&lt;p&gt;While OpenInfraQuote performed well on this setup, it did highlight one limitation: it’s excellent at estimating core services like compute, storage, and networking, but it doesn't cover every AWS service, particularly specialized or advanced ones. For example, while it accurately estimated the cost of EC2 instances and NAT Gateways, some other AWS resources, such as niche features or advanced configurations, may not be included in the estimate. Despite this, the tool effectively identified major cost drivers, making it an invaluable tool for catching potential issues before deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  It’s Part of My Workflow Now
&lt;/h2&gt;

&lt;p&gt;After seeing how effective OpenInfraQuote was in identifying potential cost issues, I decided to make it a part of my regular workflow. Now, I run this tool every time I look at a Terraform plan. It’s become a standard step for me, right after I check the diff.&lt;/p&gt;

&lt;p&gt;It’s simple to integrate into our process and helps my team and me spot any unexpected cost jumps before we merge anything. This way, we can catch problems before they become real financial issues. We even started including the cost output in our pull requests—just so everyone knows exactly what the change will cost in dollars, ensuring full transparency.&lt;/p&gt;

&lt;p&gt;While OpenInfraQuote has been a great addition, it’s not perfect. There are still a few AWS services that it doesn’t price, which means you have to be mindful of certain resources. However, for the core services—compute, storage, and networking—it’s incredibly solid. The pricing estimates are based on real, up-to-date AWS data, which gives us confidence in the numbers.&lt;/p&gt;

&lt;p&gt;Using this tool helps me avoid surprises, gives me peace of mind, and ensures that our cloud spend stays under control without adding any extra complexity or steps to the process. It's become one of those essential tools in my day-to-day workflow.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;OpenInfraQuote is now essential to my workflow. Would I recommend it? Absolutely. It’s fast, precise, and saves a lot of headaches by catching cost issues before deployment. Simple tool, big impact.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>aws</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Started to explore the world of machine learning😍</title>
      <dc:creator>Saksham Awasthi</dc:creator>
      <pubDate>Sat, 17 Apr 2021 19:06:07 +0000</pubDate>
      <link>https://forem.com/sakshamawasthi/started-to-explore-the-world-of-machine-learning-2lko</link>
      <guid>https://forem.com/sakshamawasthi/started-to-explore-the-world-of-machine-learning-2lko</guid>
      <description>&lt;p&gt;I was having total focus on js HTML and cs&lt;br&gt;
but this machine learning and AI kicked my passion and developed a gr8 interest and passion in this 😃&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Foolish Learner🎯</title>
      <dc:creator>Saksham Awasthi</dc:creator>
      <pubDate>Sat, 17 Apr 2021 19:03:14 +0000</pubDate>
      <link>https://forem.com/sakshamawasthi/foolish-learner-22n3</link>
      <guid>https://forem.com/sakshamawasthi/foolish-learner-22n3</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmlocnrr9j5t84ndaz7aj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmlocnrr9j5t84ndaz7aj.png" alt="image" width="800" height="1066"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As I am in my second semester of my college, and at the beginning of that I was totally new to coding and stuffs . I usually asks someone who was a pro level coder who was consistently doing it from his 8th standard or 9th .&lt;br&gt;
I tried many things such as machine learning , learning different types of languages such as c,c++ , java , pyhton , ruby and many more . but at the end of the day I was in such a pressure that if I am doing something wrong which would not give me that much of result , which I captured from that doubt only and discovered that in real life about the existence of “Quality over Quantity “and from that onwards I started working on only some particular languages which was the first stone I crossed&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faa2uz52oo5oovxn7xgvt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faa2uz52oo5oovxn7xgvt.png" alt="image" width="600" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So when I realised my mistake I was in my second semester and sometimes I think that I am far behind from the top 1% , but that keeps a person motivated , make your own hurdles , cross them -&amp;gt; MAKE MORE HURDLES !&lt;br&gt;
Whatever you are starting you should get up and start that , don't compare yourself with others and keep motivated . Only you know your success rate as the success according to me is in comparison to your past version .&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh6xp7lyb14eyffx4bjgt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh6xp7lyb14eyffx4bjgt.png" alt="image" width="600" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am just in love with the journey of Steve Jobs story and quotes and also his way of doing work , as the legend himself said ~ “Stay hungry stay FOOLISH”&lt;br&gt;
treat yourself as a foolish and explore to learn new things ..&lt;br&gt;
I am now trying to do something new and unique and you can call me a foolish because Iam .. !&lt;br&gt;
Started learning new things and now became my goal to be exploring each field .&lt;br&gt;
BEGINNER-&amp;gt; PRO&lt;br&gt;
Stay Motivated and don't make your fear of comparison a enemy of yours 😉  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>HELLO WORLD</title>
      <dc:creator>Saksham Awasthi</dc:creator>
      <pubDate>Sun, 17 Jan 2021 15:44:50 +0000</pubDate>
      <link>https://forem.com/sakshamawasthi/hello-world-20pl</link>
      <guid>https://forem.com/sakshamawasthi/hello-world-20pl</guid>
      <description>&lt;p&gt;Beginner ,  ready to start the journey !!&lt;/p&gt;

&lt;p&gt;:)&lt;/p&gt;

</description>
      <category>iamtheretooo</category>
    </item>
  </channel>
</rss>
