<?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: Evandro Pires</title>
    <description>The latest articles on DEV Community by Evandro Pires (@epiresdasilva).</description>
    <link>https://dev.to/epiresdasilva</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%2F629787%2F89ae9eaa-364d-4869-adf7-53baef3483ea.jpeg</url>
      <title>DEV Community: Evandro Pires</title>
      <link>https://dev.to/epiresdasilva</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/epiresdasilva"/>
    <language>en</language>
    <item>
      <title>Is Serverless expensive at scale? Only if you are using it wrong</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Mon, 29 Sep 2025 17:17:47 +0000</pubDate>
      <link>https://dev.to/aws-heroes/is-serverless-expensive-at-scale-only-if-you-are-using-it-wrong-19pa</link>
      <guid>https://dev.to/aws-heroes/is-serverless-expensive-at-scale-only-if-you-are-using-it-wrong-19pa</guid>
      <description>&lt;p&gt;I have been part of the serverless ecosystem for some years now. I have spoken not only in Brazil, but also in Latin America and the US, sharing knowledge and use cases through talks, the Sem Servidor podcast, and the events I organize on this topic.&lt;/p&gt;

&lt;p&gt;During these years I always heard the same objections about serverless. I can say they usually focus on three points:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;At scale it becomes too expensive&lt;/li&gt;
&lt;li&gt;Vendor lock-in is a blocker&lt;/li&gt;
&lt;li&gt;It adds too much complexity&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I will make a series of posts about each one of them. For now, let’s start with the first one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Breaking biases
&lt;/h2&gt;

&lt;p&gt;When we talk about serverless, what comes to your mind? Let me guess: function as a service (or Lambda, for those who use AWS).&lt;/p&gt;

&lt;p&gt;That is very good, and Lambda helped to democratize serverless a lot. But at the same time, it created a big bias: the idea that serverless is only function as a service. In reality, serverless is a much bigger ecosystem.&lt;/p&gt;

&lt;p&gt;By concept, serverless means services where you don’t need to manage servers to have automatic scalability and high availability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bias 1: Serverless is only Lambda. Lambda is important and works as the glue for many serverless architectures, but we cannot reduce serverless to this service alone.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lambda is an important type of compute, but it is not the only one. For example, in AWS we can run containers in ECS Fargate with no servers to manage, with high availability and automatic scalability. When Lambda is not a good fit, this is a strong alternative for building software with very low operational effort.&lt;/p&gt;

&lt;p&gt;I am using it in one of the operations I am involved with, and the time spent on operations is close to zero — a great cost-benefit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bias 2: Containers are not serverless. Yes, we can run containers in a serverless way and enjoy the advantages of low or zero operations while still having scalability and availability.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And serverless is not only about compute. We also have serverless services for storage, databases, messaging, and more.&lt;/p&gt;

&lt;p&gt;Let me guess again: you use S3 every day, like drinking coffee. Then you are already using serverless. If you used SQS, that is serverless too.&lt;/p&gt;

&lt;p&gt;Most of the time these services work very well, even at scale, without being a problem.&lt;/p&gt;

&lt;p&gt;I am not here to defend serverless at all costs. My point is to help you think clearly: not everything makes sense for every case, and not everything is bad either.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bias 3: Serverless is only compute. In reality, we already use many serverless services like S3, SQS, and API Gateway without even thinking of them as serverless. And when people say “serverless is too expensive”, many times they are only talking about Lambda.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But there is more to explore.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture that makes costs work
&lt;/h2&gt;

&lt;p&gt;Designing an architecture that balances infrastructure cost and operation cost (people’s time) is complex. And this is where human thinking still adds value, even with AI growing in our work.&lt;/p&gt;

&lt;p&gt;First, remember: we cannot look only at infrastructure costs (the cloud bill). We also need to consider the time spent by the team to make everything run: scaling services, configuring servers, deployments, and so on. All this is part of the cost.&lt;/p&gt;

&lt;p&gt;The serverless paradigm was created to be event-driven. To get the best of scalability, availability, and costs, we need to bring our architecture closer to this model.&lt;/p&gt;

&lt;p&gt;Just doing lift-and-shift of an old app into synchronous functions or containers will not work. If the goal is only “to be in the cloud”, then other services are cheaper and better, of course.&lt;/p&gt;

&lt;p&gt;But if the goal is to get the best from the cloud, then serverless can be your strongest ally.&lt;/p&gt;

&lt;p&gt;For example, the granularity of a Lambda function can make the difference between sustainable cost or exploding bills. Many successful cases of Lambda use group CRUD operations into a single function instead of splitting too much.&lt;/p&gt;

&lt;p&gt;And don’t forget: Lambda is not the only compute. In many real scenarios you will have both containers and functions, working together, orchestrated by workflows or event brokers.&lt;/p&gt;

&lt;h2&gt;
  
  
  No architecture can save a bad business model
&lt;/h2&gt;

&lt;p&gt;Who never worked in a company where the pressure to reduce cloud costs was constant? Of course, optimization is important, but many times we don’t stop to ask: is the business model aligned with the architecture? Or the other way around?&lt;/p&gt;

&lt;p&gt;The truth is: no architecture can save a bad business model. What works is a good architecture aligned with the business. If costs grow but revenue does not, the problem is not only technical.&lt;/p&gt;

&lt;p&gt;Building a cloud solution is not only about writing code, some endpoints, and a web page. Maybe it works in very the beginning to validate an idea. But when we talk about scale, the architecture and the business model must be aligned.&lt;/p&gt;

&lt;h2&gt;
  
  
  The services where cost really hurts
&lt;/h2&gt;

&lt;p&gt;There are some services considered serverless (even with some controversy) that are expensive by design, not by misuse.&lt;/p&gt;

&lt;p&gt;Aurora Serverless v2 is one example. It has great elasticity and value, but for small workloads the baseline cost can be too high.&lt;/p&gt;

&lt;p&gt;OpenSearch Serverless is another case. It should be the obvious choice for vector search in LLM use cases, but many people prefer Postgres with vector extensions because the entry cost of OpenSearch is high.&lt;/p&gt;

&lt;p&gt;These services need more attention to make sense, especially in early-stage startups where cost sensitivity is high.&lt;/p&gt;

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

&lt;p&gt;We saw that serverless is not only Lambda or functions. It can also be containers. And it is not only compute: it includes storage, messaging, and highly managed services.&lt;/p&gt;

&lt;p&gt;We need to avoid the trap of forcing the traditional model into serverless. Instead, we should adapt to event-driven design to get the best results, especially in cost.&lt;/p&gt;

&lt;p&gt;And remember: the business model must be aligned with the architecture. If the factors that increase costs are not the same that increase revenue, no architecture (and no FinOps) will fix it.&lt;/p&gt;

&lt;p&gt;Used in the right way, serverless gives cost predictability and reduces waste, especially compared with provisioned infra built for peaks.&lt;/p&gt;

&lt;p&gt;If you want to learn from experts and companies that are succeeding with serverless, I invite you: on November 8th we will discuss this in depth at ServerlessDays São Paulo — a full day of real experiences, myths and truths, and how to scale without surprises.&lt;/p&gt;

&lt;h2&gt;
  
  
  About the author
&lt;/h2&gt;

&lt;p&gt;Evandro Pires is co-founder of &lt;a href="https://tnkr.com.br" rel="noopener noreferrer"&gt;tnkr&lt;/a&gt; and an entrepreneur in different areas. He worked as CTO of one of the biggest tech companies in Brazil, where he led Cloud Native, Data, AI, SRE and DevOps teams, impacting more than 1 million users every month. Recognized as the &lt;strong&gt;first AWS Serverless Hero in Latin America&lt;/strong&gt;, he is also an &lt;strong&gt;ambassador of &lt;a href="https://sls.guru" rel="noopener noreferrer"&gt;sls.guru&lt;/a&gt;&lt;/strong&gt; in the region.&lt;/p&gt;

&lt;p&gt;He is the creator of the Sem Servidor podcast and organizer of the Sem Servidor Conf and ServerlessDays São Paulo, initiatives that grow the serverless community in Latin America.&lt;/p&gt;

&lt;p&gt;He has been programming since he was 12 years old, when he learned to code with his father in Clipper. He is a pizza lover and enjoys making pizzas on weekends to have fun with his family.&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>cloud</category>
      <category>lambda</category>
      <category>aws</category>
    </item>
    <item>
      <title>What serverless developers need to know about the 12 Factors</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Thu, 04 Sep 2025 02:34:35 +0000</pubDate>
      <link>https://dev.to/aws-heroes/what-serverless-developers-need-to-know-about-the-12-factors-22fp</link>
      <guid>https://dev.to/aws-heroes/what-serverless-developers-need-to-know-about-the-12-factors-22fp</guid>
      <description>&lt;p&gt;Building distributed, scalable, and resilient systems is a more and more difficult task. When we choose serverless architectures, it’s not different, even serverless giving us many of the things we need for this kind of solution.&lt;/p&gt;

&lt;p&gt;In this context, the 12-Factor App model, first proposed by Heroku in 2011, is still a valuable guide to align good practices in development, operations, and maintenance of modern applications. And more: it fits almost naturally with the serverless model, but there are important differences.&lt;/p&gt;

&lt;p&gt;In this article, we will explore each of the 12 factors, understand how to apply them in serverless environments (especially on AWS), and show examples from the special episode of the &lt;em&gt;Sem Servidor&lt;/em&gt; podcast, with Evandro Pires, Caio Henrique Pardal, and Gabriel Oswaldo.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Are 12-Factor Apps?
&lt;/h2&gt;

&lt;p&gt;The 12-Factor App model defines a set of good practices to build modern SaaS applications that are scalable and portable. It is not a strict method, but a philosophy of architecture that tries to guarantee:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy maintenance over time
&lt;/li&gt;
&lt;li&gt;Portability between environments
&lt;/li&gt;
&lt;li&gt;Horizontal scalability&lt;/li&gt;
&lt;li&gt;DevOps practices included by default&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These factors can be used with monoliths or microservices, but they become even more important in serverless architectures, where services are small, temporary, independent, and highly scalable by default.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The only thing we know for sure when we build software is that it will get worse over time,” said Gabriel Oswaldo in the podcast. “The 12 factors appear as a guide to slow down this erosion.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Factor 1: Codebase
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"One codebase tracked in revision control, many deploys"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The application should have one single versioned codebase, stored in a system like Git. Even if there are many deployments (like production and staging), they must come from the same codebase.&lt;/p&gt;

&lt;p&gt;This is already well-known in software development. But in serverless, the challenge is how granular this codebase should be.&lt;/p&gt;

&lt;p&gt;Even with many Lambda functions, the ideal is that each system has a clear and versioned codebase, with consistent deploys.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“It’s important to understand who is calling the Lambda, what is its context, and how the functions are grouped around a goal. That helps organize the codebase better.” — Caio Pardal&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use monorepos organized by business domain
&lt;/li&gt;
&lt;li&gt;Group Lambdas by business context, not by single function
&lt;/li&gt;
&lt;li&gt;Tools like Serverless Framework, SAM, or SST help with unified versioning
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 2: Dependencies
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Explicitly declare and isolate dependencies"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All dependencies must be declared clearly, isolated, and versioned, to make the application environment reproducible and predictable.&lt;/p&gt;

&lt;p&gt;In serverless, each function has its own environment. Poorly managed dependencies increase build time, cold starts, and make maintenance harder. All of this results in something worse: unnecessary costs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Lambda Layers help share dependencies, but you need to be careful with versioning,” says Gabriel. “Sometimes it’s better to include dependencies inside the function than to create a generic layer that becomes a mess.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Declare dependencies in &lt;code&gt;package.json&lt;/code&gt;, &lt;code&gt;requirements.txt&lt;/code&gt;, or &lt;code&gt;pom.xml&lt;/code&gt;, isolated by function for better optimization, but calculate the productivity cost of this granularity
&lt;/li&gt;
&lt;li&gt;Use Lambda Layers with strict versioning
&lt;/li&gt;
&lt;li&gt;Prefer small libraries (avoid big monolith libraries)
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 3: Config
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Store config in the environment"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Application configurations, like credentials, environment variables, and external URLs, must be outside the code, and possible to change without new deployments.&lt;/p&gt;

&lt;p&gt;Environment variables are the best place to store configurations, but they should never be in the code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“This is essential in distributed systems, because each function can have different configs,” explains Evandro.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use AWS Systems Manager Parameter Store or Secrets Manager
&lt;/li&gt;
&lt;li&gt;Never store tokens or keys in the code
&lt;/li&gt;
&lt;li&gt;Use IAM to limit access by function
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 4: Backing Services
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Treat backing services as attached resources"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;External services like databases, queues, caches, or APIs must be treated as attachable and replaceable resources, without needing big changes in the code.&lt;/p&gt;

&lt;p&gt;In serverless, everything is a backing service: databases, caches, queues, authentication systems. Decoupling is already the default.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The cool thing about serverless is that it makes you think plug-and-play,” says Evandro. “You connect S3, Dynamo, API Gateway... everything as decoupled resources.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Treat everything as a service: S3, RDS, DynamoDB, Cognito, etc.
&lt;/li&gt;
&lt;li&gt;Replace services without coupling (example: switch Redis for DynamoDB as cache)
&lt;/li&gt;
&lt;li&gt;Use environment variables to configure URLs and access
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here we have an important discussion in serverless. On one side, some people say serverless forces vendor lock-in - because of these native connections with the cloud provider. On the other side, the 12-Factor App encourages using software engineering standards to reduce this dependency. So, it creates a good balance.&lt;/p&gt;




&lt;h2&gt;
  
  
  Factor 5: Build, Release, Run
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Strictly separate build and run stages"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These three stages in the app’s lifecycle (build, package, and execution) must be separated clearly. This allows control and traceability between versions.&lt;/p&gt;

&lt;p&gt;In serverless, the build usually creates a zip package or a container image. The release can be done using CI/CD. The run happens in Lambda.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Lambda already forces you to do this right,” says Gabriel. “You have to package, upload to the cloud, and use a pipeline.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use tools like CircleCI, GitHub Actions or even CodePipeline&lt;/li&gt;
&lt;li&gt;Automate deploys with Infrastructure as Code (IaC)
&lt;/li&gt;
&lt;li&gt;Use blue/green or canary deployments — Lambda has this natively
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 6: Processes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Execute the app as one or more stateless processes"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The application must run as one or more stateless processes. Persistent data or context must be stored outside the function.&lt;/p&gt;

&lt;p&gt;This is the heart of serverless when using Lambda: temporary executions with no local state.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Lambda is literally a stateless process that scales to zero” remembers Gabriel.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store state in DynamoDB, S3, or external databases
&lt;/li&gt;
&lt;li&gt;Avoid global variables inside functions
&lt;/li&gt;
&lt;li&gt;Use Step Functions to orchestrate long-running processes
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 7: Port Binding
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Export services via port binding"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The app should expose itself as a service, listening on a defined port and accessible via protocol, without needing external application servers.&lt;/p&gt;

&lt;p&gt;In serverless, this is done by API Gateway, AppSync, or EventBridge (to share only a few examples). The app “listens” to events or endpoints and reacts to that.&lt;/p&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define API contracts with OpenAPI/Swagger or event contracts with EventBridge, including versioning
&lt;/li&gt;
&lt;li&gt;Use API Gateway or AppSync to expose the app
&lt;/li&gt;
&lt;li&gt;Use separate handlers for each endpoint — this helps with portability
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 8: Concurrency
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Scale out via the process model"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Scalability should come from running independent processes in parallel, allowing horizontal scaling when demand increases.&lt;/p&gt;

&lt;p&gt;Serverless already scales automatically per request. Each invocation creates a new isolated process.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Scalability is built-in. You just need to make sure your code is ready for it” says Caio.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check AWS concurrency limits (concurrency reserve)
&lt;/li&gt;
&lt;li&gt;Use queues (SQS, Kinesis) to manage traffic spikes
&lt;/li&gt;
&lt;li&gt;Avoid race conditions by using transactional control in the database
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 9: Disposability
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Maximize robustness with fast startup and graceful shutdown"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;App processes should be disposable, they can start and stop quickly. This helps with resilience, continuous deployment, and scalability.&lt;/p&gt;

&lt;p&gt;Cold starts are the main challenge here. But, with good practices, you can reduce the impact of it. And remember: microservices also have cold starts! When they need to scale, they take some time to start receiving requests — this is also a cold start. The difference is the scale and granularity.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Lambda is born and dies. So everything must be ready to run from the beginning with no previous state. That’s pure disposability.” — Gabriel Oswaldo&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Depending on the case, use lightweight runtimes (Node.js, Go)
&lt;/li&gt;
&lt;li&gt;Keep dependencies small&lt;/li&gt;
&lt;li&gt;Use Lambda Provisioned Concurrency when necessary
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 10: Dev/prod parity
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Keep development, staging, and production as similar as possible"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The dev, staging, and production environments should be as similar as possible to avoid errors caused by differences.&lt;/p&gt;

&lt;p&gt;Serverless helps a lot here. In traditional environments, keeping dev and staging close to production is expensive. In serverless, you can create environments that are very similar and low-cost — you only pay for what you use.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“We use a dev environment very close to production because everything is serverless. Tools like serverless-offline or localstack help, but the real benefit comes when you automate everything with IaC.” — Caio Pardal&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use separate stacks per environment with IaC (like Terraform, SAM or Serverless Framework) &lt;/li&gt;
&lt;li&gt;Automate deploys per environment
&lt;/li&gt;
&lt;li&gt;Emulate services locally with localstack or SAM CLI — but many people prefer using the real cloud
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 11: Logs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Treat logs as event streams"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Logs must be treated as continuous event streams, sent to an external system where they can be stored, indexed, and analyzed.&lt;/p&gt;

&lt;p&gt;Lambda sends logs to CloudWatch automatically. The challenge is to collect, aggregate, and monitor them properly. And another challenge is cost. Careless logging in serverless can get expensive.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“CloudWatch is the default in serverless, but it’s not enough. We aggregate logs with Datadog and also use JSON format to make analysis easier.” — Gabriel Oswaldo&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Aggregate logs using CloudWatch Logs Insights or AWS OpenSearch
&lt;/li&gt;
&lt;li&gt;Integrate with Datadog, Grafana, Lumigo, or similar tools
&lt;/li&gt;
&lt;li&gt;Use structured logs in JSON format — Powertools for AWS Lambda helps standardize this
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Factor 12: Admin Processes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Run admin/management tasks as one-off processes"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Admin tasks and scripts (like database migrations or maintenance commands) should be done in isolated processes, outside the main app flow.&lt;/p&gt;

&lt;p&gt;In serverless, use one-time functions, automated scripts, or temporary jobs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“With Lambda it’s easy to create admin scripts. We have several functions just for data maintenance, triggered by events or scheduled on EventBridge. That’s way better than mixing it with the main app.” — Gabriel Oswaldo&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use scheduled Lambda functions, Step Functions, or Fargate for batch jobs
&lt;/li&gt;
&lt;li&gt;Never include maintenance scripts in the main app flow
&lt;/li&gt;
&lt;li&gt;Separate admin functions with different IAM roles
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion: Serverless and the 12 Factors Work Together
&lt;/h2&gt;

&lt;p&gt;Many of the 12 factors are already built into serverless, but understanding the principles behind them helps avoid traps like too much coupling, messy deployments, or poor observability.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The secret is to know the principles and apply them smartly. Serverless encourages good practices, but also needs responsibility.” — Evandro&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The 12 factors are still a reliable guide to build software that ages well. And when applied to a well-architected serverless environment, they don’t just make sense — they increase your ability to deliver value with speed, scale, and quality.&lt;/p&gt;

&lt;p&gt;🎧 Listen to episode 39 (only in Portuguese) of the &lt;em&gt;Sem Servidor Podcast&lt;/em&gt; about the 12-Factor App — available on audio platforms or YouTube.&lt;/p&gt;




&lt;h2&gt;
  
  
  Sem Servidor Podcast
&lt;/h2&gt;

&lt;p&gt;The &lt;em&gt;Sem Servidor&lt;/em&gt; podcast is an initiative to share serverless and cloud computing knowledge in Portuguese.&lt;/p&gt;

&lt;p&gt;🎙 Listen to many episodes on our website: &lt;a href="https://semservidor.com.br" rel="noopener noreferrer"&gt;semservidor.com.br&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;This is &lt;a href="https://www.linkedin.com/in/epiresdasilva/" rel="noopener noreferrer"&gt;Evandro Pires&lt;/a&gt;. I'm a husband, father of two, but also an AWS Serverless Hero, &lt;a href="https://www.serverlessguru.com" rel="noopener noreferrer"&gt;Serverless Guru Ambassador&lt;/a&gt;, Entrepreneur, CTO, &lt;a href="https://semservidor.com.br" rel="noopener noreferrer"&gt;Podcaster&lt;/a&gt;, and Speaker.&lt;/p&gt;

&lt;p&gt;Cut costs and boost innovation by building a serverless-first mindset with &lt;a href="https://sls.guru" rel="noopener noreferrer"&gt;sls.guru&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.serverlessguru.com/company/careers" rel="noopener noreferrer"&gt;Join our team&lt;/a&gt; and help transform the digital landscape for companies worldwide!&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>cloud</category>
      <category>architecture</category>
      <category>developer</category>
    </item>
    <item>
      <title>How I built a Chrome Extension with AI to understand any web page</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Fri, 27 Jun 2025 12:33:00 +0000</pubDate>
      <link>https://dev.to/aws-heroes/how-i-built-a-chrome-extension-with-ai-to-understand-any-web-page-2e94</link>
      <guid>https://dev.to/aws-heroes/how-i-built-a-chrome-extension-with-ai-to-understand-any-web-page-2e94</guid>
      <description>&lt;p&gt;In recent months, I've been exploring ways to teach people how to build real products using artificial intelligence. Instead of talking about AI in theoretical terms, I decided to create a practical experience that shows how AI can enhance everyday tasks and turn simple ideas into powerful solutions.&lt;/p&gt;

&lt;p&gt;That's how this project was born: a Chrome extension with a smart side panel, capable of understanding any web page, generating summaries, answering questions, and simplifying content — all in real-time, with the help of Bedrock on AWS using the Nova model.&lt;/p&gt;

&lt;p&gt;In this article, I share the technical architecture, the decisions I made, the challenges I faced, and how you can replicate (or evolve) this idea.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Too much information, too little time
&lt;/h2&gt;

&lt;p&gt;The internet is full of useful content: technical articles, tutorials, papers, news. But the volume of information is massive, and time to digest it all is scarce.&lt;/p&gt;

&lt;p&gt;Sometimes we just want to quickly grasp the main point of an article. Other times, we want to translate or simplify technical text. And almost always, we have questions about what we just read.&lt;/p&gt;

&lt;p&gt;Despite the popularity of ChatGPT, using AI still requires stepping out of your reading flow, copying text, writing prompts, and pasting content back. It's an experience that interrupts more than it helps.&lt;/p&gt;

&lt;p&gt;My hypothesis was simple: what if AI came to you? What if, while browsing any site, you could open a side panel and ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Summarize this text for me?"&lt;/li&gt;
&lt;li&gt;"Explain this part in simpler terms?"&lt;/li&gt;
&lt;li&gt;"Translate this content into my language?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this idea, I began sketching the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idea: a reading assistant in your browser
&lt;/h2&gt;

&lt;p&gt;The product was born with a clear premise: to help anyone interact with the content of a web page directly in the browser, with the support of a powerful and easy-to-use AI.&lt;/p&gt;

&lt;p&gt;To achieve this, I needed three key pillars:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Context&lt;/strong&gt;: The AI needs to know what’s on the current page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Command&lt;/strong&gt;: The user needs to ask a question or trigger an action.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent Response&lt;/strong&gt;: The AI must reply in a helpful way, in the user's preferred language.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result is a Chrome extension that, when activated, opens a side panel where users can ask free-form questions or use quick buttons like "Summarize page," "Extract data," or "Simplify language." The response appears right there, smoothly and in context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Architecture: simple, modular, and scalable
&lt;/h2&gt;

&lt;p&gt;The project is divided into two repositories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: the extension and side panel code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: a lightweight API that orchestrates prompts and communicates with the language model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The extension is built with React and TailwindCSS, using Chrome's native APIs for side panels, content scripts, and message passing.&lt;/p&gt;

&lt;p&gt;When the user clicks the extension icon, the side panel opens. At that moment, a script extracts the visible content from the current tab — mainly &lt;code&gt;&amp;lt;main&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;, or &lt;code&gt;body.innerText&lt;/code&gt;, filtering out menus, sidebars, and other noise.&lt;/p&gt;

&lt;p&gt;That text is then sent to the backend, which builds a custom prompt based on the selected action and the user's language, and sends it to the model (in this case, Amazon’s Nova via Bedrock). The response is returned and displayed directly in the panel.&lt;/p&gt;

&lt;p&gt;The backend was implemented with Node.js and Express.js, deployed using Serverless Framework v3 on AWS ECS Fargate, and exposed through an Application Load Balancer. The container model was chosen, even though it's serverless, because the interaction with Bedrock returns a data stream and can exceed the 30-second timeout of API Gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI makes sense here
&lt;/h2&gt;

&lt;p&gt;The choice to use a generative model like Nova was not random. Here are three main reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AI understands language better than any handcrafted logic&lt;/strong&gt; — Summarizing a technical text, rewriting it informally, or answering open-ended questions requires context and nuance, something that regex or traditional scripts can't handle well. LLMs solve this brilliantly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generalization is key&lt;/strong&gt; — This product isn't made for one type of content. It needs to work with blogs, news, documentation, scientific articles, content in English, Portuguese, Spanish... A model like GPT generalizes very well without manual tuning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-time with clear value&lt;/strong&gt; — The experience is immediate. You see content, click "Summarize," and in seconds you have a helpful response. It's not a generic AI — it's useful because it's contextual.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Prompting and Language Control
&lt;/h2&gt;

&lt;p&gt;On the backend, each predefined action is transformed into a custom prompt. The user's selected language is always included explicitly at the beginning of the prompt to ensure the model responds correctly.&lt;/p&gt;

&lt;p&gt;This approach provides coherent and localized answers without needing to train additional models or implement separate translation logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimizing token usage
&lt;/h2&gt;

&lt;p&gt;Sending an entire page to an LLM that charges per token is impractical — both technically and financially. So I implemented a smart extraction and truncation strategy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Filter out irrelevant blocks (menus, footers, scripts).&lt;/li&gt;
&lt;li&gt;Prioritize &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;main&amp;gt;&lt;/code&gt;, and visible content.&lt;/li&gt;
&lt;li&gt;Limit the text to a maximum of 4000 tokens per request (this limit is self-imposed, but customizable).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In future versions, I plan to use embeddings to semantically compress content before sending it to the model (you can contribute to this — see the GitHub repo at the end).&lt;/p&gt;

&lt;h2&gt;
  
  
  Results and next steps
&lt;/h2&gt;

&lt;p&gt;With this simple structure, I validated a functional MVP that meets the goal: make AI useful within the web reading flow. Users can get answers and content transformations with a click, in real time, without leaving the page.&lt;/p&gt;

&lt;p&gt;Next possible steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interaction history per page&lt;/li&gt;
&lt;li&gt;PDF and Google Docs analysis&lt;/li&gt;
&lt;li&gt;User-customized prompts&lt;/li&gt;
&lt;li&gt;Shareable summary links&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I learned building this
&lt;/h2&gt;

&lt;p&gt;I developed this project using a mindset I've been refining to build AI-powered products in a robust and productive way. I systematize each stage with heavy use of AI combined with my knowledge of product and development. With this, I can create solutions like this in minutes — maybe hours, but never days.&lt;/p&gt;

&lt;p&gt;This project also taught me a lot about applying AI in a practical and user-centered way. Here are three important lessons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI doesn’t need to be complex to be useful&lt;/strong&gt; — The value lies in the integrated and fluid experience, not in technical sophistication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt engineering is as important as code&lt;/strong&gt; — A good prompt is worth more than a thousand rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI products need to be opinionated&lt;/strong&gt; — Too many options can confuse users. Creating clear buttons like "Summarize" and "Simplify" guides the experience.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;This project is a great example of how generative AI can be applied with purpose in simple and useful products. It shows that with a good idea, some code, and thoughtful decisions, it's possible to transform web browsing into a smarter, more accessible experience.&lt;/p&gt;

&lt;p&gt;If you want to use this as the basis for a workshop, hackathon, or your own product, the repositories are open. Happy building — and happy prompting!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend &amp;amp; Extension: &lt;a href="https://github.com/epiresdasilva/ai-chrome-sidepanel-frontend" rel="noopener noreferrer"&gt;https://github.com/epiresdasilva/ai-chrome-sidepanel-frontend&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Backend: &lt;a href="https://github.com/epiresdasilva/ai-chrome-sidepanel-backend" rel="noopener noreferrer"&gt;https://github.com/epiresdasilva/ai-chrome-sidepanel-backend&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;This is &lt;a href="https://www.linkedin.com/in/epiresdasilva/" rel="noopener noreferrer"&gt;Evandro Pires&lt;/a&gt;. I'm a husband, father of two, but also an AWS Serverless Hero, &lt;a href="https://www.serverlessguru.com" rel="noopener noreferrer"&gt;Serverless Guru Ambassador&lt;/a&gt;, Entrepreneur, CTO, &lt;a href="https://semservidor.com.br" rel="noopener noreferrer"&gt;Podcaster&lt;/a&gt;, and Speaker.&lt;/p&gt;

&lt;p&gt;Cut costs and boost innovation by building a serverless-first mindset with &lt;a href="https://sls.guru" rel="noopener noreferrer"&gt;sls.guru&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.serverlessguru.com/company/careers" rel="noopener noreferrer"&gt;Join our team&lt;/a&gt; and help transform the digital landscape for companies worldwide!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>chrome</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How I built a cost-effective serverless landing page for my businesses</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Wed, 21 May 2025 14:55:14 +0000</pubDate>
      <link>https://dev.to/aws-heroes/how-i-built-a-cost-effective-serverless-landing-page-for-my-businesses-3106</link>
      <guid>https://dev.to/aws-heroes/how-i-built-a-cost-effective-serverless-landing-page-for-my-businesses-3106</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;As a multi-business entrepreneur with distinct brands and domains, I needed a smart, scalable way to publish lead-capturing landing pages—without breaking the bank. Here's how I used AWS serverless technologies to make that happen.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Running multiple businesses means juggling different audiences, branding strategies, and domain names. One of the most effective tools in my marketing stack is the classic &lt;strong&gt;lead-gen landing page&lt;/strong&gt;—offer value (like an eBook), get a contact in return.&lt;/p&gt;

&lt;p&gt;My go-to tool for landing pages was great—until I needed to use it across multiple domains. The moment I tried to scale beyond a single domain, the monthly cost jumped from &lt;strong&gt;R$79 to R$1200 (BRL)&lt;/strong&gt;. That made no sense for my needs or budget.&lt;/p&gt;

&lt;p&gt;So I asked myself:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if I could build my own landing page infrastructure using AWS serverless services?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Spoiler: I did. And it works beautifully—for almost free.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;I built a fully serverless, deployable landing page system that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Works across any domain I own&lt;/li&gt;
&lt;li&gt;Runs on AWS's &lt;strong&gt;free tier&lt;/strong&gt; (with marginal cost when scaling)&lt;/li&gt;
&lt;li&gt;Stores leads in DynamoDB&lt;/li&gt;
&lt;li&gt;Sends confirmation emails via SES&lt;/li&gt;
&lt;li&gt;Hosts HTML/CSS/JS from S3 + CloudFront&lt;/li&gt;
&lt;li&gt;Can be cloned and customized in minutes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To make it even better, I integrated &lt;strong&gt;Amazon Q Developer&lt;/strong&gt; to generate the initial HTML skeleton. It helped me overcome my design limitations and ship fast.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ You can find and use the open-source repo &lt;a href="https://github.com/epiresdasilva/landing-page-serverless" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Architecture Overview
&lt;/h2&gt;

&lt;p&gt;Here’s how each AWS service plays its role:&lt;/p&gt;

&lt;h3&gt;
  
  
  Amazon S3
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hosts static assets&lt;/strong&gt;: HTML, CSS, JS, PDF eBook&lt;/li&gt;
&lt;li&gt;Configured for static website hosting&lt;/li&gt;
&lt;li&gt;Public access for landing page, private access for eBook&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Amazon CloudFront
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Distributes content globally&lt;/li&gt;
&lt;li&gt;Handles HTTPS and custom domains&lt;/li&gt;
&lt;li&gt;Reduces latency and adds DDoS protection&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  API Gateway
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Exposes a &lt;code&gt;POST&lt;/code&gt; endpoint for form submissions&lt;/li&gt;
&lt;li&gt;Validates inputs and forwards to Lambda&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AWS Lambda
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Validates and stores form data in DynamoDB&lt;/li&gt;
&lt;li&gt;Sends emails via SES&lt;/li&gt;
&lt;li&gt;Returns a URL to download the eBook&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Amazon DynamoDB
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Stores user registration data&lt;/li&gt;
&lt;li&gt;Schema-less and scales automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Amazon SES
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Sends email confirmations to users&lt;/li&gt;
&lt;li&gt;Notifies me about new submissions&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Serverless Framework
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Used for Infrastructure as Code (IaC)&lt;/li&gt;
&lt;li&gt;Deploys all resources with a single command&lt;/li&gt;
&lt;li&gt;Manages environment variables, roles, and permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Deployment Simplicity
&lt;/h2&gt;

&lt;p&gt;Once you clone the repo and configure environment variables, the setup is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;serverless deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it. Your landing page goes live, and you’re ready to collect leads securely and reliably.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Use Case: E-book Download Page
&lt;/h2&gt;

&lt;p&gt;I used this solution to create a lead magnet for one of my businesses. Here’s what it does:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Visitor sees the landing page&lt;/li&gt;
&lt;li&gt;Fills out a form to get an eBook&lt;/li&gt;
&lt;li&gt;Gets the PDF immediately + confirmation email&lt;/li&gt;
&lt;li&gt;I receive the lead data and can follow up later&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why This Works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✅ Cost-Effective
&lt;/h3&gt;

&lt;p&gt;You pay only for what you use. No servers. No idle costs.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Scalable
&lt;/h3&gt;

&lt;p&gt;Traffic spike? No problem. AWS handles it for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Reliable &amp;amp; Secure
&lt;/h3&gt;

&lt;p&gt;With HTTPS, IAM, DDoS protection, and Amazon's SLAs.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Easy to Maintain
&lt;/h3&gt;

&lt;p&gt;Update HTML, deploy changes via GitHub—no backend maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who Should Use This
&lt;/h2&gt;

&lt;p&gt;This solution is ideal for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Entrepreneurs managing multiple brands/domains&lt;/li&gt;
&lt;li&gt;Startups with lean budgets&lt;/li&gt;
&lt;li&gt;Developers looking for marketing autonomy&lt;/li&gt;
&lt;li&gt;Anyone needing a secure lead-gen solution that scales&lt;/li&gt;
&lt;/ul&gt;




&lt;blockquote&gt;
&lt;h3&gt;
  
  
  Visit the demo page &lt;a href="https://lpdemo.evandropires.com.br/" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/h3&gt;
&lt;/blockquote&gt;




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

&lt;p&gt;Sometimes the best solution is building your own.&lt;/p&gt;

&lt;p&gt;If you’re a developer-entrepreneur juggling costs and domains like me, this approach might be your next favorite tool. It's fast, cheap, scalable—and entirely yours.&lt;/p&gt;

&lt;p&gt;Feel free to clone the repo, make it yours, and publish landing pages that convert without the SaaS pricing trap.&lt;/p&gt;




&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;This is &lt;a href="https://www.linkedin.com/in/epiresdasilva/" rel="noopener noreferrer"&gt;Evandro Pires&lt;/a&gt;. I'm a husband, father of two, but also an AWS Serverless Hero, &lt;a href="https://www.serverlessguru.com" rel="noopener noreferrer"&gt;Serverless Guru Ambassador&lt;/a&gt;, Entrepreneur, CTO, &lt;a href="https://semservidor.com.br" rel="noopener noreferrer"&gt;Podcaster&lt;/a&gt;, and Speaker.&lt;/p&gt;

&lt;p&gt;Cut costs and boost innovation by building a serverless-first mindset with &lt;a href="https://sls.guru" rel="noopener noreferrer"&gt;sls.guru&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.serverlessguru.com/company/careers" rel="noopener noreferrer"&gt;Join our team&lt;/a&gt; and help transform the digital landscape for companies worldwide!&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>aws</category>
      <category>marketing</category>
      <category>entrepreneurship</category>
    </item>
    <item>
      <title>IoT Architecture with AWS: Processing MQTT Messages with Persistence and API</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Thu, 08 May 2025 13:53:43 +0000</pubDate>
      <link>https://dev.to/aws-heroes/iot-architecture-with-aws-processing-mqtt-messages-with-persistence-and-api-94p</link>
      <guid>https://dev.to/aws-heroes/iot-architecture-with-aws-processing-mqtt-messages-with-persistence-and-api-94p</guid>
      <description>&lt;p&gt;This article presents a practical, scalable, and cost-effective solution for handling large volumes of IoT messages using AWS serverless services. It originated from a real business demand: an environmental services company needed to receive information in near real-time (though not necessarily process it immediately) from geographically distributed sensors, using MQTT as the communication protocol. Below, we detail the main challenges, the proposed architecture, service choices, and the benefits delivered.&lt;/p&gt;

&lt;h2&gt;
  
  
  Business Challenge
&lt;/h2&gt;

&lt;p&gt;The company monitors environmental indicators for large clients, such as hydroelectric power plants. The main requirement was to capture and store field sensor data — for example, river levels — which send MQTT messages periodically. The company’s current system is a monolithic application primarily designed for human interaction (visualization, analysis, and report generation), not for large-scale ingestion.&lt;/p&gt;

&lt;p&gt;Thus, the challenge was twofold: on one hand, to ensure these messages were reliably received and securely persisted, even with high volume; on the other, to avoid impacting the core application, which could become a bottleneck. Additionally, it was necessary to account for future growth: more sensors, more clients, and higher message frequency.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Serverless Solution
&lt;/h2&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%2F0fjo1yw9nk8jncm7c0bw.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%2F0fjo1yw9nk8jncm7c0bw.png" width="800" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The proposed approach was to create an intermediate solution that works as an intelligent "buffer" between IoT devices and the core application. Since the data doesn't need to be processed in real time, the architecture focuses on reliable ingestion, minimal transformation, and efficient persistence, with later scheduled consumption by the main system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS IoT Core&lt;/strong&gt; was chosen as the entry point for being a fully managed service with native support for the MQTT protocol, massive scalability, and strong integration with other AWS services. It receives messages directly from the sensors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS IoT Rules&lt;/strong&gt; acts as a message orchestrator. Using a SQL-like syntax, it transforms incoming messages, adds useful metadata like &lt;code&gt;timestamp&lt;/code&gt;, &lt;code&gt;topic&lt;/code&gt;, and an automatically generated &lt;code&gt;uuid&lt;/code&gt;, and redirects them to the persistence layer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
       &lt;span class="nb"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;2592000&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;expirationTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'pending'&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="s1"&gt;'devices/data'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This eliminates the need for custom code at this stage, reducing potential points of failure and accelerating development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon DynamoDB&lt;/strong&gt; was selected for data persistence due to its ability to auto-scale with millisecond latency and native TTL (Time To Live) support. We implemented two TTL rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;30 days for pending messages (not yet processed)&lt;/li&gt;
&lt;li&gt;24 hours for processed messages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Global Secondary Index (GSI) with &lt;code&gt;status&lt;/code&gt; as the partition key and &lt;code&gt;timestamp&lt;/code&gt; as the sort key allows the application to easily retrieve pending messages in chronological order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;messagesTable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addGlobalSecondaryIndex&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;indexName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;status-timestamp-index&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;partitionKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;status&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;dynamodb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AttributeType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;STRING&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;sortKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;timestamp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;dynamodb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AttributeType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NUMBER&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;AWS Lambda&lt;/strong&gt; was used to implement two main endpoints: one to query pending messages, and another to confirm (ACK) message processing, updating the status to &lt;code&gt;processed&lt;/code&gt; and reducing its TTL:&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="c1"&gt;// Updates status to 'processed' and sets new expiration&lt;/span&gt;
&lt;span class="nx"&gt;UpdateExpression&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;SET #status = :status, expirationTime = :expTime&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nx"&gt;ExpressionAttributeValues&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;:status&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;processed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;:expTime&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;now&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;86400&lt;/span&gt; &lt;span class="c1"&gt;// 24h in seconds&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These functions are triggered on demand, scale automatically, and require zero server management.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon API Gateway&lt;/strong&gt; completes the cycle by exposing these functions as a secure RESTful API. The main application can, for instance, poll every 15 minutes for pending messages and acknowledge them after processing the data.&lt;/p&gt;

&lt;p&gt;The entire infrastructure was defined using &lt;strong&gt;AWS CDK&lt;/strong&gt;, ensuring version control, reproducibility, and ease of maintenance. Setting up a new environment takes just a few minutes.&lt;/p&gt;

&lt;p&gt;A working proof-of-concept project is available here: &lt;a href="https://github.com/epiresdasilva/iot-core-example" rel="noopener noreferrer"&gt;https://github.com/epiresdasilva/iot-core-example&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits
&lt;/h2&gt;

&lt;p&gt;From a technical perspective, this architecture eliminates the need to manage infrastructure or worry about scaling. All components are natively integrated and scale on demand. Business logic is cleanly separated and can evolve independently.&lt;/p&gt;

&lt;p&gt;From a business perspective, the gains are significant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lower infrastructure costs: no idle resources and pay-as-you-go pricing.&lt;/li&gt;
&lt;li&gt;Virtually infinite scalability to support growing numbers of clients and sensors.&lt;/li&gt;
&lt;li&gt;Greatly reduced time-to-market for new projects.&lt;/li&gt;
&lt;li&gt;Increased reliability and traceability with TTL and automatic logging.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;This architecture shows how to build an efficient and resilient buffer for IoT data using a few AWS services — all serverless. With minimal maintenance effort and excellent cost-benefit, the company now has a robust ingestion pipeline, ready to scale safely.&lt;/p&gt;

&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;This is Evandro Pires. I'm a husband, father of two, but also an AWS Serverless Hero, &lt;a href="https://www.serverlessguru.com" rel="noopener noreferrer"&gt;Serverless Guru Ambassador&lt;/a&gt;, Entrepreneur, CTO, &lt;a href="https://semservidor.com.br" rel="noopener noreferrer"&gt;Podcaster&lt;/a&gt;, and Speaker.&lt;/p&gt;

&lt;p&gt;Cut costs and boost innovation by building a serverless-first mindset with &lt;a href="https://sls.guru" rel="noopener noreferrer"&gt;sls.guru&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.serverlessguru.com/company/careers" rel="noopener noreferrer"&gt;Join our team&lt;/a&gt; and help transform the digital landscape for companies worldwide!&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>iot</category>
      <category>aws</category>
      <category>dynamodb</category>
    </item>
    <item>
      <title>How we tripled our innovation capacity and cut costs by 75% with a Serverless-First Approach</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Fri, 11 Apr 2025 00:01:33 +0000</pubDate>
      <link>https://dev.to/aws-heroes/how-we-tripled-our-innovation-capacity-and-cut-costs-by-75-with-a-serverless-first-approach-1je0</link>
      <guid>https://dev.to/aws-heroes/how-we-tripled-our-innovation-capacity-and-cut-costs-by-75-with-a-serverless-first-approach-1je0</guid>
      <description>&lt;p&gt;It was 2020. The pandemic at its peak. A career shift. I stepped into the leadership role of an applied research team at a new company with a clear mission: to kick off a new era of technology-driven innovation.&lt;/p&gt;

&lt;p&gt;This team had always played a pivotal role in the company’s journey. Over the years, it spearheaded experiments with emerging technologies that became true turning points. For instance, the team led the company’s transition to a cloud-native architecture, replacing legacy application servers with microservices—a move that laid the foundation for today’s platform, supporting dozens of products, more than 700 microservices, and over 1.2 million active monthly users.&lt;/p&gt;

&lt;p&gt;It was also the team that explored and validated facial recognition and NLP-based chatbots—initiatives that earned international recognition. Long before ChatGPT made AI mainstream, we were already experimenting with language models. So when generative AI exploded, we were well-positioned to act fast.&lt;/p&gt;

&lt;p&gt;But experimenting is very different from turning new tech into product. That’s where the real challenge lies. Especially in an environment where testing hypotheses was expensive and slow. That bottleneck was throttling innovation.&lt;/p&gt;

&lt;p&gt;Working with innovation means embracing uncertainty—and accepting that most of what you try won’t work. Statistically, only a small fraction of ideas create real business value. If your success rate is 10%, and you want 10 validated ideas, you need to test 100. It’s basic math.&lt;/p&gt;

&lt;p&gt;In 2020, our average cost per experiment was $186, and we were completing just 0.57 experiments per professional per year. Scaling innovation with those numbers simply wasn’t feasible. Hiring more people or increasing budget linearly wasn’t the answer.&lt;/p&gt;

&lt;p&gt;We ran an internal assessment to understand what was getting in the way. Here’s what we found:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provisioned infrastructure that incurred cost even when idle;&lt;/li&gt;
&lt;li&gt;Limited AWS expertise, which slowed development and created bottlenecks;&lt;/li&gt;
&lt;li&gt;Projects executed individually, limiting collaboration and peer learning;&lt;/li&gt;
&lt;li&gt;Lack of a clear cadence in our workflows, leading to inconsistency and inefficiency.&lt;/li&gt;
&lt;/ul&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%2Ftw3o07fdxu9ubcvrdz03.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%2Ftw3o07fdxu9ubcvrdz03.png" width="790" height="757"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s when I proposed a mindset shift: what if we adopted a &lt;strong&gt;serverless-first&lt;/strong&gt; approach?&lt;/p&gt;

&lt;p&gt;Instead of provisioning and managing infrastructure for each experiment, we would use AWS serverless services—only paying for what we actually used. Since our experiments didn’t require constant uptime or production-grade environments, serverless was a perfect match from both a technical and financial standpoint.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Adopting a serverless-first mindset allowed the team to focus on what really matters: generating insight and validating ideas quickly, affordably, and with minimal operational drag."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The team got on board. We launched a collective learning journey: we enrolled in courses together, ran internal challenges, and created a space for ongoing knowledge sharing. One of the highlights was the internal URL shortener challenge. The goal? Build it entirely using AWS serverless tools—at zero cost. Not only did it work, but it also sparked a DynamoDB modeling workshop that benefited the entire team.&lt;/p&gt;

&lt;p&gt;Of course, the shift wasn’t just technical. We also reworked our team dynamics. We moved to pair programming, adopted two-week sprints, broke work into smaller, more manageable chunks, and ensured visibility across projects. This kept our momentum going—even when outcomes were uncertain. Learning became a constant.&lt;/p&gt;

&lt;p&gt;With this new model in place, momentum picked up. A standout moment was when we were tasked with developing an electronic signature solution on a tight timeline. Thanks to our serverless-first foundation and the team’s growing maturity, we delivered a fully integrated, production-ready solution in just three months.&lt;/p&gt;

&lt;p&gt;By 2021, the results were clear: we went from 0.57 to &lt;strong&gt;1.25 experiments per professional&lt;/strong&gt;, and the cost per experiment dropped from &lt;strong&gt;$186 to $45&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In 2022, things got even better: &lt;strong&gt;2.11 experiments per professional&lt;/strong&gt;, and just &lt;strong&gt;$39 per experiment&lt;/strong&gt;. We had built a true innovation engine.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"When innovation becomes routine, impact stops being an exception and starts becoming strategy."&lt;/p&gt;
&lt;/blockquote&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%2Fd25cennqdt10l35ehn4h.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%2Fd25cennqdt10l35ehn4h.png" width="800" height="603"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Other wins soon followed. We built a no-code machine learning platform that allowed our clients to run models without writing code—featured on the AWS Blog:&lt;br&gt;
&lt;a href="https://aws.amazon.com/pt/blogs/aws-brasil/como-a-senior-sistemas-criou-uma-plataforma-de-aprendizado-de-maquina-no-code-utilizando-aws/" rel="noopener noreferrer"&gt;https://aws.amazon.com/pt/blogs/aws-brasil/como-a-senior-sistemas-criou-uma-plataforma-de-aprendizado-de-maquina-no-code-utilizando-aws/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When generative AI gained traction, we didn’t scramble—we accelerated. We launched the &lt;strong&gt;AI Agent Factory&lt;/strong&gt;, a fast and easy way for our product teams to build AI agents integrated into our systems, while abstracting away technical complexity. This also became a benchmark in the industry:&lt;br&gt;
&lt;a href="https://aws.amazon.com/pt/solutions/case-studies/bedrock-senior-sistemas/" rel="noopener noreferrer"&gt;https://aws.amazon.com/pt/solutions/case-studies/bedrock-senior-sistemas/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://aws.amazon.com/pt/blogs/aws-brasil/a-fabrica-de-agentes-da-senior-sistemas-utilizando-ia-generativa-para-aumentar-a-eficiencia-operacional/" rel="noopener noreferrer"&gt;https://aws.amazon.com/pt/blogs/aws-brasil/a-fabrica-de-agentes-da-senior-sistemas-utilizando-ia-generativa-para-aumentar-a-eficiencia-operacional/&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;As technology leaders, we need to understand that innovation isn’t just about having good ideas—it’s about creating the technical, cultural, and operational conditions to turn those ideas into business value.&lt;/p&gt;

&lt;p&gt;Embracing a serverless-first mindset, combined with simple, structured, and collaborative processes, transformed our slow and costly experimentation into an agile, efficient, and high-impact innovation engine.&lt;/p&gt;

&lt;p&gt;That decision we made back in 2021 laid the groundwork for everything we achieved when the AI wave arrived.&lt;/p&gt;

&lt;p&gt;So here’s a question for you: how many ideas are going untested in your organization because of high costs or slow cycles? Maybe it’s time to rethink how you approach innovation.&lt;/p&gt;

&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;This is Evandro Pires. I'm a husband, father of two, but also an AWS Serverless Hero, &lt;a href="https://www.serverlessguru.com" rel="noopener noreferrer"&gt;Serverless Guru Ambassador&lt;/a&gt;, CTO, &lt;a href="https://semservidor.com.br" rel="noopener noreferrer"&gt;Podcaster&lt;/a&gt;, and Speaker.&lt;/p&gt;

&lt;p&gt;Cut costs and boost innovation by building a serverless-first mindset with &lt;a href="https://sls.guru" rel="noopener noreferrer"&gt;sls.guru&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.serverlessguru.com/company/careers" rel="noopener noreferrer"&gt;Join our team&lt;/a&gt; and help transform the digital landscape for companies worldwide!&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>aws</category>
      <category>innovation</category>
      <category>ai</category>
    </item>
    <item>
      <title>How my kids learned English with Serverless and GenAI</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Thu, 06 Mar 2025 01:42:32 +0000</pubDate>
      <link>https://dev.to/aws-heroes/how-my-kids-learned-english-with-serverless-and-genai-pfe</link>
      <guid>https://dev.to/aws-heroes/how-my-kids-learned-english-with-serverless-and-genai-pfe</guid>
      <description>&lt;p&gt;I'm a father of two kids; currently, they are 8 and 6 years old.&lt;/p&gt;

&lt;p&gt;Last year, I received an invite to participate in the AWS Global Heroes Summit, a yearly meeting of all AWS Heroes from around the world.&lt;/p&gt;

&lt;p&gt;Happily, the meeting was scheduled to take place during the kids' vacation here in Brazil, so it was an easy decision to have our family vacation together in Seattle, WA—the city where the event was held.&lt;/p&gt;

&lt;p&gt;My kids love learning new languages and having new experiences when traveling. When we traveled to Argentina, they wanted to learn some words and sentences in Spanish. When we told them we were traveling to the US, they wanted to learn more English.&lt;/p&gt;

&lt;p&gt;The school where they study has English classes every day, but we knew they needed to practice more before the trip to be better prepared.&lt;/p&gt;

&lt;p&gt;Here is where I, as the nerd that I am, stepped in: how could I use technology to help with that? Especially Serverless and GenAI. And that’s how this project started.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idea
&lt;/h2&gt;

&lt;p&gt;The idea was very simple. What if I created a memorization app for my kids? But I didn’t want to manually think about the words, images, or speech. First, because I wanted all words with no limitations, including not needing to translate every word. I didn't want to find an image for each of these words. Second, the biggest restriction I had was time. As a busy executive, I didn't have enough time to do all of these tasks and also use the solution with my kids.&lt;/p&gt;

&lt;p&gt;With this in mind, I built an app that generates everything automatically. I just need to specify the type of words I want, for example, "animals" or "vehicles," and everything is created—including the words (both in English and Portuguese), the images, and the speech in both languages.&lt;/p&gt;

&lt;p&gt;The app works like this: my kids see an image and an English word. When they click on it, they hear the word in English. If they click on the "card," the word changes to Portuguese, and clicking it again plays the pronunciation in Portuguese. That simple.&lt;/p&gt;

&lt;p&gt;It’s a low-cost way to memorize English words while also learning more about AWS services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Loading Words into the Database
&lt;/h2&gt;

&lt;p&gt;First of all, to use the app, you need to load words into the database.&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%2F7dec3m9br4vubaj7bxrp.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%2F7dec3m9br4vubaj7bxrp.png" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I created an endpoint that generates words based on what I request using GenAI. Because I personally load these words into the database, a simple REST endpoint is good to trigger the process. A Lambda function receives an invocation from an API Gateway and calls the Bedrock service to generate words in English along with their Portuguese translations, so I get a pair of words—a word and its translation. Basically, I have a prompt that asks Bedrock for a JSON with these words, concatenating the instructions I send in the payload of the endpoint. I'm using the Claude 3 Haiku model from Anthropic for that.&lt;/p&gt;

&lt;p&gt;I receive a JSON like this:&lt;br&gt;
&lt;/p&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="err"&gt;substantivos:&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;'português':&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'mesa'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'inglês':&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'table'&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;'português':&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'cadeira'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'inglês':&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'chair'&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;Because I want these words to be generated and saved quickly in my database, I send each word pair as an event to EventBridge. The idea of using EventBridge is leveraging its power to parallelize the generation. Also, I can later have other applications listening to these events, for example, translating into another language (maybe for a future trip with the kids).&lt;/p&gt;

&lt;p&gt;Then, I use Step Functions to handle the rest. In that workflow, I create an image for each word as well as speech for both words. Here, I have a classic necessity of doing things step by step. I need to create an image for the word, then generate speech for it, and in the end, save all the data. When I explain this, it’s clear to me that a workflow is necessary. Step Functions is great for that. One good thing was that I could parallelize the generation of images and speech by putting them side by side in my workflow. Once both are finished, I save the data. No fancy controls are needed—just a clean workflow. Easy to build, easy to read, and easy to understand what is happening.&lt;/p&gt;

&lt;p&gt;For image generation, I used GenAI through Bedrock. The model is Amazon Titan Image—simple, cheap, and perfect for this use case. No need for complex images, just simple and clean visuals that are easily recognized by a child.&lt;/p&gt;

&lt;p&gt;For speech, I used Polly.&lt;/p&gt;

&lt;p&gt;Both images and audio files are saved in S3 buckets.&lt;/p&gt;

&lt;p&gt;Afterward, all the data is saved in a DynamoDB table. Here’s an important detail: I have two tables. One to save all word data and another to store the number of words available. I do this to easily retrieve a random word in the app. I’ll explain more about that.&lt;/p&gt;

&lt;p&gt;With that, I can load as many words as I want into my app.&lt;/p&gt;

&lt;p&gt;Now, let’s talk about the app itself.&lt;/p&gt;

&lt;p&gt;Here’s the app architecture:&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%2F6oe6xejcm7fpig6djrea.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%2F6oe6xejcm7fpig6djrea.png" width="800" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As I explained, the idea of the app is to show random images to my kids so they can memorize and practice speaking each word.&lt;/p&gt;

&lt;p&gt;So, I have an endpoint that retrieves a random word from the database and displays it to the user. Since I need to fetch a random word, I use a Lambda function between API Gateway and the DynamoDB table. This Lambda function gets the number of words available and generates a random number based on that. With this number, it finds the word in a DynamoDB table.&lt;/p&gt;

&lt;p&gt;I'm serving images and audio from S3 through CloudFront with caching enabled.&lt;/p&gt;

&lt;p&gt;Finally, I have a simple Angular page hosted on S3 and served via CloudFront.&lt;/p&gt;

&lt;p&gt;You can try it out on our demo website, where everything is running: &lt;a href="https://mee-moo.com" rel="noopener noreferrer"&gt;https://mee-moo.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code of this solution you can find in this repository in my GitHub: &lt;a href="https://github.com/epiresdasilva/learn-english-with-serverless-genai" rel="noopener noreferrer"&gt;https://github.com/epiresdasilva/learn-english-with-serverless-genai&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;I like using challenges from my daily life with my family to demonstrate how we can use these services to solve real problems—usually with low cost and in a quick way.&lt;/p&gt;

&lt;p&gt;It’s not different from the challenges we face in our companies. Why not use more of this approach to solve everyday problems? Sometimes, this is the first step in showcasing the value of these kinds of services, which can later be applied to core solutions.&lt;/p&gt;

&lt;p&gt;This solution is basically free, running within the AWS Free Tier. Even during development, when I ran multiple tests to improve the solution, I spent no more than 10 dollars.&lt;/p&gt;

&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;This is Evandro Pires. I'm a husband, father of two, but also an AWS Serverless Hero, &lt;a href="https://www.serverlessguru.com/company/careers" rel="noopener noreferrer"&gt;Serverless Guru Ambassador&lt;/a&gt;, CTO, &lt;a href="https://semservidor.com.br" rel="noopener noreferrer"&gt;Podcaster&lt;/a&gt;, and Speaker.&lt;/p&gt;

&lt;p&gt;Serverless Guru thrives on innovation, collaboration, and continuous learning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.serverlessguru.com/company/careers" rel="noopener noreferrer"&gt;Join our team&lt;/a&gt; and help transform the digital landscape for companies worldwide!&lt;/p&gt;

</description>
      <category>genai</category>
      <category>serverless</category>
      <category>lambda</category>
      <category>programming</category>
    </item>
    <item>
      <title>Husband mission on a Saturday: mass conversion of HEIC images with serverless</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Tue, 25 Feb 2025 00:12:03 +0000</pubDate>
      <link>https://dev.to/aws-heroes/husband-mission-on-a-saturday-mass-conversion-of-heic-images-17a2</link>
      <guid>https://dev.to/aws-heroes/husband-mission-on-a-saturday-mass-conversion-of-heic-images-17a2</guid>
      <description>&lt;p&gt;I was helping my wife, who was trying to print some family photos, but the tool she was using only accepted JPG images, and most of her photos were in HEIC format.&lt;/p&gt;

&lt;p&gt;Being the nerd that I am, I wasn't satisfied with just running a local Python script to convert all the photos. I thought: this is a great opportunity to practice creating a serverless application that does this. Using the power of cloud computing, I imagined it was possible to convert all the images almost instantaneously—and I did it!&lt;/p&gt;

&lt;p&gt;A serverless way to massively convert HEIC images to JPG almost instantaneously using S3 and Lambda.&lt;/p&gt;

&lt;p&gt;Here's how I did it...&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&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%2Fs4g8yklj626zifbdj88v.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%2Fs4g8yklj626zifbdj88v.png" alt="Architecture using AWS services to massively convert HEIC images to JPG" width="800" height="775"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The idea is simple. S3 is an object storage service where I can store any type of file at a low cost. S3 has an interesting feature called "Event Notifications." With this feature, I can "listen" for different events that occur in a bucket (the location where I upload files).&lt;/p&gt;

&lt;p&gt;So, for each file I upload, an event is triggered, which then handles the conversion to JPG. For the conversion, I use a Lambda function. Lambda is a Function-as-a-Service (FaaS) component that allows you to run code without worrying about infrastructure. It’s scalable and you only pay for what you use.&lt;/p&gt;

&lt;p&gt;This same Lambda function saves the JPG image to another S3 bucket, where I can download it.&lt;/p&gt;

&lt;p&gt;The cool thing is that the conversion happens almost instantaneously. That’s because both S3 and Lambda are serverless services, meaning they automatically scale as needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;

&lt;p&gt;Clone the following repository: &lt;a href="https://github.com/epiresdasilva/heic-to-jpg" rel="noopener noreferrer"&gt;https://github.com/epiresdasilva/heic-to-jpg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To deploy this solution I'll need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account properly configured in our workspace&lt;/li&gt;
&lt;li&gt;Python 3.9&lt;/li&gt;
&lt;li&gt;Serverless Framework&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is the step by step:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install python dependencies
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Deploy to AWS
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sls deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Access your AWS Console, go to the S3 session and upload your HEIC photos to the "heic-input-*" bucket.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to the "jpg-output-*" bucket and download your converted files.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;I was able to convert all the images for my wife in seconds by uploading the files through the S3 upload interface and downloading them from the S3 bucket.&lt;/p&gt;

&lt;p&gt;The estimated cost for this is $0.000002293 per image converted.&lt;/p&gt;

&lt;p&gt;Curious fact: in 24 hours, without tell anyone, I had 20 clones of my repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  About me
&lt;/h2&gt;

&lt;p&gt;This is Evandro Pires. I'm a husband, father of two, but also a AWS Serverless Hero, &lt;a href="https://serverless-guru-llc.breezy.hr/" rel="noopener noreferrer"&gt;Serverless Guru Ambassador&lt;/a&gt;, CTO, Podcaster and Speaker.&lt;/p&gt;

&lt;p&gt;Serverless Guru thrives on innovation, collaboration, and continuous learning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.serverlessguru.com/company/careers" rel="noopener noreferrer"&gt;Join our team&lt;/a&gt; and help transform the digital landscape for companies worldwide!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>s3</category>
      <category>lambda</category>
    </item>
    <item>
      <title>Minecraft Server on AWS</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Wed, 17 Jan 2024 02:08:54 +0000</pubDate>
      <link>https://dev.to/aws-heroes/minecraft-server-on-aws-5g61</link>
      <guid>https://dev.to/aws-heroes/minecraft-server-on-aws-5g61</guid>
      <description>&lt;p&gt;My 7 years old son is a fan of Minecraft. He started playing last year (2023) and he only talk about that the last 6 months. Now, he want to play with us, me, my wife, my 5 years old daughter, as well with some cousins.&lt;/p&gt;

&lt;p&gt;It's available lots of servers on the internet, both paid or free, but those server don't have the security I want to my kid.&lt;/p&gt;

&lt;p&gt;It's true that I'm a nerd father, so I had the idea of creating my own Minecraft Server on AWS. A server it will be used only by us.&lt;/p&gt;

&lt;p&gt;So, if you want to learn a little about AWS in a fun way or you're a parent wanting to create a Minecraft server to your kids, here a GitHub repository that I created for that: &lt;a href="https://github.com/epiresdasilva/aws-minecraft-server" rel="noopener noreferrer"&gt;https://github.com/epiresdasilva/aws-minecraft-server&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To create this server, we'll use the following AWS services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/cloudformation/" rel="noopener noreferrer"&gt;CloudFormation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;EC2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're not familiar with these services, I recommend to study the basics first, including Security Groups on EC2.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps
&lt;/h2&gt;

&lt;p&gt;It's very simple to create a Minecraft server. To do this faster and reproduceble, I create a CloudFormation code for that.&lt;/p&gt;

&lt;p&gt;In the repository, you'll find a file called &lt;code&gt;minecraft-server.yaml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Basically, in this file I create a Security Group to allow only few ports I want to expose to the internet, like SSH and the port 25565 that is the port Minecraft Launcher connects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="na"&gt;MinecraftSecurityGroup&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;AWS::EC2::SecurityGroup'&lt;/span&gt;
    &lt;span class="na"&gt;Properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;GroupDescription&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Enable&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;SSH&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;and&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Minecraft&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;server&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;port'&lt;/span&gt;
      &lt;span class="na"&gt;SecurityGroupIngress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;IpProtocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;tcp&lt;/span&gt;
          &lt;span class="na"&gt;FromPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;22&lt;/span&gt;
          &lt;span class="na"&gt;ToPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;22&lt;/span&gt;
          &lt;span class="na"&gt;CidrIp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0/0&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;IpProtocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;tcp&lt;/span&gt;
          &lt;span class="na"&gt;FromPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25565&lt;/span&gt;
          &lt;span class="na"&gt;ToPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25565&lt;/span&gt;
          &lt;span class="na"&gt;CidrIp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0/0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another important part is creating the EC2 instance. Basically, you need to choose the Linux image you want, as well the instance type. I choose a &lt;code&gt;t4g.small&lt;/code&gt; and it's running very well. I just need to understand if can be a smaller instance yet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;      &lt;span class="na"&gt;InstanceType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;t4g.small&lt;/span&gt;
      &lt;span class="na"&gt;ImageId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ami-02cd6549baea35b55&lt;/span&gt;
      &lt;span class="na"&gt;KeyName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Minecraft Server&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The instance type you can find in the EC2 page or using the AWS Calculator, so doing that it's easier to understand how much it will costs.&lt;/p&gt;

&lt;p&gt;The image ID you'll find on the AMI Marketplace on the EC2 section on your AWS Management Console.&lt;/p&gt;

&lt;p&gt;You need to create a KeyPair also on the EC2 section. After creating, just put the name in the "KeyName" on the YAML file.&lt;/p&gt;

&lt;p&gt;Finally, you just need to run the following command:&lt;br&gt;
&lt;code&gt;aws cloudformation create-stack --stack-name MinecraftServerStack --template-body file://minecraft-server.yaml --region us-east-1&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Security
&lt;/h2&gt;

&lt;p&gt;Remember, DO NOT create that stack using your root user. Create an especific one to that. On doing that, remember to give only the necessary permissions you need. For instance, I used &lt;code&gt;AmazonEC2FullAccess&lt;/code&gt; and &lt;code&gt;AWSCloudFormationFullAccess&lt;/code&gt; and worked fine, but maybe can be more restricted yet.&lt;/p&gt;

&lt;p&gt;This template doesn't create an advanced security for that server, so if you need to improve security it's important working on new layers of security in that template.&lt;/p&gt;

&lt;p&gt;In my server, I made a configuration using Security Group to allow only connections from my IP, so I avoid other users to connect to my server even if they know my EC2 address.&lt;/p&gt;

&lt;p&gt;Following it's how you can do that in the AWS Management Console:&lt;br&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%2F2kq0c83ngh353l6huyke.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%2F2kq0c83ngh353l6huyke.png" alt="Image of a Security Group configuration showing where is the My IP option" width="749" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reboot
&lt;/h2&gt;

&lt;p&gt;The script for running the Minecraft will run only for the first time when the EC2 instance is created. So, if your instance reboot the Minecraft Server won't start again.&lt;/p&gt;

&lt;p&gt;After creating my EC2 instance, I create a &lt;code&gt;systemd&lt;/code&gt; to handle with that, but I didn't add that to my template.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a systemd service file:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /etc/systemd/system/minecraft.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create the content:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Unit]&lt;/span&gt;
&lt;span class="py"&gt;Description&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;Minecraft Server&lt;/span&gt;
&lt;span class="py"&gt;After&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;network.target&lt;/span&gt;

&lt;span class="nn"&gt;[Service]&lt;/span&gt;
&lt;span class="py"&gt;User&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;root&lt;/span&gt;
&lt;span class="py"&gt;Nice&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;5&lt;/span&gt;
&lt;span class="py"&gt;KillMode&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;none&lt;/span&gt;
&lt;span class="py"&gt;SuccessExitStatus&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0 1&lt;/span&gt;
&lt;span class="py"&gt;InaccessibleDirectories&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/root /sys /srv /media -/lost+found&lt;/span&gt;
&lt;span class="py"&gt;NoNewPrivileges&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;WorkingDirectory&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;
&lt;span class="py"&gt;ExecStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/opt/jdk-17.0.9/bin/java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui&lt;/span&gt;
&lt;span class="py"&gt;ExecStop&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/bin/kill -SIGINT $MAINPID&lt;/span&gt;

&lt;span class="nn"&gt;[Install]&lt;/span&gt;
&lt;span class="py"&gt;WantedBy&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;multi-user.target&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Reload the systemd:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl daemon-reload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Enable the service:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;minecraft.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Start the service:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start minecraft.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Check the service status:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status minecraft.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Service logs:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; minecraft.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Playing Minecraft
&lt;/h2&gt;

&lt;p&gt;Now, you have your own Minecraft Server and you are able to play with your friends and family.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>minecraft</category>
      <category>ec2</category>
      <category>cloudformation</category>
    </item>
    <item>
      <title>Could a non IT professional to build a Lambda function?</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Wed, 23 Jun 2021 02:57:10 +0000</pubDate>
      <link>https://dev.to/aws-builders/could-a-non-it-professional-to-build-a-lambda-function-588b</link>
      <guid>https://dev.to/aws-builders/could-a-non-it-professional-to-build-a-lambda-function-588b</guid>
      <description>&lt;p&gt;Who knows me, also know I love serverless because of the lead time, and not only because of the technology (but I like it too).&lt;br&gt;
One day, during the pandemics, I was wondering how I can prove serverless is really a good choice for a better lead time. Thinking about that, I asked myself: could a non IT professional to build a Lambda function?&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing my wife
&lt;/h2&gt;

&lt;p&gt;My wife is a full-time mother of two kids (they were 1 and 4 years old when the challenge happened). If you have kids, you know that isn't an easy task to care of them the whole day. But, fortunately for me, my wife is crazy enough to accept my challenge. She is an interior designer, and she knows only the basic of a regular user of a computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  7 days challenge
&lt;/h2&gt;

&lt;p&gt;The challenge was: could she learn the basic enough of a programming language and create a Lambda function on AWS in 7 days?&lt;/p&gt;

&lt;h2&gt;
  
  
  The study process
&lt;/h2&gt;

&lt;p&gt;First, I suggested for her to study Python as the programming language target. That's because the learning curve of this language is very nice. I also helped with a one hour explain about programming logic.&lt;br&gt;
For her studies, I recommended studying in &lt;a href="https://www.codecademy.com/" rel="noopener noreferrer"&gt;codecademy.com&lt;/a&gt; and use PyCharm as the IDE.&lt;/p&gt;

&lt;p&gt;I tried not to interfere in the study process, doing only some mentoring during the days of challenge.&lt;/p&gt;

&lt;p&gt;After two days studying, she found some women python community that inspired her to continue the process. She also started to create basic logics with some variables and "if's".&lt;/p&gt;

&lt;p&gt;When she reached the fourth day of studies, she falls in the curiosity to understand how Python actually words behind the scenes, and how programming languages are made, how processors work, and so on. At this moment, I needed to put her on the rails because the time box was very short to understand all those things.&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%2Fmz3teea12iv2zf6hn5ao.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%2Fmz3teea12iv2zf6hn5ao.JPG" alt="My wife during her studies" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Developing a Lambda function
&lt;/h2&gt;

&lt;p&gt;Day 6. She already developed a very simple function that receive a month in number and returns how many holidays it has on that month.&lt;br&gt;
With that development, she was ready to develop her first Lambda function ever.&lt;br&gt;
I made a quick explanation on what is a serverless function and where she could find the documentation for that. I also gave her my AWS credentials.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying the Lambda function
&lt;/h2&gt;

&lt;p&gt;Using the AWS web interface, she put her python code on the Lambda function and ran a test to complete the challenge.&lt;br&gt;
After that, I made only few adjustments to work with API Gateway and I ran a load test to prove that a non IT professional can build a scalable "system".&lt;/p&gt;

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

&lt;p&gt;In 7 days, it is impossible to become a programmer and also a cloud specialist, of course. The idea of this challenge was to prove that we can have a better lead time developing with serverless services. If a non IT professional can create a Lambda function in 7 days (learning a programming language from zero), imagine how much a professional developer can do with serverless.&lt;/p&gt;

&lt;p&gt;PS: As the payment of that challenge, I watched Korean series on Netflix and participate of Meatless Monday with her.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lots of thanks to my wife Madilene.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cover image by Julia M Cameron on Pexels&lt;/em&gt;.&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>python</category>
      <category>aws</category>
      <category>programming</category>
    </item>
    <item>
      <title>Which programming language in AWS Lambda should I use?</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Wed, 16 Jun 2021 02:27:42 +0000</pubDate>
      <link>https://dev.to/aws-builders/which-programming-language-in-aws-lambda-should-i-use-3j0</link>
      <guid>https://dev.to/aws-builders/which-programming-language-in-aws-lambda-should-i-use-3j0</guid>
      <description>&lt;p&gt;One of most question I receive is "which programming language is the best for serverless?". People want to know what's the best choice to create their functions in AWS Lambda. But for me, the answer is not that simple just looking for technical stuffs.&lt;/p&gt;

&lt;p&gt;In terms of performance, there are programming languages that perform better than others. The main characteristic that differs to those programming languages is the &lt;em&gt;cold start&lt;/em&gt;. If you don't know, &lt;em&gt;cold start&lt;/em&gt; is an amount of time that your cloud provider spent to start a new instance of your function. Once your function instance is started, the &lt;em&gt;cold start&lt;/em&gt; will not occur for the next execution (until the timeout).&lt;/p&gt;

&lt;p&gt;It's known that programming languages based on JVM, like Java, have a higher &lt;em&gt;cold start&lt;/em&gt;. But Java has a good performance when the function is warmed up. It's also known that interpreted languages and compiled languages have a better performance in terms of &lt;em&gt;cold start&lt;/em&gt;. That's the case of NodeJS and Python. These two programming language have a lower &lt;em&gt;cold start&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So, if we think only technically, the answer is simple: use NodeJS or Python. But, as I said before, it isn't that simple.&lt;/p&gt;

&lt;p&gt;For me, developing a serverless application isn't only a technical choose. It's especially about &lt;strong&gt;lead time&lt;/strong&gt;, &lt;strong&gt;time to market&lt;/strong&gt; and a better use of resources.&lt;/p&gt;

&lt;p&gt;When I talk about lead time and time to market, that means it's important to care about how much time you need to develop your application. It's common to hear quotes like "faster companies won over big companies" and, because of that, it's important to think about how to build your application faster.&lt;/p&gt;

&lt;p&gt;About better use of resources, when we develop our application faster it means we use less development resource. It's also important to think about maintenance, because once launched the application you need to keep that in the air, fix possible bugs, etc.&lt;/p&gt;

&lt;p&gt;Thinking on all those things, I decided to create a diagram that help you to choose a programming language for your serverless function.&lt;/p&gt;

&lt;h1&gt;
  
  
  Choosing a programming language
&lt;/h1&gt;

&lt;p&gt;First of all, I want to clarify that's my own opinion, and it isn't a &lt;em&gt;bullet silver&lt;/em&gt;, but I believe it will help you in most cases.&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%2Fszyf1k2uwa7krc1zlrrp.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%2Fszyf1k2uwa7krc1zlrrp.png" alt="Alt Text" width="800" height="678"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to the image above, I prefer to use a programming language that the team knows instead of a "better programming language". I did that because I believe in most cases the &lt;strong&gt;time to market&lt;/strong&gt; is more important than the performance. There are many cases when we use functions in an event based architecture and those events are asynchronous. Besides that, even when the function in synchronous, for many times those functions will be &lt;em&gt;warmed up&lt;/em&gt;, so we mitigate performance problems.&lt;/p&gt;

&lt;p&gt;Using a programming language known by your team, you will develop your application faster (better time to market and less resources), and you will maintain easier because the programming language is in the comfort zone.&lt;/p&gt;

&lt;p&gt;If you need to rewrite some function in the future because of performance, it's easy, just because serverless functions are decouple by design.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Of course, if we have an opportunity to use an appropriated programming language in terms of performance it will be great, but I really believe in &lt;em&gt;time to market&lt;/em&gt; first.&lt;/p&gt;

&lt;p&gt;Cover image by Luis Gomes on Pexels.&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>lambda</category>
      <category>aws</category>
      <category>node</category>
    </item>
    <item>
      <title>Criando a votação do BBB com serverless</title>
      <dc:creator>Evandro Pires</dc:creator>
      <pubDate>Wed, 12 May 2021 03:13:31 +0000</pubDate>
      <link>https://dev.to/epiresdasilva/criando-a-votacao-do-bbb-com-serverless-12oo</link>
      <guid>https://dev.to/epiresdasilva/criando-a-votacao-do-bbb-com-serverless-12oo</guid>
      <description>&lt;p&gt;O BBB 2021 foi um grande sucesso de audiência e também em participação nas votações para eliminação dos participantes.&lt;br&gt;
A votação funciona de uma forma bastante simples. Num domingo, o Paredão era formado (formação com 3 pessoas candidatas a eliminação) e até a próxima terça-feira, a votação ficava aberta, ou seja, eram cerca de 48 horas para votação.&lt;/p&gt;

&lt;p&gt;Durante a edição de 2021 desse programa, fui convidado para palestrar em um evento de TI e para trabalhar no conteúdo eu quis criar algo novo. E foi aí que juntei as duas coisas: BBB e Serverless. Dessa combinação surgiu o SSS - Super Serverless Sample (sim, o nome é horrível mas foi o que consegui pensar para ter 3 "S" no acrônimo).&lt;/p&gt;

&lt;p&gt;A provocação que fiz foi: será que é possível atender aos requisitos da votação do BBB usando serverless?&lt;/p&gt;

&lt;p&gt;Tivemos divulgação de estatísticas de votação do BBB, pelo time de TI da globo.com, onde foram alcançados números recordes de participação:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1,5 milhão de requisições por minuto no pico&lt;/li&gt;
&lt;li&gt;1 bilhão de requisições dentro de 48 horas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Além disso, o resultado da rodada era divulgado 20 minutos após o encerramento da votação.&lt;/p&gt;

&lt;h1&gt;
  
  
  Serverless
&lt;/h1&gt;

&lt;p&gt;Serverless é um termo usado para aplicações e ferramentas que são gerenciadas pelo cloud provider e que tem precificação por utilização, ou seja, não se paga por tempo ocioso. Além disso, elas têm como padrão a alta disponibilidade, escalabilidade automática e segurança.&lt;/p&gt;

&lt;p&gt;Por ter essas características, o Serverless tem bastante sinergia com os requisitos apontados na votação do BBB.&lt;/p&gt;

&lt;h1&gt;
  
  
  Arquitetura
&lt;/h1&gt;

&lt;p&gt;Com o desafio dos requisitos não funcionais da votação do BBB e tendo o Serverless como a solução para isso, desenhei uma arquitetura para a aplicação.&lt;br&gt;
Foi utilizada a AWS como cloud provider.&lt;/p&gt;

&lt;p&gt;Na imagem abaixo, vemos uma arquitetura bastante simples, mas com bastante poder de processamento.&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%2Fns7pu821t14bsg7ootxc.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%2Fns7pu821t14bsg7ootxc.jpg" width="672" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API Gateway: recebimento das requisições através de uma API Rest e enviando de forma assíncrona para processamento, proporcionando um alto &lt;em&gt;throughput&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;EventBridge: poderoso broker de mensagens que permite a execução paralela de cada mensagem de forma massiva. Alta capacidade de processamento das mensagens no mesmo ritmo que é recebido&lt;/li&gt;
&lt;li&gt;DynamoDB: armazenamento dos votos individuais&lt;/li&gt;
&lt;li&gt;SQS: envio de mensagens em lotes para processo assíncrono de contagem dos votos. O envio de lotes proporciona uma contagem mais rápida. Ao mesmo tempo, o SQS permite um processamento alto e controlado para não sobrecarregar o banco de dados&lt;/li&gt;
&lt;li&gt;RDS (Aurora Serverless): armazenamento da contagem dos votos, permitindo o incremento do valor e emissão de relatórios de forma mais otimizada&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Desafio da definição da arquitetura
&lt;/h2&gt;

&lt;p&gt;Esse desenho de arquitetura mostrado anteriormente é a versão final, mas precisei iterar sobre ele para chegar nessas conclusões. Por isso, quero registrar também as escolhas que não atenderam as necessidades.&lt;br&gt;
É importante dizer que serverless te entrega escala sem preocupação, mas isso não significa que você terá a escala necessária para resolver o seu problema. Isso porque cada serviço tem suas característica e apesar de em termos de infraestrutura você ter problema de escala, você pode ainda ter problema de vazão.&lt;/p&gt;

&lt;h3&gt;
  
  
  API Gateway e SQS
&lt;/h3&gt;

&lt;p&gt;Na primeira tentativa, utilizei o SQS conectado ao API Gateway para receber os votos de forma assíncrona direto do endpoint. Em termos de disponibilidade não tive nenhum problema, mas o consumo dessas mensagens não atendia a velocidade de contabilização de votos que precisava.&lt;br&gt;
Por esse motivo, o uso de um Broker como o EventBridge fez mais sentido.&lt;/p&gt;

&lt;h3&gt;
  
  
  DynamoDB Stream
&lt;/h3&gt;

&lt;p&gt;Também na primeira versão da arquitetura, ao invés do uso de SQS como Destination da Lambda de registro de votos, eu havia utilizado a Lambda conectada no DynamoDB Stream para ouvir os eventos de cadastro. Em termos funcionais funcionou muito bem, mas assim como o Kinesis, o DynamoDB Stream trabalha com o conceito de &lt;code&gt;shard&lt;/code&gt;. Sendo assim, só é possível paralelizar a mesma quantidade de &lt;code&gt;shards&lt;/code&gt; configuradas no DynamoDB.&lt;br&gt;
Mesmo tendo a opção de paralelizar e aumentar a capacidade, ainda ficou aquém da velocidade necessária para o problema.&lt;/p&gt;

&lt;h1&gt;
  
  
  Desenvolvimento
&lt;/h1&gt;

&lt;p&gt;Para realizar o desenvolvimento dessa aplicação foi utilizada a linguagem de programação NodeJS. A escolha foi por conta da simplicidade dos requisitos e também do baixo &lt;em&gt;cold start&lt;/em&gt;.&lt;br&gt;
Também teve o fator que eu já queria há algum tempo criar alguma função nessa linguagem. :)&lt;/p&gt;

&lt;p&gt;O desenvolvimento todo foi realizado dentro de uma semana, trabalhando somente em dias úteis em torno de 2 horas por dia. Um total de 10 horas de desenvolvimento. Vale ressaltar que nunca desenvolvi com NodeJS, portanto nessa carga horária estão contemplados vários "perrengues" de adotar essa linguagem.&lt;/p&gt;

&lt;h1&gt;
  
  
  Estatísticas
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Teste de carga
&lt;/h2&gt;

&lt;p&gt;Uma parte importante da jornada foi o teste de carga. A característica do requisito era a alta escala de requisições. Por isso, era bem importante validar se a aplicação conseguiria ser um backend viável para a votação do BBB.&lt;/p&gt;

&lt;p&gt;Para exercitar algumas requisições com objetivo maior de validar os requisitos funcionais, utilizei o JMeter.&lt;br&gt;
Quando parti para testes de cargas mais massivo, utilizei o Artillery na versão serverless. Essa versão, utiliza funções Lambda para criar a carga. É serverless "contra" serverless.&lt;/p&gt;

&lt;p&gt;Abaixo, algumas informações sobre os testes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nos testes mais simples: 5k requisições por segundo

&lt;ul&gt;
&lt;li&gt;10 segundos de duração&lt;/li&gt;
&lt;li&gt;50k requisições no total&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Testes de processamento: 20k requisições por segundo

&lt;ul&gt;
&lt;li&gt;60 segundos de duração&lt;/li&gt;
&lt;li&gt;1,2mi requisições no total&lt;/li&gt;
&lt;li&gt;Tempo de processamento do placar: 25 minutos&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Foram vários testes de cargas nessas características, certamente mais de 10 mi requisições no total.&lt;/p&gt;

&lt;h2&gt;
  
  
  Custos
&lt;/h2&gt;

&lt;p&gt;Os valores abaixo são do intervalo todo de desenvolvimento, portanto esses custos incluem todos os testes realizados inúmeras vezes e não somente o teste final que resultou na estatística citada anteriormente. Alguns custos são contabilizados diariamente, o que poderia ter sido otimizado se usasse menos dias mas com a mesma carga horária.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RDS: US$ 2,90 / dia&lt;/li&gt;
&lt;li&gt;VPC: US$ 1,44 / dia&lt;/li&gt;
&lt;li&gt;Lambda: US$ 1,00 total&lt;/li&gt;
&lt;li&gt;API Gateway: US$ 7,12 total&lt;/li&gt;
&lt;li&gt;DynamoDB: US$ 2,46 total&lt;/li&gt;
&lt;li&gt;SQS: US$ 0,21 total&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total: US$ 52,57&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  O que ainda poderia ser feito
&lt;/h1&gt;

&lt;p&gt;O tempo utilizado para desenvolver a aplicação contemplou não só o desenvolvimento, mas também a concepção, desenho de arquitetura e todo o processo de testes. Por isso, o tempo acabou sendo pouco para criar algo mais completo.&lt;/p&gt;

&lt;p&gt;Abaixo algumas coisas que poderiam ainda serem feitas no sistema:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Abordagem mais robusta de dados: processar os mais rapidamente

&lt;ul&gt;
&lt;li&gt;Near realtime com Kinesis, por exemplo&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Pipeline para deploy automatizado&lt;/li&gt;

&lt;li&gt;Utilização de SecretsManager: para proteger a credencial do banco de dados RDS&lt;/li&gt;

&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusões
&lt;/h1&gt;

&lt;p&gt;De maneira geral, a aplicação serverless se mostrou bastante viável para ser o backend de votação do BBB. Com pequenas melhorias é possível aumentar ainda mais o poder de processamento, especialmente para processar os votos mais rapidamente e ter o placar de forma mais antecipada.&lt;br&gt;
Com uma carga horária bem pequena, foi criado uma aplicação que consegue processar 1,2 milhão de votos por minuto e entregar o placar em 25 minutos.&lt;/p&gt;

&lt;p&gt;Essa aplicação está disponível no GitHub: &lt;a href="https://github.com/epiresdasilva/super-serverless-sample" rel="noopener noreferrer"&gt;https://github.com/epiresdasilva/super-serverless-sample&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Conheça o podcast Sem Servidor, um podcast dedicado ao tema Serverless com conteúdos em Português: &lt;a href="https://semservidor.com.br" rel="noopener noreferrer"&gt;https://semservidor.com.br&lt;/a&gt;&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>aws</category>
      <category>node</category>
      <category>lambda</category>
    </item>
  </channel>
</rss>
