<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Finops on Break Lib Site</title>
        <link>https://break.mlibia.xyz/categories/finops/</link>
        <description>Recent content in Finops on Break Lib Site</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <copyright>Lib Copyright</copyright>
        <lastBuildDate>Mon, 22 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://break.mlibia.xyz/categories/finops/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>I Was Calling Models. I Found This</title>
        <link>https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/</link>
        <pubDate>Mon, 22 Jun 2026 00:00:00 +0000</pubDate>
        
        <guid>https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/</guid>
        <description>&lt;h2 id=&#34;one-account-and-many-models-what-is-bedrock&#34;&gt;One account and many models. What Is Bedrock?
&lt;/h2&gt;&lt;p&gt;Amazon Bedrock is a fully managed AWS service that gives you access to foundation models from multiple providers Anthropic, Google, Amazon, and more. You access models by simply referencing a model ID like &lt;code&gt;amazon.nova-micro-v1:0&lt;/code&gt; and pay per request directly through your AWS bill. Read docs about Anthropic case 😊.&lt;/p&gt;
&lt;p&gt;For this project I picked &lt;strong&gt;Amazon Nova Micro&lt;/strong&gt; Amazon&amp;rsquo;s own lightweight text model.&lt;/p&gt;
&lt;h2 id=&#34;finops-concern-if-i-start-a-business&#34;&gt;FinOps Concern: If I Start a Business
&lt;/h2&gt;&lt;p&gt;Getting a model running is exciting. Paying an unexpected $800 bill at the end of the month is not. Before writing your business logic with LLM. I recommend you to set up cost allocation: tagging Lambda functions and making sure every Bedrock call was traceable. When you&amp;rsquo;re building a product, knowing &lt;em&gt;which feature&lt;/em&gt; consumed &lt;em&gt;how many tokens&lt;/em&gt; is mandatory.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/meme.png&#34;
	width=&#34;456&#34;
	height=&#34;252&#34;
	srcset=&#34;https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/meme_hu8785925070541765685.png 480w, https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/meme_hu16311999974622148690.png 1024w&#34;
	loading=&#34;lazy&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;180&#34;
		data-flex-basis=&#34;434px&#34;
	
&gt;&lt;/p&gt;
&lt;h2 id=&#34;llm-large-language-model-literacy&#34;&gt;LLM (Large Language Model) literacy
&lt;/h2&gt;&lt;p&gt;The four parameters appear across every LLM, sometimes with different names or casing (&lt;code&gt;maxTokens&lt;/code&gt; in Claude, &lt;code&gt;max_new_tokens&lt;/code&gt; in Nova):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;maxTokens&lt;/code&gt;&lt;/strong&gt; hard cap on output length. Set it or risk runaway responses and runaway bills.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;temperature&lt;/code&gt;&lt;/strong&gt; controls randomness. &lt;code&gt;0.2&lt;/code&gt; for precise answers, &lt;code&gt;0.9&lt;/code&gt; for creative generation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;topP&lt;/code&gt;&lt;/strong&gt; nucleus sampling. The model only considers tokens whose cumulative probability reaches this threshold. Keeps outputs coherent without being robotic.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;topK&lt;/code&gt;&lt;/strong&gt; limits the candidate pool to the top K most likely tokens. A lower value like &lt;code&gt;20&lt;/code&gt; produces focused, predictable text.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;i-need-to-monitor-my-cost&#34;&gt;I need to monitor my cost
&lt;/h2&gt;&lt;p&gt;Every invocation has a cost. Without visibility, you&amp;rsquo;re flying blind.&lt;/p&gt;
&lt;p&gt;I integrated &lt;strong&gt;AWS Lambda Powertools&lt;/strong&gt; (&lt;code&gt;Logger&lt;/code&gt;) to emit structured JSON logs to CloudWatch on every request: prompt length, token counts, latency, and a calculated cost estimate per call. With a single CloudWatch Insights query you can surface your most expensive prompts in seconds and optimize before costs scale. Important is simple to add this module by layers.&lt;/p&gt;
&lt;p&gt;So I get this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/comparation.png&#34;
	width=&#34;816&#34;
	height=&#34;438&#34;
	srcset=&#34;https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/comparation_hu16427511932654540539.png 480w, https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/comparation_hu9665491010942911883.png 1024w&#34;
	loading=&#34;lazy&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;186&#34;
		data-flex-basis=&#34;447px&#34;
	
&gt;&lt;/p&gt;
&lt;p&gt;a clear picture:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/clear-img.png&#34;
	width=&#34;477&#34;
	height=&#34;446&#34;
	srcset=&#34;https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/clear-img_hu17119213498070472113.png 480w, https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/clear-img_hu17738563782146844293.png 1024w&#34;
	loading=&#34;lazy&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;106&#34;
		data-flex-basis=&#34;256px&#34;
	
&gt;&lt;/p&gt;
&lt;p&gt;Full code is in my heart. I&amp;rsquo;m joking is in a GitHub Gist 🔗&lt;a class=&#34;link&#34; href=&#34;https://gist.github.com/b70049319bce8c6fcb49879bf92e7867.git&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;The super api nova invocation&lt;/a&gt;. Feel free to study it&lt;/p&gt;
&lt;p&gt;Reading more docs How to take care of wallet. I found the classic techique the powerfull tagging and then easily you can find in billing dashboard your usage cost. Here is an example.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/cost-tag.png&#34;
	width=&#34;620&#34;
	height=&#34;335&#34;
	srcset=&#34;https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/cost-tag_hu3799461953441453400.png 480w, https://break.mlibia.xyz/p/i-was-calling-models.-i-found-this/cost-tag_hu3173612267245777438.png 1024w&#34;
	loading=&#34;lazy&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;185&#34;
		data-flex-basis=&#34;444px&#34;
	
&gt;&lt;/p&gt;
&lt;h2 id=&#34;conclusion-the-adventure&#34;&gt;Conclusion: The Adventure
&lt;/h2&gt;&lt;p&gt;Combining theory with hours of applied practice is where the real learning lives. 🤘&lt;/p&gt;
&lt;h2 id=&#34;usefull-links&#34;&gt;Usefull Links
&lt;/h2&gt;&lt;p&gt;👉&lt;a class=&#34;link&#34; href=&#34;https://docs.aws.amazon.com/nova/latest/nova2-userguide/request-response-schema.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;models  response body&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;👉&lt;a class=&#34;link&#34; href=&#34;https://docs.aws.amazon.com/powertools/python/latest/tutorial/#simplifying-with-logger&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;aws powertools for logging&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;👉&lt;a class=&#34;link&#34; href=&#34;https://www.binadox.com/blog/binadox-article-enable-model-invocation-logging/7&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;invocattion model&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;oftoppic&#34;&gt;Oftoppic
&lt;/h2&gt;&lt;p&gt;A dog is not a toy/gift. A dog is a part of a family.&lt;/p&gt;

</description>
        </item>
        <item>
        <title>Taking care of my AWS budget :)</title>
        <link>https://break.mlibia.xyz/p/taking-care-of-my-aws-budget/</link>
        <pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate>
        
        <guid>https://break.mlibia.xyz/p/taking-care-of-my-aws-budget/</guid>
        <description>&lt;h3 id=&#34;why-we-need-be-responsable-with-our-aws-bills&#34;&gt;Why we need be responsable with our AWS bills😅
&lt;/h3&gt;&lt;p&gt;We know how to use AWS,  but when you recibe bills for unused services, it is  pain. These days, you can find many aplication inside AWS that help you with your cost expenses. In the past, I saw many features for AWS plans like organization, but these days you have the same one in your account. We can have the same bill as organizations if we don&amp;rsquo;t use the tools for tracking cost.&lt;/p&gt;
&lt;h3 id=&#34;i-want-to-try-the-aws-tag-policies-section-but-i-am-not-in-an-organization&#34;&gt;I want to try the AWS Tag Policies section, but i am not in an Organization
&lt;/h3&gt;&lt;p&gt;That feature is for Organizations, and Organizations are meant for big infrastructures.This is a good blog post 👉  &lt;a class=&#34;link&#34; href=&#34;https://sree-chalasani.medium.com/tags-in-aws-what-are-they-why-do-you-need-them-d1da231d59c1&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;How to set up tag policies in Organizations&lt;/a&gt;. You don&amp;rsquo;t need to wait just try other methods.&lt;/p&gt;
&lt;p&gt;Now I will present the &lt;code&gt;aws:RequestTag&lt;/code&gt; that you can apply inside any policy condition for Deny SQS creation or other resource.   First, add a policy to an IAM group(in my case devs group) that grants permission to all users within that group.&lt;/p&gt;
&lt;p&gt;A normal denny Policy.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &amp;#34;Version&amp;#34;: &amp;#34;2012-10-17&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &amp;#34;Statement&amp;#34;: [
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    {
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &amp;#34;Sid&amp;#34;: &amp;#34;DenyCreateQueueWithoutEnvTag&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &amp;#34;Effect&amp;#34;: &amp;#34;Deny&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &amp;#34;Action&amp;#34;: &amp;#34;sqs:CreateQueue&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &amp;#34;Resource&amp;#34;: &amp;#34;arn:aws:&amp;lt;some-resource&amp;gt;:::&amp;lt;name&amp;gt;&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      #################### CONDITION
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  ]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The condition could be.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Not Env in tags.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &amp;#34;Condition&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &amp;#34;Null&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &amp;#34;aws:RequestTag/Env&amp;#34;: &amp;#34;true&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        }
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      }
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;or&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The tag value not equal to: dev, test or prod.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;#34;Condition&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &amp;#34;StringNotEquals&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &amp;#34;aws:RequestTag/Env&amp;#34;: [
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &amp;#34;dev&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &amp;#34;test&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &amp;#34;prod&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;iframe title=&#34;AWS Resource Tags with aws:RequestTag&#34; width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://video.laotra.red/videos/embed/wXykzMm9Re3ShwjLjLfttr&#34; allow=&#34;fullscreen&#34; sandbox=&#34;allow-same-origin allow-scripts allow-popups allow-forms&#34; style=&#34;border: 0px;&#34;&gt;&lt;/iframe&gt;
&lt;h2 id=&#34;off-topic&#34;&gt;Off topic
&lt;/h2&gt;&lt;p&gt;You can change the wordl!!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://break.mlibia.xyz/p/taking-care-of-my-aws-budget/borar.png&#34;
	width=&#34;397&#34;
	height=&#34;314&#34;
	srcset=&#34;https://break.mlibia.xyz/p/taking-care-of-my-aws-budget/borar_hu2532542488301364346.png 480w, https://break.mlibia.xyz/p/taking-care-of-my-aws-budget/borar_hu17296740298585508322.png 1024w&#34;
	loading=&#34;lazy&#34;
	
		alt=&#34;streetart&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;126&#34;
		data-flex-basis=&#34;303px&#34;
	
&gt;&lt;/p&gt;

</description>
        </item>
        
    </channel>
</rss>
