<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>VPC Endpoint on Break Lib Site</title>
        <link>https://break.mlibia.xyz/tags/vpc-endpoint/</link>
        <description>Recent content in VPC Endpoint 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/tags/vpc-endpoint/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>
        
    </channel>
</rss>
