<?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>DEV Community: Michal Šimon</title>
    <description>The latest articles on DEV Community by Michal Šimon (@michalsimon).</description>
    <link>https://dev.to/michalsimon</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%2F430293%2F0a0f52f3-2547-4e86-a14a-462c1b82bfec.png</url>
      <title>DEV Community: Michal Šimon</title>
      <link>https://dev.to/michalsimon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/michalsimon"/>
    <language>en</language>
    <item>
      <title>How STRV Transformed Their Cloud Architecture and Sparked a Culture of Innovation</title>
      <dc:creator>Michal Šimon</dc:creator>
      <pubDate>Mon, 02 Feb 2026 12:30:19 +0000</pubDate>
      <link>https://dev.to/aws-builders/how-strv-transformed-their-cloud-architecture-and-sparked-a-culture-of-innovation-3hph</link>
      <guid>https://dev.to/aws-builders/how-strv-transformed-their-cloud-architecture-and-sparked-a-culture-of-innovation-3hph</guid>
      <description>&lt;p&gt;It all started with an introduction from AWS Hero &lt;a href="https://www.linkedin.com/in/filippyrek/" rel="noopener noreferrer"&gt;Filip Pýrek&lt;/a&gt;, who connected me with &lt;a href="https://www.linkedin.com/in/marekcermak/" rel="noopener noreferrer"&gt;Marek Čermák&lt;/a&gt;, Engineering Manager at STRV. That connection quickly grew into a collaboration that was much more than consulting; it became a journey of transforming architecture, empowering developers, and turning curiosity into real, running prototypes.&lt;/p&gt;

&lt;p&gt;Rather than delivering a predefined architecture, our consultancies were structured as an ongoing exchange of knowledge and architectural best practices. Through this close collaboration, the team could explore modern AWS services in a real-world setting, understand architectural trade-offs, and gain the confidence to choose the right patterns for future challenges.&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%2F1n252k9lnjmiwz01a1ym.jpg" 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%2F1n252k9lnjmiwz01a1ym.jpg" alt="“We chose to work with Michal because of his deep expertise in AWS and serverless architectures. Beyond that, it was also about trust and a proven track record.” - Marek Čermák (Engineering Manager at STRV)" width="800" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over a few months, we explored modern AWS architecture together, looking at how STRV’s internal project could move beyond its monolithic Fargate setup and step into a more scalable, cost-efficient, serverless-first world. The goal was not only to redesign infrastructure but also to give the team a foundation they could immediately build on.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Monolith to Momentum
&lt;/h2&gt;

&lt;p&gt;Before the collaboration, the internal projects were running on a large Fargate container connected to Aurora and S3. This architecture is completely valid, works well, and remains the STRV’s go-to stack. However, for this specific use case, the team’s goal was to explore something leaner, faster, and easier to maintain. As Marek put it:&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%2Fg92q92h4uqk7tc84rbkq.jpg" 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%2Fg92q92h4uqk7tc84rbkq.jpg" alt="“Our main goal was to move away from the monolith and adopt a low-code backend that would be easier to maintain and more cost-effective. We wanted to embrace AWS-native services to improve scalability and help the team iterate faster with less overhead.” - Marek Čermák (Engineering Manager at STRV)" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During our sessions, we mapped out how services like AppSync, Step Functions, Cognito, DynamoDB, Glue, and Athena could replace parts of their monolithic workload with purpose-built, fully managed components. The moment things clicked was when these ideas became practical. Not theoretical diagrams, but real workflows, real data pipelines, and real examples that fit STRV’s day-to-day work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hands-On Learning That Sparked an Idea
&lt;/h2&gt;

&lt;p&gt;As we explored serverless patterns and data pipelines, the team started seeing possibilities everywhere:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;workflows simplified through Step Functions&lt;/li&gt;
&lt;li&gt;backend logic handled by AppSync and resolvers&lt;/li&gt;
&lt;li&gt;data analytics running on S3, Glue, and Athena with almost no operational overhead&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This hands-on learning atmosphere led the STRV team to propose something bold:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Why don’t we take all of this and turn it into a hackathon?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that is exactly what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Weekend Hackathon With Real Results
&lt;/h2&gt;

&lt;p&gt;Two teams, one Saturday, and a room full of developers and whiteboards. The energy in the Prague office was electric from the moment the hackathon kicked off.&lt;/p&gt;

&lt;p&gt;What made the event special was the freedom. There were no sprints and no tickets. Just creativity, experimentation, and a clear deadline.&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%2Fivt44zj6v25g22qs21dl.jpg" 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%2Fivt44zj6v25g22qs21dl.jpg" alt="Team A discussing architecture" width="800" height="450"&gt;&lt;/a&gt;&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%2Fqbiqw5aqtw3htpps6r0g.jpg" 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%2Fqbiqw5aqtw3htpps6r0g.jpg" alt="Team B discussing architecture" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One team went all-in on serverless, building a lightweight backend with AppSync and DynamoDB. The other team blended familiar tools with newly explored AWS Lambda, choosing a steady and incremental approach.&lt;/p&gt;

&lt;p&gt;This contrast turned into one of the most insightful moments of the entire collaboration. It showed how flexible AWS can be and how the same challenge can be solved in completely different ways depending on what you value most, such as speed, familiarity, scalability, or simplicity. What made the event even stronger was the team experience. As &lt;a href="https://www.linkedin.com/in/kocmantomas/" rel="noopener noreferrer"&gt;Tomáš Kocman&lt;/a&gt;, Principal Software Engineer at STRV, shared:&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%2Fnm8um3pq74o9c0yjuwpy.jpg" 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%2Fnm8um3pq74o9c0yjuwpy.jpg" alt="“It strengthened technical skills and deepened team connections.” - Tomáš Kocman, Principal Software Engineer at STRV" width="800" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was a reminder that innovation often thrives in collaborative, encouraging environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Weekend Prototypes to Real Projects
&lt;/h2&gt;

&lt;p&gt;After the hackathon, the team did not just walk away with MVPs. They walked away with confidence. Within weeks, the team put their new skills into practice on an internal project. As they described it,&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%2Fmq0nmqhxxot8m9znt99s.jpg" 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%2Fmq0nmqhxxot8m9znt99s.jpg" alt="“Our team applied what they learned to an internal project, which now runs fully on a serverless AWS low-code backend.” - Marek Čermák (Engineering Manager at STRV)" width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The impact was immediate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;lower operational and maintenance costs&lt;/li&gt;
&lt;li&gt;much faster development cycles&lt;/li&gt;
&lt;li&gt;easier iteration&lt;/li&gt;
&lt;li&gt;improved scalability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Knowledge turned into prototypes, and prototypes turned into production improvements.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Than Architecture, a Cultural Shift
&lt;/h2&gt;

&lt;p&gt;Looking back at the collaboration, the most meaningful outcome wasn’t any single architectural decision. It was how quickly the team moved from learning new concepts to confidently applying them in practice. As &lt;a href="https://www.linkedin.com/in/michalklacko/" rel="noopener noreferrer"&gt;Michal Klacko&lt;/a&gt;, Director of Engineering at STRV, reflected on the experience:&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%2Fl28nlq0ulccl3ooi02bt.jpg" 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%2Fl28nlq0ulccl3ooi02bt.jpg" alt="“Michal helped us scale our AWS expertise quickly. Beyond providing expert consulting on our immediate infrastructure needs, he facilitated practical workshops that effectively bridged knowledge gaps and aligned the team with AWS best practices.” - Michal Klacko (Director of Engineering at STRV)" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By working on a single internal project, the team gained hands-on experience with a wide range of AWS-native and serverless patterns. This experience now enables them to make deliberate, well-informed architectural decisions based on the context of each project.&lt;/p&gt;

&lt;p&gt;Personally, for me, the real success wasn’t the new architecture. It was the momentum the STRV team built around learning and experimenting. I’m thankful to Marek and the entire team for the trust, openness, and great energy they brought into every session.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>hackathon</category>
      <category>lambda</category>
      <category>community</category>
    </item>
    <item>
      <title>How STRV Transformed Their Cloud Architecture and Sparked a Culture of Innovation</title>
      <dc:creator>Michal Šimon</dc:creator>
      <pubDate>Mon, 02 Feb 2026 12:27:23 +0000</pubDate>
      <link>https://dev.to/michalsimon/how-strv-transformed-their-cloud-architecture-and-sparked-a-culture-of-innovation-1nhh</link>
      <guid>https://dev.to/michalsimon/how-strv-transformed-their-cloud-architecture-and-sparked-a-culture-of-innovation-1nhh</guid>
      <description>&lt;p&gt;It all started with an introduction from AWS Hero &lt;a href="https://www.linkedin.com/in/filippyrek/" rel="noopener noreferrer"&gt;Filip Pýrek&lt;/a&gt;, who connected me with &lt;a href="https://www.linkedin.com/in/marekcermak/" rel="noopener noreferrer"&gt;Marek Čermák&lt;/a&gt;, Engineering Manager at STRV. That connection quickly grew into a collaboration that was much more than consulting; it became a journey of transforming architecture, empowering developers, and turning curiosity into real, running prototypes.&lt;/p&gt;

&lt;p&gt;Rather than delivering a predefined architecture, our consultancies were structured as an ongoing exchange of knowledge and architectural best practices. Through this close collaboration, the team could explore modern AWS services in a real-world setting, understand architectural trade-offs, and gain the confidence to choose the right patterns for future challenges.&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%2F1n252k9lnjmiwz01a1ym.jpg" 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%2F1n252k9lnjmiwz01a1ym.jpg" alt="“We chose to work with Michal because of his deep expertise in AWS and serverless architectures. Beyond that, it was also about trust and a proven track record.” - Marek Čermák (Engineering Manager at STRV)" width="800" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over a few months, we explored modern AWS architecture together, looking at how STRV’s internal project could move beyond its monolithic Fargate setup and step into a more scalable, cost-efficient, serverless-first world. The goal was not only to redesign infrastructure but also to give the team a foundation they could immediately build on.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Monolith to Momentum
&lt;/h2&gt;

&lt;p&gt;Before the collaboration, the internal projects were running on a large Fargate container connected to Aurora and S3. This architecture is completely valid, works well, and remains the STRV’s go-to stack. However, for this specific use case, the team’s goal was to explore something leaner, faster, and easier to maintain. As Marek put it:&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%2Fg92q92h4uqk7tc84rbkq.jpg" 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%2Fg92q92h4uqk7tc84rbkq.jpg" alt="“Our main goal was to move away from the monolith and adopt a low-code backend that would be easier to maintain and more cost-effective. We wanted to embrace AWS-native services to improve scalability and help the team iterate faster with less overhead.” - Marek Čermák (Engineering Manager at STRV)" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During our sessions, we mapped out how services like AppSync, Step Functions, Cognito, DynamoDB, Glue, and Athena could replace parts of their monolithic workload with purpose-built, fully managed components. The moment things clicked was when these ideas became practical. Not theoretical diagrams, but real workflows, real data pipelines, and real examples that fit STRV’s day-to-day work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hands-On Learning That Sparked an Idea
&lt;/h2&gt;

&lt;p&gt;As we explored serverless patterns and data pipelines, the team started seeing possibilities everywhere:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;workflows simplified through Step Functions&lt;/li&gt;
&lt;li&gt;backend logic handled by AppSync and resolvers&lt;/li&gt;
&lt;li&gt;data analytics running on S3, Glue, and Athena with almost no operational overhead&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This hands-on learning atmosphere led the STRV team to propose something bold:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Why don’t we take all of this and turn it into a hackathon?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that is exactly what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Weekend Hackathon With Real Results
&lt;/h2&gt;

&lt;p&gt;Two teams, one Saturday, and a room full of developers and whiteboards. The energy in the Prague office was electric from the moment the hackathon kicked off.&lt;/p&gt;

&lt;p&gt;What made the event special was the freedom. There were no sprints and no tickets. Just creativity, experimentation, and a clear deadline.&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%2Fivt44zj6v25g22qs21dl.jpg" 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%2Fivt44zj6v25g22qs21dl.jpg" alt="Team A discussing architecture" width="800" height="450"&gt;&lt;/a&gt;&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%2Fqbiqw5aqtw3htpps6r0g.jpg" 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%2Fqbiqw5aqtw3htpps6r0g.jpg" alt="Team B discussing architecture" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One team went all-in on serverless, building a lightweight backend with AppSync and DynamoDB. The other team blended familiar tools with newly explored AWS Lambda, choosing a steady and incremental approach.&lt;/p&gt;

&lt;p&gt;This contrast turned into one of the most insightful moments of the entire collaboration. It showed how flexible AWS can be and how the same challenge can be solved in completely different ways depending on what you value most, such as speed, familiarity, scalability, or simplicity. What made the event even stronger was the team experience. As &lt;a href="https://www.linkedin.com/in/kocmantomas/" rel="noopener noreferrer"&gt;Tomáš Kocman&lt;/a&gt;, Principal Software Engineer at STRV, shared:&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%2Fnm8um3pq74o9c0yjuwpy.jpg" 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%2Fnm8um3pq74o9c0yjuwpy.jpg" alt="“It strengthened technical skills and deepened team connections.” - Tomáš Kocman, Principal Software Engineer at STRV" width="800" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was a reminder that innovation often thrives in collaborative, encouraging environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Weekend Prototypes to Real Projects
&lt;/h2&gt;

&lt;p&gt;After the hackathon, the team did not just walk away with MVPs. They walked away with confidence. Within weeks, the team put their new skills into practice on an internal project. As they described it,&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%2Fmq0nmqhxxot8m9znt99s.jpg" 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%2Fmq0nmqhxxot8m9znt99s.jpg" alt="“Our team applied what they learned to an internal project, which now runs fully on a serverless AWS low-code backend.” - Marek Čermák (Engineering Manager at STRV)" width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The impact was immediate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;lower operational and maintenance costs&lt;/li&gt;
&lt;li&gt;much faster development cycles&lt;/li&gt;
&lt;li&gt;easier iteration&lt;/li&gt;
&lt;li&gt;improved scalability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Knowledge turned into prototypes, and prototypes turned into production improvements.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Than Architecture, a Cultural Shift
&lt;/h2&gt;

&lt;p&gt;Looking back at the collaboration, the most meaningful outcome wasn’t any single architectural decision. It was how quickly the team moved from learning new concepts to confidently applying them in practice. As &lt;a href="https://www.linkedin.com/in/michalklacko/" rel="noopener noreferrer"&gt;Michal Klacko&lt;/a&gt;, Director of Engineering at STRV, reflected on the experience:&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%2Fl28nlq0ulccl3ooi02bt.jpg" 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%2Fl28nlq0ulccl3ooi02bt.jpg" alt="“Michal helped us scale our AWS expertise quickly. Beyond providing expert consulting on our immediate infrastructure needs, he facilitated practical workshops that effectively bridged knowledge gaps and aligned the team with AWS best practices.” - Michal Klacko (Director of Engineering at STRV)" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By working on a single internal project, the team gained hands-on experience with a wide range of AWS-native and serverless patterns. This experience now enables them to make deliberate, well-informed architectural decisions based on the context of each project.&lt;/p&gt;

&lt;p&gt;Personally, for me, the real success wasn’t the new architecture. It was the momentum the STRV team built around learning and experimenting. I’m thankful to Marek and the entire team for the trust, openness, and great energy they brought into every session.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>hackathon</category>
      <category>lambda</category>
      <category>community</category>
    </item>
    <item>
      <title>From Crashes to Acquisition: How Technical Decisions Stabilized Dividend.watch’s Product</title>
      <dc:creator>Michal Šimon</dc:creator>
      <pubDate>Mon, 26 Jan 2026 14:06:39 +0000</pubDate>
      <link>https://dev.to/michalsimon/from-crashes-to-acquisition-how-technical-decisions-stabilized-dividendwatchs-product-iad</link>
      <guid>https://dev.to/michalsimon/from-crashes-to-acquisition-how-technical-decisions-stabilized-dividendwatchs-product-iad</guid>
      <description>&lt;h2&gt;
  
  
  About Dividend.watch
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dividend.watch" rel="noopener noreferrer"&gt;Dividend.watch&lt;/a&gt; is an investment platform for tracking users' stock portfolios. For their users, reliability is everything, and downtime means missed alerts and frustrated customers.&lt;/p&gt;

&lt;p&gt;So when their platform started crashing every few days, it quickly became a business-critical problem. At that point, the team didn’t yet know what was causing the instability; only that internal firefighting wasn’t leading to a solution. The team was also in the middle of preparation for acquisition, actively talking with several prospects interesting on purchasing the app. These issues were blocking the deal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/aleschromec/" rel="noopener noreferrer"&gt;Aleš Chromec&lt;/a&gt;, Dividend.watch co-founder, made a crucial decision: to bring in external help rather than continue firefighting internally. That decision would prove pivotal.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Dividend.watch reached out when their product began experiencing recurring crashes that were difficult to diagnose. The team knew the application was unstable, but the root cause wasn’t clear. Together, we investigated the issue and traced the crashes to a memory leak caused by architectural patterns that weren’t releasing memory as expected. I helped stabilize the platform and worked with the team to define a clear plan for refactoring the backend.&lt;/p&gt;

&lt;p&gt;With stability restored, the team took ownership of the improvements, successfully refactored the backend, and moved toward a serverless approach. This shift reduced operational burden. The decision to bring in support at the right moment, combined with the team’s execution, strengthened the platform’s technical foundation and helped position the company confidently for an acquisition that successfully happened a few months later.&lt;/p&gt;

&lt;h2&gt;
  
  
  How We Found the Root Cause
&lt;/h2&gt;

&lt;p&gt;The engagement began in a collaborative, hands-on way. Aleš created a dedicated Slack channel and invited me to join, allowing us to share insights. I adapted to their workflow, keeping all discussions and data within their environment.&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%2Fn7xhmctiqr4bxe8ijwdr.jpg" 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%2Fn7xhmctiqr4bxe8ijwdr.jpg" alt="“Working with Michal felt personal and driven. I didn’t have to push things forward, which was really relaxing. It felt more like working with a coworker rather than ‘hired guns.’” - Aleš Chromec (Co-founder &amp;amp; Product Design at Dividend Watch)" width="800" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We started testing hypotheses in their staging environment. However, because the issue only appeared under heavier load, some controlled experiments in production were necessary. I deployed &lt;strong&gt;enhanced logging and memory metrics&lt;/strong&gt; to gain visibility into the system’s behavior under real-world conditions.&lt;/p&gt;

&lt;p&gt;It soon became clear that this was &lt;strong&gt;not a simple bug&lt;/strong&gt;. The app’s instability stemmed from architectural patterns that retained memory longer than necessary. A quick patch wouldn’t be enough.&lt;/p&gt;

&lt;p&gt;To buy time for a proper fix, I proposed a temporary workaround:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Introduced a &lt;strong&gt;load balancer&lt;/strong&gt; and ran the app across multiple instances&lt;/li&gt;
&lt;li&gt;Monitored memory usage per instance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If an instance exceeded thresholds for too long, traffic automatically shifted to healthy nodes, and the “unhealthy” instance was restarted to mitigate the memory leak before it could impact users&lt;/p&gt;

&lt;p&gt;This gave us &lt;strong&gt;stability and breathing room&lt;/strong&gt; to focus on the real solution: refactoring the backend to eliminate the architectural issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing the Root Cause
&lt;/h2&gt;

&lt;p&gt;The root cause wasn’t a single function. It was a &lt;strong&gt;systemic architectural problem&lt;/strong&gt;. To be more specific, long-running WebSockets were used for real-time communication with the frontend, but they weren’t properly freeing memory, which led to slowly consuming resources until the app crashed.&lt;/p&gt;

&lt;p&gt;After pinpointing and fixing the problem, the team &lt;strong&gt;took ownership of the backend rewrite&lt;/strong&gt;. Together, we designed a clear, actionable plan for refactoring. With firefighting reduced, the team could execute the improvements themselves.&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%2Fky7aq3qj728qog2rki64.jpg" 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%2Fky7aq3qj728qog2rki64.jpg" alt="“After fixing the memory leak and stabilizing the application, we saw a 30–40% drop in support tickets; a clear sign of improved customer experience.” - Aleš Chromec (Co-founder &amp;amp; Product Design at Dividend Watch)" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Results
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Near-zero downtime:&lt;/strong&gt; The app went from crashing every few days to running reliably&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Higher developer confidence:&lt;/strong&gt; Refactoring made the backend predictable and maintainable&lt;/li&gt;
&lt;li&gt;Simpler, more modern stack: Serverless adoption reduced load on main servers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Business impact:&lt;/strong&gt; A stable, reliable product positioned the company strongly during the acquisition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The memory leak had put the entire product at risk, but Aleš’s decision to get help at the right time, combined with the team’s execution, &lt;strong&gt;saved the platform and strengthened the company’s technical foundation&lt;/strong&gt;.&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%2Fi3xndpq4k8r35nz30got.jpg" 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%2Fi3xndpq4k8r35nz30got.jpg" alt="“Cooperation with Michal, together with our next steps, has helped us get acquired. It felt like we were giving a project in a very good technical shape.” - Aleš Chromec (Co-founder &amp;amp; Product Design at Dividend Watch)" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;In this case, what began as an unstable application became a catalyst for meaningful architectural improvements, renewed team confidence, and long-term business success.&lt;/p&gt;

&lt;p&gt;And personally, I believe Aleš made the right call to bring in support at the right moment. Together, we stabilized the platform, refactored the backend, and prepared the product for acquisition.&lt;/p&gt;

&lt;p&gt;Sometimes the problems that threaten a product the most are the ones that push teams toward their &lt;strong&gt;best decisions&lt;/strong&gt;, both technically and strategically.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>performance</category>
      <category>saas</category>
      <category>startup</category>
    </item>
    <item>
      <title>What goes after Serverless? I'm looking for a new buzzword.</title>
      <dc:creator>Michal Šimon</dc:creator>
      <pubDate>Mon, 18 Nov 2024 20:06:56 +0000</pubDate>
      <link>https://dev.to/aws-builders/what-goes-after-serverless-im-looking-for-a-new-buzzword-2fff</link>
      <guid>https://dev.to/aws-builders/what-goes-after-serverless-im-looking-for-a-new-buzzword-2fff</guid>
      <description>&lt;p&gt;Over the past two decades, various infrastructure trends have emerged and been replaced by new ones every few years. Initially, we relied on bare metal servers housed in company basements, requiring us to purchase hardware, replace failed hard drives, and manage power outages. With the advent of virtualization and cloud providers, we shifted our focus primarily to software management, though we still had to patch operating systems. Containers further reduced maintenance and enhanced scalability, but we remained responsible for managing the runtime environment. The serverless approach has taken this a step further, allowing us to concentrate solely on our application code and dependencies, while the cloud provider handled the rest.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Lambda is turning 10
&lt;/h2&gt;

&lt;p&gt;At re:Invent 2014, AWS introduced Lambda, marking the beginning of the serverless infrastructure paradigm. While many AWS services, such as SQS and S3, have been serverless from the start, Lambda catalyzed this architectural shift and popularized the term “serverless.” Over the past decade, the ecosystem has matured significantly and has become mainstream. New startups, including ours, are proudly building their entire infrastructure on serverless components.&lt;/p&gt;

&lt;p&gt;A decade is a long time in technology, and innovation is relentless. It was inevitable that a new trend would emerge, and it seems to me that it has. We just don’t have a buzzword for it yet. Before we can start speculating about what comes after serverless, let's discuss what a modern application running on AWS looks like in 2024.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modern Application Stack
&lt;/h2&gt;

&lt;p&gt;From a simplified perspective, most web and mobile applications share fundamental similarities on the backend. They typically provide authentication, accept various forms of user input, send that information via APIs, and store it in a database. This data is then transformed or aggregated and presented back to the user.&lt;/p&gt;

&lt;p&gt;This pattern is evident in e-commerce, CRM systems, internet banking, bookkeeping, and many other applications. Despite these commonalities, each piece of software has unique features that add value for users. Additionally, elements like machine learning models, integrations with other systems, and cryptocurrency transactions further enhance the value of modern applications. However, without the basic components of user input, APIs, and databases, these applications would be largely ineffective.&lt;/p&gt;

&lt;p&gt;When building a new application today, you might leverage Lambda for your event-driven (EDA) microservices (Authenticator, API, Notifier, …). Combined with DynamoDB, these choices are mainstream and safe for a modern cloud-based system.&lt;/p&gt;

&lt;p&gt;But what if there is an alternative?&lt;/p&gt;

&lt;h2&gt;
  
  
  Lambda Alternatives
&lt;/h2&gt;

&lt;p&gt;Fortunately, we no longer need to develop all these microservices ourselves as AWS provides serverless solutions for many common scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authenticator - Cognito&lt;/li&gt;
&lt;li&gt;API - API Gateway, AppSync&lt;/li&gt;
&lt;li&gt;Static Hosting - S3 + CloudFront&lt;/li&gt;
&lt;li&gt;Async jobs - StepFunctions&lt;/li&gt;
&lt;li&gt;Database - DynamoDB&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Creating these services independently can easily consume over 50% of your project time. This effort, known as “Undifferentiated Heavy Lifting,” is essential but doesn’t set your application apart from competitors. Leveraging existing services allows you to concentrate resources on areas where your application delivers unique value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Application Use Case
&lt;/h2&gt;

&lt;p&gt;Imagine a truly serverless application constructed solely by integrating existing AWS services, even going so far as to omit a Lambda function. By "truly serverless," I refer to the &lt;a href="https://www.serverlessmanifesto.com" rel="noopener noreferrer"&gt;original serverless manifesto&lt;/a&gt;, which advocates for resilience, pay-per-use pricing, the ability to scale to zero, and more.&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%2Fni8aebj9sokxq294ceeh.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%2Fni8aebj9sokxq294ceeh.png" alt="AWS Architecture Schema" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whether you opt for a REST API or GraphQL, the architectural variations may differ slightly, but the core concepts remain consistent. Thanks to API Gateway's ability to build custom HTTP requests using the VTL templating language, you can directly call services like DynamoDB to resolve complex queries, retrieve data, and create or update records. The OpenAPI schema defines validation rules for each endpoint, while integration with Cognito manages permissions and security.&lt;/p&gt;

&lt;p&gt;AppSync offers a similar experience but with a few notable enhancements. It includes JavaScript resolvers in addition to standard VTL and Pipeline Resolvers for executing a sequence of steps in a specific GraphQL query or mutation. AppSync also supports GraphQL subscriptions, enabling real-time communication with your frontend over WebSockets. While similar to API Gateway’s capabilities, AppSync provides easier and more comprehensive WebSocket access compared to REST API implementations. Moreover, all AWS services have an HTTP API, allowing you to leverage services like AWS Rekognition for object detection in images or Bedrock for LLM prompting.&lt;/p&gt;

&lt;p&gt;Asynchronous data processing is a common application requirement. Typically, this would involve a Lambda function consuming messages from an SQS queue or EventBridge. However, in our case, we'll use Step Functions to manage tasks such as chaining DynamoDB calls, executing parallel API calls to S3 or sending notifications to the user via SNS, and more.&lt;/p&gt;

&lt;p&gt;Step Functions, combined with API Gateway or AppSync, can also handle synchronous jobs, but you get the idea by now, right? Lambda functions are great but in many cases, you can achieve the same result without them just by “gluing together” existing AWS services.&lt;/p&gt;

&lt;h2&gt;
  
  
  We can live without Lambda, but why should we?
&lt;/h2&gt;

&lt;p&gt;As you can see we can get quite far by this approach. To be honest, from my experience of trying to build Lambdaless applications for several years already, I have to say it is not the most pleasant developer experience. Thankfully, it gets better with every single re:Invent. But why would one do all that hustle if writing a simple Lambda function can get you the same result without the headache?&lt;/p&gt;

&lt;p&gt;I'm glad you asked. I'm not suggesting you abandon using Lambdas where they make sense. Instead, I'm highlighting an alternative worth considering when designing new infrastructure. Lambdas enables the use of familiar technologies, libraries, and frameworks, likely getting you to the desired result faster. However, this speed comes with long-term maintenance costs.&lt;/p&gt;

&lt;p&gt;Lambda runtimes are regularly &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported" rel="noopener noreferrer"&gt;updated and deprecated&lt;/a&gt;, libraries and frameworks receive security patches and improvements, and the tech stack evolves rapidly. Keeping everything up-to-date, especially in complex architectures, is a significant task. Yet, many internal applications are developed once for a specific use case and expected to operate with minimal maintenance for years, leading to technical debt - a costly and cumbersome issue.&lt;/p&gt;

&lt;p&gt;AWS services, in contrast, have stable APIs with minimal breaking changes. If a security issue arises, AWS typically addresses it faster than individual developers could manage for a library or framework. As a side effect, you end up configuring existing AWS services for most of your applications rather than programming in the traditional way. While becoming a YAML developer might seem less exciting, maintaining configuration is much easier over time than managing a Python or JavaScript project.&lt;/p&gt;

&lt;p&gt;By "gluing together" AWS services, you improve operations predictability, uptime, and reliability. Native services handle traffic well, and scalability issues are more often architectural than technological. Additionally, your operation costs align closely with actual usage, which businesses appreciate. While Lambdas are quick to deploy, they can be costly to maintain over time. Relying solely on AWS services may be more expensive to develop initially but is cheaper to operate in the long run. The benefits are great. The question is whether you are willing to exchange the safety and familiarity of standard programming languages for significantly lower maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Back to reality
&lt;/h2&gt;

&lt;p&gt;It’s very likely that you will occasionally need a Lambda function or even a container, and that's perfectly fine. When serverless concepts emerged almost a decade ago, it seemed unlikely that fully serverless systems would become a reality. Yet today, even healthcare and financial sectors rely significantly on serverless architectures, and startups are building fully serverless applications.&lt;/p&gt;

&lt;p&gt;I strongly believe that with the constantly improving developer experience around AWS services, the need to write our own Lambdas for undifferentiated heavy-lifting tasks will diminish. Instead, we will integrate these ready-made "LEGO blocks" as needed for the majority of the use cases with significantly lower maintenance costs and increased reliability at the same time. This will enable us to quickly prototype applications without requiring major refactorings later on. I encourage you to give these ideas a chance and carefully consider whether you truly need your next Lambda function.&lt;/p&gt;

&lt;h2&gt;
  
  
  So how about the buzzword?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Backendless&lt;/strong&gt;, &lt;strong&gt;Backend as a Service&lt;/strong&gt;, and &lt;strong&gt;Backend as Configuration&lt;/strong&gt; are a few of my own suggestions that, while not perfect, might spark some inspiration. If you come across a catchy buzzword for this architectural style, please share it in the comments.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
    </item>
    <item>
      <title>What goes after Serverless? I'm looking for a new buzzword.</title>
      <dc:creator>Michal Šimon</dc:creator>
      <pubDate>Mon, 18 Nov 2024 07:00:00 +0000</pubDate>
      <link>https://dev.to/michalsimon/what-goes-after-serverless-im-looking-for-a-new-buzzword-dch</link>
      <guid>https://dev.to/michalsimon/what-goes-after-serverless-im-looking-for-a-new-buzzword-dch</guid>
      <description>&lt;p&gt;Over the past two decades, various infrastructure trends have emerged and been replaced by new ones every few years. Initially, we relied on bare metal servers housed in company basements, requiring us to purchase hardware, replace failed hard drives, and manage power outages. With the advent of virtualization and cloud providers, we shifted our focus primarily to software management, though we still had to patch operating systems. Containers further reduced maintenance and enhanced scalability, but we remained responsible for managing the runtime environment. The serverless approach has taken this a step further, allowing us to concentrate solely on our application code and dependencies, while the cloud provider handled the rest.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Lambda is turning 10
&lt;/h2&gt;

&lt;p&gt;At re:Invent 2014, AWS introduced Lambda, marking the beginning of the serverless infrastructure paradigm. While many AWS services, such as SQS and S3, have been serverless from the start, Lambda catalyzed this architectural shift and popularized the term “serverless.” Over the past decade, the ecosystem has matured significantly and has become mainstream. New startups, including ours, are proudly building their entire infrastructure on serverless components.&lt;/p&gt;

&lt;p&gt;A decade is a long time in technology, and innovation is relentless. It was inevitable that a new trend would emerge, and it seems to me that it has. We just don’t have a buzzword for it yet. Before we can start speculating about what comes after serverless, let's discuss what a modern application running on AWS looks like in 2024.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modern Application Stack
&lt;/h2&gt;

&lt;p&gt;From a simplified perspective, most web and mobile applications share fundamental similarities on the backend. They typically provide authentication, accept various forms of user input, send that information via APIs, and store it in a database. This data is then transformed or aggregated and presented back to the user.&lt;/p&gt;

&lt;p&gt;This pattern is evident in e-commerce, CRM systems, internet banking, bookkeeping, and many other applications. Despite these commonalities, each piece of software has unique features that add value for users. Additionally, elements like machine learning models, integrations with other systems, and cryptocurrency transactions further enhance the value of modern applications. However, without the basic components of user input, APIs, and databases, these applications would be largely ineffective.&lt;/p&gt;

&lt;p&gt;When building a new application today, you might leverage Lambda for your event-driven (EDA) microservices (Authenticator, API, Notifier, …). Combined with DynamoDB, these choices are mainstream and safe for a modern cloud-based system.&lt;/p&gt;

&lt;p&gt;But what if there is an alternative?&lt;/p&gt;

&lt;h2&gt;
  
  
  Lambda Alternatives
&lt;/h2&gt;

&lt;p&gt;Fortunately, we no longer need to develop all these microservices ourselves as AWS provides serverless solutions for many common scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authenticator - Cognito&lt;/li&gt;
&lt;li&gt;API - API Gateway, AppSync&lt;/li&gt;
&lt;li&gt;Static Hosting - S3 + CloudFront&lt;/li&gt;
&lt;li&gt;Async jobs - StepFunctions&lt;/li&gt;
&lt;li&gt;Database - DynamoDB&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Creating these services independently can easily consume over 50% of your project time. This effort, known as “Undifferentiated Heavy Lifting,” is essential but doesn’t set your application apart from competitors. Leveraging existing services allows you to concentrate resources on areas where your application delivers unique value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Application Use Case
&lt;/h2&gt;

&lt;p&gt;Imagine a truly serverless application constructed solely by integrating existing AWS services, even going so far as to omit a Lambda function. By "truly serverless," I refer to the &lt;a href="https://www.serverlessmanifesto.com" rel="noopener noreferrer"&gt;original serverless manifesto&lt;/a&gt;, which advocates for resilience, pay-per-use pricing, the ability to scale to zero, and more.&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%2Fni8aebj9sokxq294ceeh.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%2Fni8aebj9sokxq294ceeh.png" alt="AWS Architecture Schema" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whether you opt for a REST API or GraphQL, the architectural variations may differ slightly, but the core concepts remain consistent. Thanks to API Gateway's ability to build custom HTTP requests using the VTL templating language, you can directly call services like DynamoDB to resolve complex queries, retrieve data, and create or update records. The OpenAPI schema defines validation rules for each endpoint, while integration with Cognito manages permissions and security.&lt;/p&gt;

&lt;p&gt;AppSync offers a similar experience but with a few notable enhancements. It includes JavaScript resolvers in addition to standard VTL and Pipeline Resolvers for executing a sequence of steps in a specific GraphQL query or mutation. AppSync also supports GraphQL subscriptions, enabling real-time communication with your frontend over WebSockets. While similar to API Gateway’s capabilities, AppSync provides easier and more comprehensive WebSocket access compared to REST API implementations. Moreover, all AWS services have an HTTP API, allowing you to leverage services like AWS Rekognition for object detection in images or Bedrock for LLM prompting.&lt;/p&gt;

&lt;p&gt;Asynchronous data processing is a common application requirement. Typically, this would involve a Lambda function consuming messages from an SQS queue or EventBridge. However, in our case, we'll use Step Functions to manage tasks such as chaining DynamoDB calls, executing parallel API calls to S3 or sending notifications to the user via SNS, and more.&lt;/p&gt;

&lt;p&gt;Step Functions, combined with API Gateway or AppSync, can also handle synchronous jobs, but you get the idea by now, right? Lambda functions are great but in many cases, you can achieve the same result without them just by “gluing together” existing AWS services.&lt;/p&gt;

&lt;h2&gt;
  
  
  We can live without Lambda, but why should we?
&lt;/h2&gt;

&lt;p&gt;As you can see we can get quite far by this approach. To be honest, from my experience of trying to build Lambdaless applications for several years already, I have to say it is not the most pleasant developer experience. Thankfully, it gets better with every single re:Invent. But why would one do all that hustle if writing a simple Lambda function can get you the same result without the headache?&lt;/p&gt;

&lt;p&gt;I'm glad you asked. I'm not suggesting you abandon using Lambdas where they make sense. Instead, I'm highlighting an alternative worth considering when designing new infrastructure. Lambdas enables the use of familiar technologies, libraries, and frameworks, likely getting you to the desired result faster. However, this speed comes with long-term maintenance costs.&lt;/p&gt;

&lt;p&gt;Lambda runtimes are regularly &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported" rel="noopener noreferrer"&gt;updated and deprecated&lt;/a&gt;, libraries and frameworks receive security patches and improvements, and the tech stack evolves rapidly. Keeping everything up-to-date, especially in complex architectures, is a significant task. Yet, many internal applications are developed once for a specific use case and expected to operate with minimal maintenance for years, leading to technical debt - a costly and cumbersome issue.&lt;/p&gt;

&lt;p&gt;AWS services, in contrast, have stable APIs with minimal breaking changes. If a security issue arises, AWS typically addresses it faster than individual developers could manage for a library or framework. As a side effect, you end up configuring existing AWS services for most of your applications rather than programming in the traditional way. While becoming a YAML developer might seem less exciting, maintaining configuration is much easier over time than managing a Python or JavaScript project.&lt;/p&gt;

&lt;p&gt;By "gluing together" AWS services, you improve operations predictability, uptime, and reliability. Native services handle traffic well, and scalability issues are more often architectural than technological. Additionally, your operation costs align closely with actual usage, which businesses appreciate. While Lambdas are quick to deploy, they can be costly to maintain over time. Relying solely on AWS services may be more expensive to develop initially but is cheaper to operate in the long run. The benefits are great. The question is whether you are willing to exchange the safety and familiarity of standard programming languages for significantly lower maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Back to reality
&lt;/h2&gt;

&lt;p&gt;It’s very likely that you will occasionally need a Lambda function or even a container, and that's perfectly fine. When serverless concepts emerged almost a decade ago, it seemed unlikely that fully serverless systems would become a reality. Yet today, even healthcare and financial sectors rely significantly on serverless architectures, and startups are building fully serverless applications.&lt;/p&gt;

&lt;p&gt;I strongly believe that with the constantly improving developer experience around AWS services, the need to write our own Lambdas for undifferentiated heavy-lifting tasks will diminish. Instead, we will integrate these ready-made "LEGO blocks" as needed for the majority of the use cases with significantly lower maintenance costs and increased reliability at the same time. This will enable us to quickly prototype applications without requiring major refactorings later on. I encourage you to give these ideas a chance and carefully consider whether you truly need your next Lambda function.&lt;/p&gt;

&lt;h2&gt;
  
  
  So how about the buzzword?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Backendless&lt;/strong&gt;, &lt;strong&gt;Backend as a Service&lt;/strong&gt;, and &lt;strong&gt;Backend as Configuration&lt;/strong&gt; are a few of my own suggestions that, while not perfect, might spark some inspiration. If you come across a catchy buzzword for this architectural style, please share it in the comments.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Afraid of outgrowing AWS Rekognition? Try YOLO in Lambda.</title>
      <dc:creator>Michal Šimon</dc:creator>
      <pubDate>Thu, 28 Mar 2024 09:33:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/afraid-of-outgrowing-aws-rekognition-try-yolo-in-lambda-25lk</link>
      <guid>https://dev.to/aws-builders/afraid-of-outgrowing-aws-rekognition-try-yolo-in-lambda-25lk</guid>
      <description>&lt;p&gt;When it comes to machine learning, the cloud is a straightforward choice due to its robust computing power. Cloud can also provide a variety of services that can speed up your efforts significantly. For the purpose of this article, we will use computer vision as an example of a machine learning use case and since my cloud of choice is AWS, the most relevant service is AWS Rekognition. It offers an API where you can send a picture and it will respond with a list of keywords that have been identified there. This is perfect for when you are building a PoC of your new product, as these ready-made ML services can bring your idea to life in a cheap and fast manner. &lt;/p&gt;

&lt;p&gt;However, there’s a catch. As your product gains traction and real-world customers, you might find yourself bumping against the limits of AWS Rekognition. Suddenly, what was once a smooth ride can become a bottleneck, both in terms of accuracy and cost. Fear not! Switching quite early to a more flexible solution can save you a lot of headaches - like running a pre-trained model in an AWS Lambda, harnessing the same serverless properties that AWS Rekognition provides.&lt;/p&gt;

&lt;p&gt;In this article, we’ll explore the limitations of AWS Rekognition, dive into the world of YOLO, and guide you through implementing this more adaptable solution. Plus, we’ll look at a cost comparison to help you make an informed decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Rekognition
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/rekognition/"&gt;AWS Rekognition&lt;/a&gt; is a great choice for many types of real-world projects or just for testing an idea on your images. The issue eventually comes with its cost, unfortunately, which we will see later in a specific example. Don’t get me wrong, Rekognition is a great service and I love to use it for its simplicity and reliable performance on quite a few projects. &lt;/p&gt;

&lt;p&gt;Another downside is the inability to grow the model with your business. When embarking on a new project, requirements are often modest. AWS Rekognition shines here, catapulting you from zero to 80% completion in record time. Over time, however, you realise there are some specific cases that you need to optimise your application for and Rekognition is not working flawlessly in those situations anymore. You can bring your own dataset and use &lt;a href="https://aws.amazon.com/rekognition/custom-labels-features/"&gt;AWS Rekognition Custom Labels&lt;/a&gt; which is a fantastic feature. It is a bit of work to get it right but once it works it can get you quite far. Unfortunately, if you outgrow even this feature and you need to tweak your model even further, the only option is to start over with a custom model. This limitation can feel restrictive, hindering your model’s evolution alongside your business needs which brings me to pre-trained models.&lt;/p&gt;

&lt;p&gt;Overall, Rekognition can get you started quite quickly and bring you a lot of added value. Yet, as your project matures, its constraints and pricing can become bottlenecks and you will need to dance around them.&lt;/p&gt;

&lt;h2&gt;
  
  
  YOLO and Friends: A Versatile Approach to Object Detection
&lt;/h2&gt;

&lt;p&gt;You Only Look Once, commonly known as &lt;a href="https://docs.ultralytics.com/models/yolov8/"&gt;YOLO&lt;/a&gt;, is a well-established player in the world of computer vision. This pre-trained model boasts remarkable speed and accuracy, making it an excellent choice for detecting hundreds of object categories within images. Whether you’re building a recommendation system, enhancing security, or analyzing satellite imagery, YOLO has your back. There are also many alternatives out there so do your research and pick the best model for your images. &lt;a href="https://huggingface.co/models"&gt;Hugging Face&lt;/a&gt; is a great starting point.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffvcx0y34q4nc3c7wyure.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffvcx0y34q4nc3c7wyure.png" alt="Hugging Face Computer Vision Categories" width="800" height="941"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;YOLO comes in various sizes, akin to a wardrobe of pre-trained outfits. Start with the smallest,  lightweight and nimble. As your business needs evolve, upgrade to larger variants. But here’s the magic: YOLO’s flexibility extends beyond off-the-rack sizes. You can fine-tune it with your own data, enhancing accuracy to suit your unique context. It needs a little bit of knowledge but by the time your business will need such accuracy, you will probably also have some time and budget for it. It is not a silver bullet but you will eventually not face a dead end with the only solution of starting over like with AWS Rekognition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;Python is these days the de-facto standard programming language for data analysis and machine learning. If you are familiar with Python, go ahead and leverage the YOLO documentation to implement a Python Lambda function for image classification. For educational purposes, I think it’s beneficial to assume you are not necessarily running everything in Python. I like to use JavaScript/TypeScript and I will use it here as an example. If you prefer to write your e-commerce solution, FinTech startup, or CRM in a different language, Python can not stop you here.&lt;/p&gt;

&lt;h3&gt;
  
  
  ONNX Runtime
&lt;/h3&gt;

&lt;p&gt;Developing machine learning (ML) models in Python has become second nature for data scientists and engineers. Yet, the beauty of ML lies not in the language used during development, but in the ability to deploy and run those models seamlessly across diverse platforms. ONNX Runtime is a set of tools that allows you to achieve portability of models across different platforms, languages as well a variety of computing hardware.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F614m2xv9ww6b0hnfbzcc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F614m2xv9ww6b0hnfbzcc.jpg" alt="ONNX Runtime Schema" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can choose a model developed in several of the common frameworks and export it into a &lt;code&gt;*.onnx&lt;/code&gt; format that can be easily run on a specialized cloud processor or in your web browser. Let’s draw a parallel. Think of ONNX as the bytecode of the ML world. When you compile Java code, it transforms into bytecode, a portable representation that can journey across platforms. Then the ONNX Runtime, our Java Virtual Machine (JVM) for ML, will take the intermediate format and run it specifically optimized for the hardware configuration of the device.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqu4rxr8hab004g6vbcsc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqu4rxr8hab004g6vbcsc.png" alt="ONNX Runtime Platforms" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ONNX Runtime is like JVM. Wherever it runs you can execute your models the same way. In our case, we will use the JavaScript version of &lt;a href="https://www.npmjs.com/package/onnxruntime-node"&gt;ONNX Runtime for Node.js&lt;/a&gt; which is running in AWS Lambda as well. If you prefer a different language or a different infrastructure, feel free to leverage it as long as ONNX Runtime is available for your tech stack. Even though ONNX Runtime and JVM are quite different technologies, they share some common concepts at their core.&lt;/p&gt;

&lt;h3&gt;
  
  
  PyTorch to ONNX Conversion
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwwrj4tupp6b9cwuocqd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwwrj4tupp6b9cwuocqd.jpg" alt="PyTorch to ONNX" width="800" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ONNX covers many languages and platforms, yet a touch of Python to convert the model first remains essential. Because YOLO is leveraging PyTorch, let’s look at this variant. If you leverage TensorFlow or any other supported model format, the principle stays the same, just the specific commands will differ.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;

&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./yolov8n.pt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;onnx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;export&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./yolov8n.onnx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, you need to load the original model. In our case it is &lt;code&gt;yolov8n.pt&lt;/code&gt; - the smallest of the shelf YOLO variants. Then we need to convert it to &lt;code&gt;yolov8n.onnx&lt;/code&gt; format. PyTorch already has an export method so we leverage it. Keep in mind that you can tweak the model even during the export and if you are planning to put a heavy load on the model, this can increase your performance and save you quite a lot of money. For simplification, we will just export it as it is.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inference
&lt;/h3&gt;

&lt;p&gt;Running the inference is almost as easy as the export. I will use JavaScript here to demonstrate a different language scenario which you might probably have. The Node.js ONNX Runtime library is quite lightweight and powerful.&lt;/p&gt;

&lt;p&gt;The inference process can be broken down into three main steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Preprocessing - prepare the picture for the model&lt;/li&gt;
&lt;li&gt;Prediction - ask the model to execute the classification&lt;/li&gt;
&lt;li&gt;Postprocessing - convert the output into human-readable format&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We create an &lt;code&gt;InferenceSession&lt;/code&gt; instance which loads the ONNX model. Then you can just run it with the input to classify.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;InferenceSession&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;onnxruntime-node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;InferenceSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./yolov8n.onnx&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The input for the inference is a picture converted into a specific format that YOLO requires. In simple words it needs to be an array of all pixels ordered by colour: &lt;code&gt;[...red, ...green, ...blue]&lt;/code&gt;. Each pixel in a standard color image has a value of red, green and blue which together mix the final color. So if your picture has 2 pixels, you put the red value of the first pixel into the array and move to the next pixel. Once both reds are in the array, repeat the same process for greens and blues.&lt;/p&gt;

&lt;p&gt;Pixel1: &lt;code&gt;[R1, G1, B1]&lt;/code&gt;&lt;br&gt;
Pixel2: &lt;code&gt;[R2, G2, B2]&lt;/code&gt;&lt;br&gt;
YOLO Input: &lt;code&gt;[R1, R2, G1, G2, B1, B2]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For more details, explore the YOLO v8 &lt;a href="https://github.com/ultralytics/ultralytics/blob/main/examples/YOLOv8-ONNXRuntime/main.py#L101"&gt;reference implementation&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Results
&lt;/h3&gt;

&lt;p&gt;YOLO returns back three types of information. They all come in a bit ciphered format from the model but with a little bit of postprocessing (&lt;a href="https://towardsdatascience.com/non-maximum-suppression-nms-93ce178e177c"&gt;NMS&lt;/a&gt;) they look like this: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Label - the model returns an identifier, which you can easily convert to a name of the object category&lt;/li&gt;
&lt;li&gt;Bounding Box - coordinates, where in the picture was the label detected&lt;/li&gt;
&lt;li&gt;Probability - a number on a range from 0 to 1 how confident is the model about the label here
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"person"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"probability"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.41142538189888&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"boundingBox"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="mf"&gt;730.8682617187501&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="mf"&gt;400.01552124023436&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="mf"&gt;150.67451171875&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="mf"&gt;180.06134033203125&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It’s important to note that bounding box coordinates are normalized. You will therefore need to account for the original image width and height to calculate the specific coordinates if you want to draw rectangles around the detected objects like in my example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftnxapszbbbfqopcvfiwx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftnxapszbbbfqopcvfiwx.png" alt="YOLO Object Detection Result" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;p&gt;Microservices and event-driven architecture (EDA) are preferred choices in modern cloud architectures. The only step missing here is wrapping an API around the model and deploying it into a Lambda function that fits well into this architecture paradigm from several points of view.&lt;/p&gt;

&lt;p&gt;Lambda is a serverless compute service that allows quick scaling and handling quite a big load as well as scaling down to zero. This means that Lambda itself costs nothing if not used. It’s an ideal candidate for an infrequent asynchronous load to annotate images. Scenarios like automatic content moderation, building an image search index, or improving your image ALT attributes because of SEO are perfect for this architecture.&lt;/p&gt;

&lt;p&gt;Ideally, we would like to leverage an asynchronous SQS queue or EventBridge as a source of the events. Furthermore, storing the actual image in S3 and the results in DynamoDB can be a great addition. These architectural decisions depend highly on your application though.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flo7ily8i3oytjegwf9lh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flo7ily8i3oytjegwf9lh.png" alt="YOLO Lambda Infrastructure" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  AWS Rekognition vs. YOLO Lambda Comparison
&lt;/h2&gt;

&lt;p&gt;I’ve mentioned earlier that AWS Rekognition is not the cheapest service, especially at scale so let’s compare the YOLO Lambda solution with Rekognition. Note that this is not a detailed benchmark, just a high-level comparison. Your implementation may vary.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://aws.amazon.com/rekognition/pricing/#Image_Analysis"&gt;AWS Rekognition&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;YOLO &lt;a href="https://aws.amazon.com/lambda/pricing/"&gt;Lambda&lt;/a&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Inference&lt;/td&gt;
&lt;td&gt;~300ms&lt;/td&gt;
&lt;td&gt;~1s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per image&lt;/td&gt;
&lt;td&gt;$0.0010&lt;/td&gt;
&lt;td&gt;$0.0000166667&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Images per $1&lt;/td&gt;
&lt;td&gt;~1000&lt;/td&gt;
&lt;td&gt;~60K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resources&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;1024 MB RAM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Other&lt;/td&gt;
&lt;td&gt;us-east-1&lt;/td&gt;
&lt;td&gt;YOLO: 8n&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As you can see, the price difference (~60x) is quite significant in favor of YOLO Lambda although the comparison is not strictly apples to apples. I used the smallest YOLO model which is not as accurate as Rekognition. For some use cases that might be enough though. On the other hand, you can leverage the flexibility of a custom image model and upgrade the accuracy as you go or even fine-tune the accuracy with your own dataset.&lt;/p&gt;

&lt;p&gt;With Rekognition, you get the simplicity of an API which is in many cases great to start with and in some cases even to stay with. YOLO Lambda is a bit more complicated to build and operate, however, it gives you great flexibility in terms of price, functionality, performance, and accuracy. Both variants can be further optimised for performance and cost so don’t take this calculation for granted.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Computer Vision is a very interesting and helpful capability if you are working with pictures. It can help you moderate content, identify specific objects, or even improve the SEO of your e-commerce website (article coming soon).&lt;/p&gt;

&lt;p&gt;Achieving the best accuracy vs. price combination can sometimes be tricky with API-based services. Therefore we explored the possibilities of how to take advantage of pre-trained models like YOLO and run them in AWS Lambda with much more control and options to tweak for your specific use case. Finally, we compared the pros and cons of each solution from the cost perspective so you can pick the right one for you.&lt;/p&gt;

&lt;p&gt;For those interested in delving deeper into this topic, I recently spoke at a conference where I discussed these concepts in greater detail. I encourage you to watch the video of the talk for additional insights and practical examples. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/qeG238sCSZw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Are you leveraging computer vision in your application? Leave a comment below, I would love to hear your thoughts and experience.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>javascript</category>
      <category>machinelearning</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Afraid of outgrowing AWS Rekognition? Try YOLO in Lambda.</title>
      <dc:creator>Michal Šimon</dc:creator>
      <pubDate>Tue, 26 Mar 2024 20:00:08 +0000</pubDate>
      <link>https://dev.to/michalsimon/afraid-of-outgrowing-aws-rekognition-try-yolo-in-lambda-4pcf</link>
      <guid>https://dev.to/michalsimon/afraid-of-outgrowing-aws-rekognition-try-yolo-in-lambda-4pcf</guid>
      <description>&lt;p&gt;When it comes to machine learning, the cloud is a straightforward choice due to its robust computing power. Cloud can also provide a variety of services that can speed up your efforts significantly. For the purpose of this article, we will use computer vision as an example of a machine learning use case and since my cloud of choice is AWS, the most relevant service is AWS Rekognition. It offers an API where you can send a picture and it will respond with a list of keywords that have been identified there. This is perfect for when you are building a PoC of your new product, as these ready-made ML services can bring your idea to life in a cheap and fast manner. &lt;/p&gt;

&lt;p&gt;However, there’s a catch. As your product gains traction and real-world customers, you might find yourself bumping against the limits of AWS Rekognition. Suddenly, what was once a smooth ride can become a bottleneck, both in terms of accuracy and cost. Fear not! Switching quite early to a more flexible solution can save you a lot of headaches - like running a pre-trained model in an AWS Lambda, harnessing the same serverless properties that AWS Rekognition provides.&lt;/p&gt;

&lt;p&gt;In this article, we’ll explore the limitations of AWS Rekognition, dive into the world of YOLO, and guide you through implementing this more adaptable solution. Plus, we’ll look at a cost comparison to help you make an informed decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Rekognition
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/rekognition/"&gt;AWS Rekognition&lt;/a&gt; is a great choice for many types of real-world projects or just for testing an idea on your images. The issue eventually comes with its cost, unfortunately, which we will see later in a specific example. Don’t get me wrong, Rekognition is a great service and I love to use it for its simplicity and reliable performance on quite a few projects. &lt;/p&gt;

&lt;p&gt;Another downside is the inability to grow the model with your business. When embarking on a new project, requirements are often modest. AWS Rekognition shines here, catapulting you from zero to 80% completion in record time. Over time, however, you realise there are some specific cases that you need to optimise your application for and Rekognition is not working flawlessly in those situations anymore. You can bring your own dataset and use &lt;a href="https://aws.amazon.com/rekognition/custom-labels-features/"&gt;AWS Rekognition Custom Labels&lt;/a&gt; which is a fantastic feature. It is a bit of work to get it right but once it works it can get you quite far. Unfortunately, if you outgrow even this feature and you need to tweak your model even further, the only option is to start over with a custom model. This limitation can feel restrictive, hindering your model’s evolution alongside your business needs which brings me to pre-trained models.&lt;/p&gt;

&lt;p&gt;Overall, Rekognition can get you started quite quickly and bring you a lot of added value. Yet, as your project matures, its constraints and pricing can become bottlenecks and you will need to dance around them.&lt;/p&gt;

&lt;h2&gt;
  
  
  YOLO and Friends: A Versatile Approach to Object Detection
&lt;/h2&gt;

&lt;p&gt;You Only Look Once, commonly known as &lt;a href="https://docs.ultralytics.com/models/yolov8/"&gt;YOLO&lt;/a&gt;, is a well-established player in the world of computer vision. This pre-trained model boasts remarkable speed and accuracy, making it an excellent choice for detecting hundreds of object categories within images. Whether you’re building a recommendation system, enhancing security, or analyzing satellite imagery, YOLO has your back. There are also many alternatives out there so do your research and pick the best model for your images. &lt;a href="https://huggingface.co/models"&gt;Hugging Face&lt;/a&gt; is a great starting point.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffvcx0y34q4nc3c7wyure.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffvcx0y34q4nc3c7wyure.png" alt="Hugging Face Computer Vision Categories" width="800" height="941"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;YOLO comes in various sizes, akin to a wardrobe of pre-trained outfits. Start with the smallest,  lightweight and nimble. As your business needs evolve, upgrade to larger variants. But here’s the magic: YOLO’s flexibility extends beyond off-the-rack sizes. You can fine-tune it with your own data, enhancing accuracy to suit your unique context. It needs a little bit of knowledge but by the time your business will need such accuracy, you will probably also have some time and budget for it. It is not a silver bullet but you will eventually not face a dead end with the only solution of starting over like with AWS Rekognition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;Python is these days the de-facto standard programming language for data analysis and machine learning. If you are familiar with Python, go ahead and leverage the YOLO documentation to implement a Python Lambda function for image classification. For educational purposes, I think it’s beneficial to assume you are not necessarily running everything in Python. I like to use JavaScript/TypeScript and I will use it here as an example. If you prefer to write your e-commerce solution, FinTech startup, or CRM in a different language, Python can not stop you here.&lt;/p&gt;

&lt;h3&gt;
  
  
  ONNX Runtime
&lt;/h3&gt;

&lt;p&gt;Developing machine learning (ML) models in Python has become second nature for data scientists and engineers. Yet, the beauty of ML lies not in the language used during development, but in the ability to deploy and run those models seamlessly across diverse platforms. ONNX Runtime is a set of tools that allows you to achieve portability of models across different platforms, languages as well a variety of computing hardware.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F614m2xv9ww6b0hnfbzcc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F614m2xv9ww6b0hnfbzcc.jpg" alt="ONNX Runtime Schema" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can choose a model developed in several of the common frameworks and export it into a &lt;code&gt;*.onnx&lt;/code&gt; format that can be easily run on a specialized cloud processor or in your web browser. Let’s draw a parallel. Think of ONNX as the bytecode of the ML world. When you compile Java code, it transforms into bytecode, a portable representation that can journey across platforms. Then the ONNX Runtime, our Java Virtual Machine (JVM) for ML, will take the intermediate format and run it specifically optimized for the hardware configuration of the device.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqu4rxr8hab004g6vbcsc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqu4rxr8hab004g6vbcsc.png" alt="ONNX Runtime Platforms" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ONNX Runtime is like JVM. Wherever it runs you can execute your models the same way. In our case, we will use the JavaScript version of &lt;a href="https://www.npmjs.com/package/onnxruntime-node"&gt;ONNX Runtime for Node.js&lt;/a&gt; which is running in AWS Lambda as well. If you prefer a different language or a different infrastructure, feel free to leverage it as long as ONNX Runtime is available for your tech stack. Even though ONNX Runtime and JVM are quite different technologies, they share some common concepts at their core.&lt;/p&gt;

&lt;h3&gt;
  
  
  PyTorch to ONNX Conversion
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwwrj4tupp6b9cwuocqd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwwrj4tupp6b9cwuocqd.jpg" alt="PyTorch to ONNX" width="800" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ONNX covers many languages and platforms, yet a touch of Python to convert the model first remains essential. Because YOLO is leveraging PyTorch, let’s look at this variant. If you leverage TensorFlow or any other supported model format, the principle stays the same, just the specific commands will differ.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;

&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./yolov8n.pt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;onnx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;export&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./yolov8n.onnx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, you need to load the original model. In our case it is &lt;code&gt;yolov8n.pt&lt;/code&gt; - the smallest of the shelf YOLO variants. Then we need to convert it to &lt;code&gt;yolov8n.onnx&lt;/code&gt; format. PyTorch already has an export method so we leverage it. Keep in mind that you can tweak the model even during the export and if you are planning to put a heavy load on the model, this can increase your performance and save you quite a lot of money. For simplification, we will just export it as it is.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inference
&lt;/h3&gt;

&lt;p&gt;Running the inference is almost as easy as the export. I will use JavaScript here to demonstrate a different language scenario which you might probably have. The Node.js ONNX Runtime library is quite lightweight and powerful.&lt;/p&gt;

&lt;p&gt;The inference process can be broken down into three main steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Preprocessing - prepare the picture for the model&lt;/li&gt;
&lt;li&gt;Prediction - ask the model to execute the classification&lt;/li&gt;
&lt;li&gt;Postprocessing - convert the output into human-readable format&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We create an &lt;code&gt;InferenceSession&lt;/code&gt; instance which loads the ONNX model. Then you can just run it with the input to classify.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;InferenceSession&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;onnxruntime-node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;InferenceSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./yolov8n.onnx&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The input for the inference is a picture converted into a specific format that YOLO requires. In simple words it needs to be an array of all pixels ordered by colour: &lt;code&gt;[...red, ...green, ...blue]&lt;/code&gt;. Each pixel in a standard color image has a value of red, green and blue which together mix the final color. So if your picture has 2 pixels, you put the red value of the first pixel into the array and move to the next pixel. Once both reds are in the array, repeat the same process for greens and blues.&lt;/p&gt;

&lt;p&gt;Pixel1: &lt;code&gt;[R1, G1, B1]&lt;/code&gt;&lt;br&gt;
Pixel2: &lt;code&gt;[R2, G2, B2]&lt;/code&gt;&lt;br&gt;
YOLO Input: &lt;code&gt;[R1, R2, G1, G2, B1, B2]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For more details, explore the YOLO v8 &lt;a href="https://github.com/ultralytics/ultralytics/blob/main/examples/YOLOv8-ONNXRuntime/main.py#L101"&gt;reference implementation&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Results
&lt;/h3&gt;

&lt;p&gt;YOLO returns back three types of information. They all come in a bit ciphered format from the model but with a little bit of postprocessing (&lt;a href="https://towardsdatascience.com/non-maximum-suppression-nms-93ce178e177c"&gt;NMS&lt;/a&gt;) they look like this: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Label - the model returns an identifier, which you can easily convert to a name of the object category&lt;/li&gt;
&lt;li&gt;Bounding Box - coordinates, where in the picture was the label detected&lt;/li&gt;
&lt;li&gt;Probability - a number on a range from 0 to 1 how confident is the model about the label here
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"person"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"probability"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.41142538189888&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"boundingBox"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="mf"&gt;730.8682617187501&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="mf"&gt;400.01552124023436&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="mf"&gt;150.67451171875&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="mf"&gt;180.06134033203125&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It’s important to note that bounding box coordinates are normalized. You will therefore need to account for the original image width and height to calculate the specific coordinates if you want to draw rectangles around the detected objects like in my example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftnxapszbbbfqopcvfiwx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftnxapszbbbfqopcvfiwx.png" alt="YOLO Object Detection Result" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;p&gt;Microservices and event-driven architecture (EDA) are preferred choices in modern cloud architectures. The only step missing here is wrapping an API around the model and deploying it into a Lambda function that fits well into this architecture paradigm from several points of view.&lt;/p&gt;

&lt;p&gt;Lambda is a serverless compute service that allows quick scaling and handling quite a big load as well as scaling down to zero. This means that Lambda itself costs nothing if not used. It’s an ideal candidate for an infrequent asynchronous load to annotate images. Scenarios like automatic content moderation, building an image search index, or improving your image ALT attributes because of SEO are perfect for this architecture.&lt;/p&gt;

&lt;p&gt;Ideally, we would like to leverage an asynchronous SQS queue or EventBridge as a source of the events. Furthermore, storing the actual image in S3 and the results in DynamoDB can be a great addition. These architectural decisions depend highly on your application though.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flo7ily8i3oytjegwf9lh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flo7ily8i3oytjegwf9lh.png" alt="YOLO Lambda Infrastructure" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  AWS Rekognition vs. YOLO Lambda Comparison
&lt;/h2&gt;

&lt;p&gt;I’ve mentioned earlier that AWS Rekognition is not the cheapest service, especially at scale so let’s compare the YOLO Lambda solution with Rekognition. Note that this is not a detailed benchmark, just a high-level comparison. Your implementation may vary.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://aws.amazon.com/rekognition/pricing/#Image_Analysis"&gt;AWS Rekognition&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;YOLO &lt;a href="https://aws.amazon.com/lambda/pricing/"&gt;Lambda&lt;/a&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Inference&lt;/td&gt;
&lt;td&gt;~300ms&lt;/td&gt;
&lt;td&gt;~1s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per image&lt;/td&gt;
&lt;td&gt;$0.0010&lt;/td&gt;
&lt;td&gt;$0.0000166667&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Images per $1&lt;/td&gt;
&lt;td&gt;~1000&lt;/td&gt;
&lt;td&gt;~60K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resources&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;1024 MB RAM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Other&lt;/td&gt;
&lt;td&gt;us-east-1&lt;/td&gt;
&lt;td&gt;YOLO: 8n&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As you can see, the price difference (~60x) is quite significant in favor of YOLO Lambda although the comparison is not strictly apples to apples. I used the smallest YOLO model which is not as accurate as Rekognition. For some use cases that might be enough though. On the other hand, you can leverage the flexibility of a custom image model and upgrade the accuracy as you go or even fine-tune the accuracy with your own dataset.&lt;/p&gt;

&lt;p&gt;With Rekognition, you get the simplicity of an API which is in many cases great to start with and in some cases even to stay with. YOLO Lambda is a bit more complicated to build and operate, however, it gives you great flexibility in terms of price, functionality, performance, and accuracy. Both variants can be further optimised for performance and cost so don’t take this calculation for granted.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Computer Vision is a very interesting and helpful capability if you are working with pictures. It can help you moderate content, identify specific objects, or even improve the SEO of your e-commerce website (article coming soon).&lt;/p&gt;

&lt;p&gt;Achieving the best accuracy vs. price combination can sometimes be tricky with API-based services. Therefore we explored the possibilities of how to take advantage of pre-trained models like YOLO and run them in AWS Lambda with much more control and options to tweak for your specific use case. Finally, we compared the pros and cons of each solution from the cost perspective so you can pick the right one for you.&lt;/p&gt;

&lt;p&gt;For those interested in delving deeper into this topic, I recently spoke at a conference where I discussed these concepts in greater detail. I encourage you to watch the video of the talk for additional insights and practical examples. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/qeG238sCSZw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Are you leveraging computer vision in your application? Leave a comment below, I would love to hear your thoughts and experience.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>machinelearning</category>
      <category>serverless</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Homelab - Lego for tech enthusiasts</title>
      <dc:creator>Michal Šimon</dc:creator>
      <pubDate>Wed, 13 Sep 2023 08:11:51 +0000</pubDate>
      <link>https://dev.to/michalsimon/homelab-lego-for-tech-enthusiasts-4im</link>
      <guid>https://dev.to/michalsimon/homelab-lego-for-tech-enthusiasts-4im</guid>
      <description>&lt;p&gt;I’m a cloud enthusiast who loves tinkering with different technologies and learning new things. That’s why I have decided to invest quite some time in setting up my own homelab, a computing environment where I can run my applications and services, experiment with different configurations and scenarios, and have fun with my gadgets. In this article, I want to share what a homelab is, how I built mine, and why you should consider building one too.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Homelab
&lt;/h2&gt;

&lt;p&gt;A homelab is your personal computing playground. A small on-premise solution for anything you want to test, experiment and learn on. It’s a great way how to build a piece of infrastructure to serve some non-critical workload, let it break, and fix it again to reveal opportunities for improvement in your architecture design. It’s also great for gaining hands-on experience and deepening your understanding of infrastructure concepts.&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%2Fjetavosydadff4b7h59u.jpg" 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%2Fjetavosydadff4b7h59u.jpg" alt="HP ProLiant MicroServer Gen10 Plus" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Among all the fun, homelab also comes with several challenges. Mainly it’s time, money, and energy to set up and maintain some extra hardware. Trust me, it’s a great commitment so make sure you manage your expectations accordingly. It can generate noise and heat, or pose a security risk if not properly configured. However, it’s a great way to have fun with technology without being afraid of breaking something serious (like production at work) and can be a rewarding experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  The “hard” Lego pieces
&lt;/h2&gt;

&lt;p&gt;The main server of my homelab is an &lt;a href="https://buy.hpe.com/us/en/compute/proliant-microserver/proliant-microserver/proliant-microserver/hpe-proliant-microserver-gen10-plus/p/1012241014" rel="noopener noreferrer"&gt;HP ProLiant MicroServer Gen10 Plus&lt;/a&gt; with an Intel Xeon E-2224 CPU, 16 GB of memory, 512GB NVMe SSD, and three 2TB 3.5 NAS hard drives.  &lt;/p&gt;

&lt;p&gt;For networking, I use several Mikrotik routers and switches, including the &lt;a href="https://mikrotik.com/product/rb4011igs_5hacq2hnd_in" rel="noopener noreferrer"&gt;Mikrotik RB4011iGS+5HacQ2HnD-IN&lt;/a&gt;, which is a powerful router with a quad-core CPU, 1 GB of RAM, 10 Gigabit ports, and dual-band 4x4 802.11ac wireless. This router acts as the gateway and firewall for my homelab network as well as providing wireless connectivity.&lt;/p&gt;

&lt;p&gt;I also have two &lt;strong&gt;Reolink IP cameras&lt;/strong&gt; which we will explore deeper in the following computer vision articles. These cameras have 4K resolution, night vision, and motion detection, and can stream video to my server or cloud storage.&lt;/p&gt;

&lt;p&gt;Finally, I have a &lt;strong&gt;Raspberry Pi 4 model B&lt;/strong&gt; with 8GB RAM that I use for running additional applications that do not require much computing power. Some parts of this infrastructure are backed up by a UPS unit connected to a 12V car battery.&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%2F46b94pdakci0rfu6ugd9.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%2F46b94pdakci0rfu6ugd9.png" alt="Homelab Network Topology" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The “soft” Lego pieces
&lt;/h2&gt;

&lt;p&gt;I have various applications and services running on my homelab, each with its own purpose. I use &lt;strong&gt;Proxmox&lt;/strong&gt; as my main hypervisor, which allows me to create and manage multiple virtual machines on my HP server. All VMs leverage the NVMe SSD, which offers high performance and low latency. One of the virtual machines I run is &lt;strong&gt;TrueNAS Scale&lt;/strong&gt;, which covers all my storage needs, such as file sharing, backups, media streaming, and more for my whole homelab. It has direct access to the 3x 2TB hard drives in my server, which are configured as direct pass-through devices. This way, I can use the full capacity and performance of the hard drives without any overhead from the hypervisor.&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%2Ffwyvfup8htt5wu8f9ub0.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%2Ffwyvfup8htt5wu8f9ub0.png" alt="Physical Server Schema" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the advantages of using TrueNAS Scale is that it supports ZFS, a modern filesystem that offers many features such as snapshots, compression, and encryption. For my 6TB total hard drive storage capacity, I chose to use RAIDZ1, which is ZFS’s equivalent of RAID5. &lt;strong&gt;RAIDZ1&lt;/strong&gt; uses a parity block to store redundant information that can be used to recover data if one of the hard drives fails. This way, I achieve a balance between durability and performance, as I get 4TB of usable storage and &lt;strong&gt;protection against single-drive failure&lt;/strong&gt;. As a side effect, it also gives me double the HDD read speed, as it can read parts of the same file from two drives at once.&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%2Fa4czvb4gzeakv2s5oysf.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%2Fa4czvb4gzeakv2s5oysf.png" alt="RAIDZ1 Overview in TrueNAS Scale" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ZFS is not only a filesystem, but also a volume manager that allows me to partition the storage into multiple datasets based on the use case. &lt;strong&gt;Datasets&lt;/strong&gt; are like sub-filesystems that can have their own properties, such as compression, encryption, quotas, and permissions. For example, for large video files, it is better to configure a dataset differently than for many small text files to achieve the best performance. Additionally, TrueNAS allows me to connect to the storage through many different protocols. For instance, in my case, I use SMB, FTP, and &lt;strong&gt;S3&lt;/strong&gt; thanks to &lt;strong&gt;MinIO&lt;/strong&gt;.&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%2Fgb657foda8bmuf5f1an9.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%2Fgb657foda8bmuf5f1an9.png" alt="MinIO Overview" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TrueNAS Scale runs among other services its own instance of &lt;strong&gt;K3s&lt;/strong&gt;, which is a lightweight Kubernetes distribution that allows extensibility on top of the ZFS storage solution. In my case, I run a &lt;strong&gt;MariaDB&lt;/strong&gt; database in a container with a persistency layer in its own ZFS dataset. Finetuning the dataset for a relational database type of workload with regular snapshots and encryption was quite a challenge but I learned a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gotta talk about the cloud
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Having a homelab makes me a better cloud architect
&lt;/h3&gt;

&lt;p&gt;I am probably not giving away any spoilers by saying that almost everything in the cloud runs on top of bare metal servers. The cloud provider may abstract us from the complexity of managing the hardware, network, and security aspects of the infrastructure, but I do believe that this knowledge can be essential. By having some hands-on experience and seeing what is happening under the hood, I can gain a deeper understanding of how different components interact, how to troubleshoot issues, and how to optimize performance and scalability.&lt;/p&gt;

&lt;p&gt;Just to be clear, in no way am I saying that managed cloud services are bad. Quite the opposite, I am a huge fan of AWS Lambda, AppSync, and many other services that make development easier and faster. However, I have felt that my lack of understanding of the underlying systems prevented me from designing the best architecture possible. But that’s just me, trying to be a perfectionist. &lt;/p&gt;

&lt;h3&gt;
  
  
  Homelab and cloud?
&lt;/h3&gt;

&lt;p&gt;As a cloud enthusiast, I could not stop my mind from drawing parallels between my homelab and the cloud. To the extent that I could directly link my on-premise solution to some cloud concepts. Yes, it sounds a little bit ridiculous but bear with me, please.&lt;/p&gt;

&lt;p&gt;My HP Server with Proxmox is like an &lt;strong&gt;AWS Availability Zone&lt;/strong&gt; with a single server rack unit. Unfortunately, I can not plan for high availability just yet due to this limitation. Proxmox interface is comparable to an AWS Console where I can spin up new resources and monitor their utilization.&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%2Fgk4nwf1d3tswuwrbp32i.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%2Fgk4nwf1d3tswuwrbp32i.png" alt="Proxmox Resources" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The cloud is usually on a very high level categorized as Network, Storage, and Compute. Almost all services require all three to operate, however, we can simply think about them so.&lt;/p&gt;

&lt;p&gt;In my case, the &lt;strong&gt;Networking&lt;/strong&gt; is done through my Mikrotik routers where I can manage my firewall, routing tables, subnets, and IP ranges. This is similar to AWS VPC and Security Groups. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compute&lt;/strong&gt; is covered by Proxmox which provides a building block of a Virtual Machine. This is similar to the AWS EC2 service. &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Storage&lt;/strong&gt; part is handled by TrueNAS which provides services like MinIO S3, FTP, SMB, and MySQL which is comparable to AWS S3, RDS, and so on.&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%2Fsau1amqjegysfs342u7p.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%2Fsau1amqjegysfs342u7p.png" alt="Comparison between AWS and Homelab" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It would be nice to have support for serverless functions and other higher-level services, however, that’s one of the main reasons why it makes more sense to run your workload in the cloud instead of on-premise. The cloud offers more flexibility, scalability, reliability, and features than a homelab can ever provide. However, a homelab also has its advantages, such as lower cost (depending on the usage), more control over the hardware and software, and more fun for crazy people like me. 🙂&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Let me know if you would be interested in seeing Knative in my homelab.)&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Homelab is the ideal place for me to experiment, make mistakes and learn from them. It has given me a lot of insight into the cloud and the amazing work that cloud providers do behind the scenes.&lt;/p&gt;

&lt;p&gt;By running my own servers, I have gained hands-on experience with different technologies and systems administration skills. I have also learned to appreciate the convenience, flexibility, scalability, and reliability of cloud services that abstract away many of the complexities and challenges of running your own infrastructure.&lt;/p&gt;

&lt;p&gt;At the end of the day, there are servers under the serverless functions and managed services, and as Werner Vogels, the CTO of AWS says: “Everything fails all the time”. It’s good to then know how the magic of the cloud works and how to fix it in case of a need.&lt;/p&gt;

&lt;p&gt;I have thoroughly enjoyed building my own “personal cloud” and will be using it for various purposes, such as media streaming, file sharing, backups, and more. Homelab is a rewarding experience that I would recommend to anyone who is interested in technology and wants to grow their skills and knowledge.&lt;/p&gt;

&lt;p&gt;Big thanks goes to &lt;a href="https://technotim.live/" rel="noopener noreferrer"&gt;TechnoTim&lt;/a&gt;, &lt;a href="https://www.youtube.com/channel/UCHkYOD-3fZbuGhwsADBd9ZQ" rel="noopener noreferrer"&gt;Lawrence Systems&lt;/a&gt;, and all the open-source software this project could not have happened without.&lt;/p&gt;

</description>
      <category>homelab</category>
      <category>cloud</category>
      <category>proxmox</category>
      <category>truenas</category>
    </item>
  </channel>
</rss>
