<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Miguel Hernández Giusti on Medium]]></title>
        <description><![CDATA[Stories by Miguel Hernández Giusti on Medium]]></description>
        <link>https://medium.com/@mhernandezve?source=rss-93272cd3a923------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZMwSzE268Xv2kjRBkNTBfg@2x.jpeg</url>
            <title>Stories by Miguel Hernández Giusti on Medium</title>
            <link>https://medium.com/@mhernandezve?source=rss-93272cd3a923------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 15:32:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mhernandezve/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Secrets as Code: A Developer’s Journey from Exposure to Encryption]]></title>
            <link>https://medium.com/globant/secrets-as-code-a-developers-journey-from-exposure-to-encryption-4bb2c378a27c?source=rss-93272cd3a923------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bb2c378a27c</guid>
            <category><![CDATA[cloudops]]></category>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[management-secrets]]></category>
            <category><![CDATA[mozilla-sops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Miguel Hernández Giusti]]></dc:creator>
            <pubDate>Mon, 21 Jul 2025 16:25:06 GMT</pubDate>
            <atom:updated>2025-07-21T16:25:06.520Z</atom:updated>
            <content:encoded><![CDATA[<h4>Answer the call to secure your GitOps workflow with Mozilla SOPS and become the guardian of your infrastructure</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*R7jRzr0Nc03JyOOz" /><figcaption>Image generated by <a href="https://leonardo.ai/">Leonardo AI</a></figcaption></figure><p>Every developer knows that<em> </em>moment. You’re ready to commit, everything’s working… and then you see it: a secret API key, exposed in plain text. Your stomach drops. You delete it, rotate the key, push again — but the damage might already be done.</p><p>It’s not just a one-time scare — it’s a recurring dragon in the <a href="https://en.wikipedia.org/wiki/DevOps">DevOps</a> world. As we shift left and move faster, secrets start slipping into version control, CI pipelines, and shared configs. Traditional solutions often feel clunky, locked behind user interfaces, or detached from our Git-native workflows.</p><p>However, among the many tools available, one stands out that is designed specifically for this challenge: Mozilla SOPS — a lightweight, cloud-agnostic solution for managing secrets as code. It focuses on encrypting only the sensitive parts of your files, while preserving readability and maintaining compatibility with version control systems.</p><p>This is the part of the story where the hero — you — arms up. What follows is your map: how to wield SOPS to defend your pipelines, protect your infrastructure, and bring order to the chaos of secrets management.</p><h3>🛠️ The First Challenge: Secrets in the Open</h3><p>Every hero faces an early test, and for modern developers, it often comes in the form of a leaked .env file or an accidentally committed API key. You think, <em>“Just this once,</em>” or<em> “I’ll rotate it later.”</em> However, the truth is that secrets in plain text are vulnerabilities waiting to be exploited.</p><p>Version control is your battlefield. It tracks everything. Forever. What you push today can haunt your production tomorrow.</p><p>That’s when you realize: you don’t need to move slower — you need to change your approach.</p><h3>🔍 The Discovery: What Is Mozilla SOPS?</h3><p>In your search for a better way, you stumble upon a tool not forged in secret, but in open-source light: <strong>Mozilla SOPS (Secrets OPerationS)</strong>.</p><p>It doesn’t ask you to abandon Git.<br>It doesn’t force you into a platform.<br>It <strong>embraces the way you work</strong> — and strengthens it.</p><p>With SOPS, you encrypt only the values that matter (such as passwords, tokens, and keys) while keeping the structure of your config readable and merge-friendly. YAML, JSON, ENV, INI— SOPS speak your language.</p><p>It supports <strong>multiple key management systems,</strong> like:</p><ul><li><a href="https://aws.amazon.com/kms/">AWS KMS</a>.</li><li><a href="https://cloud.google.com/security/products/security-key-management">GCP KMS</a>.</li><li><a href="https://azure.microsoft.com/en-us/products/key-vault">Azure Key Vault</a>.</li><li><a href="https://en.wikipedia.org/wiki/Pretty_Good_Privacy#:~:text=Pretty%20Good%20Privacy%20(PGP)%20is,security%20of%20e%2Dmail%20communications.">PGP</a>.</li><li><a href="https://github.com/age-sops/age">Age</a>.</li></ul><p>You choose the weapon. It handles the rest.</p><h3>🧰 Gear Up: What You’ll Need for the Journey</h3><p>Before you set off to tame the chaos of secret sprawl, you’ll need to gather your essentials:</p><ul><li>Familiarity with YAML, JSON, or ENV files.</li><li>Basic knowledge of Git and version control.</li><li>A working AWS account, and your CLI must be installed and logged in.</li><li>Mozilla SOPS installed.</li></ul><h3>🔗 SOPS and GitOps: A Natural Alliance</h3><p>GitOps is built on a powerful idea: <strong>Git is the single source of truth</strong> for your infrastructure and application state. That includes configurations, deployments… and yes, even secrets.</p><p>But here’s the challenge: Secrets are sensitive. Git is transparent.</p><p>This is where Mozilla SOPS can be particularly effective.</p><p>Why SOPS aligns with GitOps workflows:</p><ul><li><strong>Version-Controlled Secrets: </strong>With SOPS, secrets are encrypted and stored directly in Git, close to your <a href="https://kubernetes.io/">Kubernetes</a> manifests, <a href="https://helm.sh/">Helm</a> values, or <a href="https://developer.hashicorp.com/terraform">Terraform</a> variables. That means you get full change history, diffs, and auditability without exposing sensitive data.</li><li><strong>Declarative and Reproducible:</strong> GitOps relies on declarative infrastructure, which enables reproducibility and repeatability. SOPS lets you <strong>declare secrets securely</strong>, keeping your system’s state reproducible from Git alone — no need to fetch secrets from an external vault during deployment.</li><li><strong>CI/CD and Reconciliation Ready: </strong>SOPS-encrypted files can be decrypted automatically by GitOps tools like <a href="https://fluxcd.io/"><strong>Flux</strong></a>, <a href="https://argo-cd.readthedocs.io/en/stable/"><strong>Argo CD</strong></a>, or custom CI/CD pipelines. It supports the GitOps flow: <strong>you commit → Git updates → automation deploys</strong>.</li><li><strong>Portable and Tool-Agnostic: </strong>Unlike some vault-based systems that require runtime agents or tightly coupled platforms, SOPS is lightweight, client-side, and <strong>cloud-agnostic</strong>. It makes it easy to use across GitOps tools, clusters, and cloud providers.</li></ul><h3>⚔️ The Trials: Why Not Just Use GitHub Secrets?</h3><p>You’ll encounter whispers of easier paths — like GitHub’s built-in secrets manager. And yes, it has its place: storing tokens for workflows, injecting variables into your CI.</p><p>However, here’s the truth: <strong>GitHub Secrets live in the cloud, not your code.</strong></p><p>You can’t version them.</p><p>You can’t track changes.</p><p>You can’t review them in pull requests.</p><p>They’re useful — but they don’t travel with you.</p><p>SOPS, by contrast, stays by your side. Your secrets live in your repo — encrypted, auditable, and portable. You can pass them from dev to staging to prod, all under Git’s watchful eye. And you’re not locked into a single platform.</p><p>It isn’t just convenience. It’s control.</p><p>It isn’t just security. It’s sovereignty.</p><h3>🛤️ The Forked Paths: Choosing Your Secrets Companion</h3><p>On the journey to secure your infrastructure, you’ll encounter many guides — each with their strengths, philosophies, and hidden costs. But choose wisely: not every protector of secrets walks the same path.</p><h3>🏰 The Vault Master: HashiCorp Vault</h3><p>Powerful, ancient, and built like a fortress, <a href="https://www.hashicorp.com/en/products/vault">HashiCorp Vault</a> controls secrets from a centralized tower. With policy-driven access, audit trails, and dynamic credentials, it offers immense power — but demands infrastructure, tokens, and ongoing maintenance — a tool for enterprises and seasoned teams that need tight, runtime control. But beware: it walks <strong>apart from Git</strong>, speaking a different language than your code.</p><h3>🧙 The Sealer: Sealed Secrets</h3><p>Born in the Kubernetes realm, <a href="https://github.com/bitnami-labs/sealed-secrets">Sealed Secrets</a> wraps secrets in magic, transforming them into sealed artifacts bound to a single cluster’s identity. It’s Git-friendly <strong>only within Kubernetes</strong>, but rigid beyond it. You trust a controller to unlock the secrets at runtime, and while it’s excellent for simple GitOps in K8s, outside that boundary, its power fades.</p><h3>🛠️ The Repo Enchanter: git-crypt</h3><p>This old-school guardian lives directly inside Git. Simple, fast, and valuable for whole-file encryption, <a href="https://github.com/AGWA/git-crypt">git-crypt</a> protects files from prying eyes using GPG. However, it lacks the finesse of modern workflows — no field-level encryption, no format awareness, and no cloud integration, making it a good fit for small teams or legacy workflows.</p><h3>🧭 The Map: How SOPS Works in Your Journey</h3><p>Every quest needs a plan. Here’s how you can start using it today:</p><p>Install SOPS:</p><pre># MacOS<br>brew install sops<br># Linux Debian/Ubuntu<br>apt install sops<br># Fedora/Red Hat<br>yum install sops</pre><p>Create your config (e.g., a secrets.yaml or .env file):</p><pre># secrets.yaml<br>apiVersion: v1<br>kind: Secret<br>metadata:<br>name: my-app-secrets<br>namespace: default<br>type: Opaque<br>stringData:<br>DB_USERNAME: admin<br>DB_PASSWORD: supersecret123<br>API_KEY: sk-test-4eZK39dkQwL9A91e2s<br>JWT_SECRET: s0meRand0mStringValue</pre><p>After connecting to your <a href="https://aws.amazon.com/free">AWS</a> account, run the following command to create your encryption key:</p><pre>aws kms create-key \<br> - description &quot;Key for encrypting secrets with Mozilla SOPS&quot; \<br> - key-usage ENCRYPT_DECRYPT \<br> - customer-master-key-spec SYMMETRIC_DEFAULT</pre><p>The above command returns a <a href="https://www.json.org/json-en.html">JSON</a> with metadata, including the KeyId and ARN you’ll need to get the KMS encryption key:</p><pre>{<br>  &quot;KeyMetadata&quot;: {<br>    &quot;KeyId&quot;: &quot;abcd-1234-…&quot;,<br>    &quot;Arn&quot;: &quot;arn:aws:kms:us-east-1:123456789012:key/abcd-1234-…&quot;,<br>    …<br>  }<br>}</pre><p>Encrypt the secrets.yaml file using SOPS:</p><pre>sops - encrypt - kms arn:aws:kms:us-east-1:123456789012:key/abcd-1234-… secrets.yaml &gt; secrets.enc.yaml</pre><p>Now, you can see the encrypted file secrets.enc.yaml:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F6NJ7N2bmP1j3g2O" /><figcaption>This is the result of encrypting the file with Mozilla SOPS.</figcaption></figure><p>Commit it to Git — safe, versioned, and team-ready.</p><pre>git add secrets.enc.yaml<br>git commit -m &quot;Encrypted secrets file&quot;</pre><p>Decrypt on-demand during deployment, CI/CD, or debugging:</p><pre>sops -d secrets.enc.yaml &gt; secrets.yaml</pre><p>Your secrets now travel with your code, but remain invisible to prying eyes.</p><h3>🧩 Allies Along the Way: Integrating SOPS into Your Stack</h3><p>SOPS is designed to integrate well with a variety of tools commonly used in modern development workflows:</p><ul><li><strong>GitHub Actions</strong>: Securely decrypt secrets during workflows.</li><li><strong>Kubernetes</strong>: Use SOPS with <a href="https://kustomize.io/">Kustomize</a> or <a href="https://github.com/isindir/sops-secrets-operator">SOPS Secrets Operator</a>.</li><li><strong>Helm</strong>: Encrypt values.yaml without changing your charts.</li><li><strong>Terraform</strong>: Protect terraform.tfvars or backend configs.</li></ul><p>Wherever your code goes, your secrets follow — encrypted and respected.</p><h3>🧭 The Path Not Taken — When SOPS May Not Be the Right Fit</h3><p>Every journey presents forks in the road — moments where the wise choice isn’t pressing forward with the tool in hand, but pausing to consider another path. While Mozilla SOPS offers a clear and effective way to manage secrets in Git-based workflows, it isn’t the perfect fit for every environment or team. Knowing when not to use a tool is just as important as knowing when to adopt it.</p><h4>🌫 When Secrets Are Meant to Be Ephemeral</h4><p>In some architectures, secrets are short-lived and created dynamically at runtime, such as tokens issued by an identity provider or credentials injected by a service mesh. In these cases, persisting secrets in version control, even in encrypted form, may add unnecessary complexity.</p><h4>🏛 When a Centralized Secrets Manager Is Already in Use</h4><p>Organizations that have already standardized on tools like HashiCorp Vault, AWS Secrets Manager, or GCP Secret Manager may find that layering SOPS on top creates redundancy. These platforms offer features like automatic rotation, audit logs, and fine-grained access control — making them more suitable for certain centralized workflows.</p><h4>🔄 When Secrets Are Handled Dynamically in CI/CD</h4><p>If secrets are injected into build or deployment pipelines via environment variables or secrets managers — and never stored in files — then SOPS may not be necessary. In these cases, keeping secrets entirely out of source code repositories can simplify the security model.</p><p>There’s no single tool that fits every use case. SOPS works best when versioned, file-based secrets are part of your GitOps or Infrastructure-as-Code workflows. For other scenarios — like centralized secret stores, dynamic secret generation, or fully managed cloud-native services — other solutions may be a better fit.</p><h3>🧑‍🤝‍🧑 When Team Readiness and Workflow Alignment Are a Concern</h3><p>SOPS introduces encrypted files into the Git workflow, which can affect how teams review, merge, and maintain configuration. If a team isn’t yet comfortable working with encrypted diffs or managing keys securely, adopting SOPS too early might hinder collaboration rather than enhance it.</p><h3>🔄 When Secrets Are Handled Dynamically in CI/CD</h3><p>If secrets are injected into build or deployment pipelines via environment variables or secrets managers — and never stored in files — then SOPS may not be necessary. In these cases, keeping secrets entirely out of source code repositories can simplify the security model.</p><h3>🛤 Choosing the Right Tool for the Right Context</h3><p>There’s no single tool that fits every use case. SOPS works best when versioned, file-based secrets are part of your GitOps or Infrastructure-as-Code workflows. For other scenarios — like centralized secret stores, dynamic secret generation, or fully managed cloud-native services — other solutions may be a better fit.</p><p>Understanding the needs of your team, your infrastructure, and your security model is key. Every tool has its place. The journey is about choosing wisely.</p><h3>🧙‍♂️ The Transformation: Secrets as Code, Mindset as Discipline</h3><p>As you integrate SOPS into your daily work, something shifts.</p><ul><li>You stop fearing secrets.</li><li>You start respecting them.</li><li>You no longer hide sensitive data in Slack threads or stash it in Notion pages. Instead, you treat them like any other artifact of modern infrastructure: <strong>as code</strong>.</li><li>You review secrets via pull requests.</li><li>You teach others how to walk the same path.</li><li>The developer becomes the defender.</li></ul><h3>🏔 The Return: What SOPS Leaves You With</h3><p>Every journey changes the hero. You return — not to where you started, but to a <strong>wiser version of your workflow</strong>.</p><p>Your CI/CD pipeline runs smoother.</p><p>Your Kubernetes secrets are Git-native and safe.</p><p>Your infrastructure code reflects the discipline of secure design.</p><p>And most importantly, your team isn’t just moving fast — it’s <strong>moving fast with confidence</strong>.</p><h3>🏁 Rise of the GitOps Guardian: Encrypt, Commit, Defend</h3><p>You’ve seen the risks. You’ve met the tool. You’ve followed the path.</p><p>Now, the choice is yours.</p><p>You can keep battling secrets with patchwork fixes and hidden .env files… or you can take the next step in your evolution as a developer: <strong>treat secrets as code</strong>.</p><p>Whether you’re building on Kubernetes, deploying with Terraform, or automating through CI/CD, this is your moment to lead — to introduce practices that scale, empower your team, and protect your stack.</p><p><strong>Encrypt locally. Commit securely. Ship with confidence.<br></strong>Your journey with secrets doesn’t end here. It begins.</p><h3>🧾 Conclusion: The Secrets You Now Hold</h3><p>You began this journey facing a common challenge — the quiet risk of exposed secrets in your codebase. Along the way, you discovered that managing secrets doesn’t have to mean sacrificing version control, speed, or sanity.</p><p>Now you have the power to move fast <em>and</em> stay secure — no platform lock-in, no complicated setups, just smart encryption that fits into your workflow. Whether deploying to Kubernetes, securing Terraform, or refining CI/CD pipelines, SOPS enables you to stay in control.</p><p>You’ve returned from the journey with the knowledge — and the tools — to do things better. And the best part? You’re just getting started.</p><p>If you enjoyed this piece and want more practical deep dives on GitOps, DevSecOps, and modern developer workflows, follow us on <a href="https://medium.com/globant">Medium</a>. We write regularly about the tools, patterns, and philosophies that help devs move fast <em>without breaking things</em>.</p><h3>📚 References &amp; Further Reading</h3><p>If this got you curious, here are some great links to keep exploring SOPS and friends:</p><ul><li>🔗<a href="https://github.com/mozilla/sops"> Mozilla SOPS — GitHub Repository<br></a> <em>Official source code and documentation.</em></li><li>📘<a href="https://github.com/mozilla/sops#usage"> SOPS Documentation<br></a> <em>Usage examples, supported file types, and configuration options.</em></li><li>🛡️<a href="https://github.com/isindir/sops-secrets-operator"> SOPS Secrets Operator<br></a> <em>Kubernetes operator to manage secrets using SOPS.</em></li><li>🔧<a href="https://github.com/viaduct-ai/kustomize-sops"> Kustomize SOPS Plugin<br></a> <em>Integrates SOPS into Kubernetes manifests using Kustomize.</em></li><li>🧠 <a href="https://12factor.net/config">The Twelve-Factor App: Store config in the environment<br></a> <em>Philosophy behind separating secrets/config from code — old but still relevant.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bb2c378a27c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/globant/secrets-as-code-a-developers-journey-from-exposure-to-encryption-4bb2c378a27c">Secrets as Code: A Developer’s Journey from Exposure to Encryption</a> was originally published in <a href="https://medium.com/globant">Globant</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the C4 Model]]></title>
            <link>https://medium.com/globant/understanding-the-c4-model-64dceb60fe73?source=rss-93272cd3a923------2</link>
            <guid isPermaLink="false">https://medium.com/p/64dceb60fe73</guid>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[architecture-diagram]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[c4-model]]></category>
            <category><![CDATA[cloudops]]></category>
            <dc:creator><![CDATA[Miguel Hernández Giusti]]></dc:creator>
            <pubDate>Thu, 30 May 2024 06:02:23 GMT</pubDate>
            <atom:updated>2024-05-30T06:02:23.935Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Guide to Simplifying Software Architecture Diagrams</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WuYnQkAs2vdLTH9T" /><figcaption>Image from <a href="https://unsplash.com/photos/person-using-black-laptop-computer-lVWozBOVY2M">Unsplash</a></figcaption></figure><p>In the realm of software development, effectively communicating architecture is crucial for the successful delivery of complex systems. However, traditional architecture diagrams often need to catch up, plagued by common problems that hinder their utility. They can be overly complex, focusing on minutiae that obscure the system’s essence, or overly simplistic, omitting critical details. They might cater to a specific audience, such as developers or managers, leaving others in the dark. Moreover, these diagrams frequently lack standardization, leading to inconsistencies in interpretation and understanding across teams and stakeholders.</p><p>Enter the <a href="https://c4model.com/">C4 mode</a>l, devised by software architect Simon Brown, to remedy these pervasive issues. The <a href="https://c4model.com/">C4 model</a> stands not for a specific technology or tool but for four types of diagrams that provide a multi-level, standardized approach to describing software architectures. Each level addresses the needs of a different audience and offers a progressively detailed view of the system, from the highest level of abstraction to the most granular details. This approach aims to make architecture understandable for all stakeholders, from non-technical personnel to hands-on developers, fostering better communication and collaboration.</p><h3>Main Goals of C4 Diagrams</h3><p>The <a href="https://c4model.com/">C4 model</a> was designed with specific goals, aiming to address the shortcomings of traditional architectural diagrams. Its objectives are:</p><ul><li><strong>Standardization:</strong> By defining a consistent level of detail at each of its four levels, the <a href="https://c4model.com/">C4 model</a> standardizes the representation of software architectures, making diagrams easier to understand and compare.</li><li><strong>Communication:</strong> It bridges the gap between technical and non-technical stakeholders, ensuring that everyone involved has a clear understanding of the system architecture.</li><li><strong>Simplicity and Detail Balance:</strong> The model balances simplicity and detail by segregating architectural views across different diagrams. This ensures that viewers are not overwhelmed with information irrelevant to their needs.</li><li><strong>Scalability:</strong> It accommodates systems of varying sizes and complexities, from small microservices to large, enterprise-level applications.</li></ul><h3>C4 Diagram Levels</h3><p>The <a href="https://c4model.com/">C4 model</a> is structured into four distinct levels, each providing a view of the system at a different level of abstraction:</p><h4><strong>System Context Diagram (Level 1)</strong></h4><p>The System Context Diagram is the highest-level view, focusing on the system as a whole and its interactions with users and other systems. This diagram aims to provide a clear understanding of how the system fits within the larger ecosystem. It’s crucial for gaining an overview without delving into the complexities of the system’s internals. Below is an example illustrating how to represent a hypothetical online banking system’s software architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Gaix94bCZf_cicZc" /><figcaption>System Context Diagram — Image from <a href="https://c4model.com/#SystemContextDiagram">c4model.com</a></figcaption></figure><p><strong>Diagram Description</strong></p><p>Let&#39;s now review the different system components:</p><ul><li><strong>System</strong>: Online Banking System.</li><li><strong>Primary Users</strong>: Personal Banking Customer.</li><li><strong>External Systems</strong>: Mainframe Banking System, E-mail System.</li><li><strong>Interactions</strong>: Customers interact with the system to view account balances and make payments. The system interacts with the Mainframe Banking System to get account information and make payments. The system interacts with the E-mail System to send emails.</li></ul><p><strong>Example Elements</strong>:</p><ul><li>A large box representing the entire Online Banking System.</li><li>External user icons or actors for Personal Banking Customers.</li><li>Boxes for external systems: Mainframe Banking System and E-mail System.</li><li>Arrows show the flow of information between the users and the system and from the system to the external systems.</li></ul><h4><strong>Container Diagram (Level 2)</strong></h4><p>Drilling down, the Container Diagram offers a closer look at the system’s internals, breaking it down into containers (applications, data stores, microservices, etc.). This diagram illuminates how these containers interact and the technologies employed. It’s particularly useful for developers and technical architects to understand the system’s high-level structure and technology choices. Continuing with the online banking system’s software architecture example, this is the level 2 diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hvs_fKgUEQCnuUoW" /><figcaption>Container Diagram — Image from <a href="https://c4model.com/#ContainerDiagram">c4model.com</a></figcaption></figure><p><strong>Diagram Description</strong>:</p><p>Let&#39;s now review the different container components:</p><ul><li><strong>System</strong>: Online Banking System</li><li><strong>Containers</strong>:</li><li>Web Application (serves as a user interface for customers).</li><li>Single Page Application (alternative access for browsing and making transactions by customers).</li></ul><p>Mobile App (used by customers for browsing and making transactions).</p><ul><li>Database (stores user registration information, customer data, credentials, access logs, etc.).</li><li>API Server (handles logic and data processing between front-end and database).</li></ul><p><strong>Example Elements</strong>:</p><ul><li>Boxes within the Online Retail System represent each container.</li><li>Arrows show how each container communicates with others (e.g., a Web Application communicates with an API Application, which interacts with the Database).</li><li>External systems remain in the diagram and are connected appropriately (e.g., API Application connects to Mainframe Banking System).</li></ul><h4><strong>Component Diagram (Level 3)</strong></h4><p>The Component Diagram provides a more detailed view, focusing on a specific container and decomposing it into its constituent components. This diagram details the responsibilities of each component and their interactions, offering insights into the system’s design and internal workings. It is essential for developers working within a particular container, enabling them to grasp the architecture and dependencies of the components they’re dealing with. The following diagram is an example based on the online banking system’s architecture for the level 3 diagram focused on the API Application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fXQtZSzOjBlBpw_B" /><figcaption>Component Diagram — Image from <a href="https://c4model.com/#ComponentDiagram">c4model.com</a></figcaption></figure><p><strong>Diagram Description</strong>:</p><p>Let&#39;s now review the different components:</p><p><strong>Container</strong>: API Application.</p><p><strong>Components:</strong></p><ul><li>Sign In Controller (manages user authentication and security).</li><li>Reset Password Controller (handles order creation, updates, and status tracking).</li><li>Accounts Summary Controller (integrates with external Mainframe Banking System).</li></ul><p><strong>Example Elements</strong>:</p><ul><li>The API Application container is broken down into smaller components.</li><li>Each component is represented as a box within the API Application.</li><li>Arrows illustrate interactions between components (e.g., the Order Email Component sends data to an external Email System after a transaction is posted).</li></ul><h4><strong>Code Diagram (Level 4)</strong></h4><p>The most detailed level, the Code Diagram, zooms in on the components, showing how they are implemented in code through classes or interfaces. This diagram is closest to the actual codebase, providing a bridge between the architectural view and the code itself. It’s particularly useful for developers when they need to understand how a component’s behavior is realized in the code. The last diagram is focused on the Mainframe Banking System Facade:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ytpDoK7O7nlwbLsO" /><figcaption>Code Diagram — Image from <a href="https://c4model.com/#CodeDiagram">c4model.com</a></figcaption></figure><p><strong>Diagram Description:</strong></p><p>Let&#39;s now review the different code components:</p><ul><li><strong>Component</strong>: Authentication Module.</li><li><strong>Classes</strong>:</li><li>MainframeBankingSystemFacadeImpl (manages the connection with the Mainframe Banking System).</li><li>GetBalanceRequest (request the updated balance).</li></ul><p><strong>Example Elements:</strong></p><ul><li>Detailed class diagrams showing the relationships and dependencies between classes.</li><li>Arrows indicating method calls and data flows between classes (e.g., MainframeBankingSystemFacadeImpl uses GetBalanceRequest to request the updated balance).</li></ul><p>Each level of the <a href="https://c4model.com/">C4 model</a> offers a progressively deeper and more detailed view of the software system architecture, facilitating understanding and communication among different stakeholders involved in the development process. The C4 model’s multi-level approach is ingeniously designed to peel back the layers of a software system’s architecture incrementally, providing a series of diagrams that range from very broad overviews to deeply detailed views. This progression is not merely about adding more technical details but rather about adapting the information to suit different audiences and their needs within a project.</p><h3>Conclusion</h3><p>The <a href="https://c4model.com/">C4 model</a> presents a revolutionary approach to documenting and communicating software architecture. By offering a structured framework that covers different levels of detail, it addresses the common problems associated with traditional architecture diagrams. The model promotes clarity, standardization, and inclusivity, ensuring that all stakeholders, regardless of their technical background, can have a coherent understanding of the system’s architecture.</p><p>Moreover, the C4 model’s scalability means it can be applied to a wide range of projects, from small-scale applications to complex enterprise systems. By facilitating better communication among team members and between technical and non-technical stakeholders, the <a href="https://c4model.com/">C4 model</a> not only aids in the design and development process but also maintenance and troubleshooting activities.</p><p>In conclusion, the <a href="https://c4model.com/">C4 model</a> stands out as an essential tool in the arsenal of modern software development, promoting a better understanding of software architectures through clear, standardized, and scalable diagrams. Whether you’re a developer, architect, or manager, embracing the <a href="https://c4model.com/">C4 model</a> can lead to more effective communication, collaboration, and ultimately, the successful delivery of software projects.</p><h3>References</h3><ul><li><a href="https://c4model.com/"><strong>Simon Brown’s Official C4 Model Website</strong></a><strong>:</strong> The primary source for all things related to the C4 model, including detailed explanations, examples, and resources for further reading.</li><li><a href="https://leanpub.com/software-architecture-for-developers"><strong>“Software Architecture for Developers”</strong></a> by Simon Brown: A book by the creator of the C4 model, offering insights into effective software architecture, including the rationale behind the C4 model and how to apply it.</li><li><a href="https://www.youtube.com/watch?v=x2-rSnhpw0g"><strong>“Visualizing software architecture with the C4 model”</strong></a> — Simon Brown’s Talk at GOTO Conferences: A comprehensive presentation by Simon Brown explaining the C4 model, its goals, and how it can be effectively used in projects.</li><li><a href="https://www.infoq.com/articles/C4-architecture-model/"><strong>“The Art of Visualising Software Architecture”</strong></a> by Simon Brown on InfoQ: An article that explores the importance of visualizing software architecture and introduces the C4 model as a solution to common visualization challenges.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64dceb60fe73" width="1" height="1" alt=""><hr><p><a href="https://medium.com/globant/understanding-the-c4-model-64dceb60fe73">Understanding the C4 Model</a> was originally published in <a href="https://medium.com/globant">Globant</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Todo sobre los patrones de diseño «serverless» de AWS]]></title>
            <link>https://medium.com/@mhernandezve/todo-sobre-los-patrones-de-dise%C3%B1o-serverless-de-aws-a250223fd741?source=rss-93272cd3a923------2</link>
            <guid isPermaLink="false">https://medium.com/p/a250223fd741</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[cdk]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[patrones-diseño]]></category>
            <dc:creator><![CDATA[Miguel Hernández Giusti]]></dc:creator>
            <pubDate>Sat, 19 Aug 2023 12:55:19 GMT</pubDate>
            <atom:updated>2025-01-22T13:55:21.446Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M0wW8MXd0ffk7f-0" /><figcaption>Imagen tomada de <a href="https://unsplash.com/photos/FvpVY7TpwNY">Unsplash</a><a href="https://unsplash.com/"></a></figcaption></figure><p><em>Éste </em><a href="https://medium.com/globant/all-about-aws-serverless-design-patterns-885106882e5f"><em>artículo</em></a><em> fue originalmente publicado en Inglés para el blog de </em><a href="https://www.globant.com/"><em>Globant</em></a><em>.</em></p><p>El diseño de software y la arquitectura juegan roles cruciales en el éxito de cualquier aplicación o sistema. Definen la estructura, el comportamiento y la organización del código, asegurando que la solución sea escalable, mantenible y eficiente. Uno de los aspectos críticos del diseño de software es el uso de patrones de diseño de software, que son soluciones probadas y reutilizables a los problemas de diseño comunes. Los patrones proporcionan un enfoque estructurado para construir software, lo que permite a los desarrolladores aprovechar las mejores prácticas y las técnicas estándar de la industria.</p><p>En este artículo, revisaremos el <a href="https://aws.amazon.com/cdk/">Kit de Desarrollo de la Nube de AWS</a> (CDK) y como puede ayudarnos a implementar dichos patrones de desarrollo de software. AWS CDK es una poderosa herramienta que simplifica el diseño, el desarrollo y la implementación de la infraestructura en la nube. Analizaremos algunos patrones de software que se usan comúnmente cuando se usa AWS CDK.</p><h3>Ventajas de CDK</h3><p>AWS CDK permite a los desarrolladores utilizar lenguajes de programación de propósito general como Python, JavaScript u otros lenguajes de uso general para crear aplicaciones de Infraestructura como código (IaC). La implementación de AWS CDK proporciona una abstracción de mayor nivel y genera plantillas de <a href="https://aws.amazon.com/cloudformation/">CloudFormation</a> sin procesar, lo que permite a los desarrolladores implementar sus requisitos de infraestructura utilizando conceptos de programación orientados a objetos.</p><h3>Ventajas de los patrones en el diseño y arquitectura de software</h3><p>Los patrones ofrecen varias ventajas cuando se trata de diseño y arquitectura de software. En primer lugar, los patrones brindan soluciones comprobadas a problemas recurrentes. Encapsulan el conocimiento colectivo y la experiencia de la comunidad de desarrollo de software, asegurando que los desarrolladores no tengan que reinventar la rueda para cada proyecto. Mediante el uso de patrones, los desarrolladores pueden beneficiarse de soluciones probadas en batalla que se han perfeccionado y optimizado con el tiempo. En segundo lugar, los patrones promueven la consistencia y la estandarización. Establecen un lenguaje común y un conjunto de convenciones, lo que facilita que los desarrolladores colaboren y comprendan el código de los demás. Los patrones proporcionan un lenguaje común que permite a los desarrolladores comunicarse de forma eficaz y eficiente. Además, los patrones aseguran que el diseño y la arquitectura de una aplicación sean consistentes y coherentes, convirtiéndose en un sistema más mantenible y escalable.</p><h3>Patrones populares de CDK</h3><p>Los siguientes son patrones populares y bien conocidos:</p><h4>El patrón lambda EFS</h4><p>El patrón lambda de EFS es un enfoque práctico para escenarios en los que debe compartir datos en varias invocaciones de una función lambda. Utiliza <a href="https://aws.amazon.com/es/efs/">Amazon Elastic File System (EFS)</a> para proporcionar un sistema de archivos compartido al que pueden acceder muchas instancias de la función lambda. Este patrón le permite almacenar y recuperar datos entre invocaciones de funciones, lo que permite un procesamiento con estado dentro de arquitecturas «serverless». Al aprovechar CDK, puede definir e implementar fácilmente los componentes de infraestructura necesarios, incluido el sistema de archivos EFS, la función lambda y sus respectivos permisos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6ka3mDiSxPO-Id0x" /><figcaption>El patrón EFS lambda— Imagen tomada de <a href="https://github.com/cdk-patterns/serverless/blob/main/the-efs-lambda/img/overview.png">cdk-patterns</a></figcaption></figure><p><strong>Los usos comunes del patrón lambda de EFS son:</strong></p><ol><li><strong>Persistencia y uso compartido de datos:</strong> el patrón lambda de EFS es útil en escenarios en los que debe compartir datos en varias invocaciones de una función lambda. Puede almacenar y recuperar datos entre invocaciones de funciones utilizando EFS como sistema de archivos compartidos. El patrón lambda de EFS es particularmente beneficioso cuando tiene requisitos de procesamiento con estado para mantener los datos en varias ejecuciones de funciones. Por ejemplo, en una aplicación de trans-codificación de video, puede usar EFS para almacenar archivos de video intermedios procesados por múltiples funciones lambda.</li><li><strong>Sistemas de gestión de contenido:</strong> los sistemas de gestión de contenido (CMS) a menudo requieren almacenar y recuperar archivos multimedia, como imágenes, videos o documentos. El patrón lambda de EFS se puede emplear para administrar el almacenamiento y la recuperación de estos archivos en las invocaciones de la función lambda. Al almacenar los archivos en un sistema de archivos EFS, puede asegurarse de que múltiples funciones puedan acceder al contenido, lo que permite un procesamiento y una manipulación eficientes. Este patrón permite una integración perfecta entre las funciones lambda responsables de la gestión de contenido y otras partes de la pila de aplicaciones.</li><li><strong>Análisis y procesamiento de datos en tiempo real:</strong> el patrón lambda de EFS puede beneficiar a las aplicaciones que requieren análisis o procesamiento de datos en tiempo real. Por ejemplo, en un sistema de procesamiento de registros, puede usar EFS para almacenar y compartir archivos de registro entre varias funciones lambda responsables de procesar y analizar los registros. Este patrón le permite mantener un depósito centralizado de registros que numerosas funciones pueden procesar de manera eficiente al mismo tiempo. Proporciona una solución escalable y rentable para escenarios de procesamiento de datos en tiempo real.</li></ol><h4>El patrón de la máquina de estado</h4><p>Los patrones State Machine y Step Functions ayudan a orquestar flujos de trabajo y procesos empresariales complejos. Aprovecha AWS Step Functions, un servicio de flujo de trabajo «serverless», para definir y ejecutar State Machines. Con CDK, puede usar Python para representar máquinas de estado usando una sintaxis expresiva y altamente legible. El CDK abstrae los recursos subyacentes de CloudFormation y los permisos necesarios para Step Functions, lo que facilita la definición y la implementación de máquinas de estado complejas dentro de su aplicación.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SYV1D32RRJ87Qdlj" /><figcaption>El patron State Machine— Imagen tomada de <a href="https://github.com/cdk-patterns/serverless/blob/main/the-state-machine/img/statemachine-arch.png">cdk-patterns</a></figcaption></figure><p>Usos comunes del patrón State Machine:</p><ol><li><strong>Orquestación del flujo de trabajo:</strong> el patrón State Machine ayuda a orquestar flujos de trabajo y procesos comerciales complejos. Le permite definir y administrar el flujo de tareas y actividades dentro de una aplicación. Por ejemplo, en una plataforma de comercio electrónico, puede usar el patrón State Machine para controlar el proceso de cumplimiento de pedidos, que implica varios pasos, como verificación de inventario, procesamiento de pagos y envío. Cada paso puede representar un estado en State Machine y las transiciones entre estados representan la progresión del flujo de trabajo.</li><li><strong>Manejo de errores y lógica de reintento:</strong> el patrón State Machine es excelente para manejar escenarios de error e implementar la lógica de reintento. Con el patrón State Machine, puede definir estados y transiciones que controlan diferentes condiciones de error. Por ejemplo, si un paso falla debido a un error transitorio en una canalización de procesamiento de datos, la máquina de estado se puede configurar para volver a intentar la operación varias veces antes de pasar a un estado de error. Este patrón permite un manejo de errores sólido y garantiza que el flujo de trabajo progrese sin problemas, incluso ante fallas.</li><li><strong>Chatbots e interfaces conversacionales:</strong> el patrón State Machine es muy adecuado para crear chatbots e interfaces conversacionales. Le permite definir los diferentes estados y transiciones en función de las entradas del usuario y las respuestas del sistema. Por ejemplo, en un chatbot de atención al cliente, una State Machine puede capturar el flujo de la conversación, determinar las respuestas apropiadas en función de las consultas de los usuarios y guiar la conversación hacia el resultado deseado. Este patrón proporciona un enfoque estructurado para crear experiencias conversacionales inteligentes e interactivas.</li></ol><h4>El patrón ETL de EventBridge</h4><p>El patrón ETL de EventBridge facilita la extracción, transformación y carga de datos de varias fuentes en un sistema de destino. Aprovecha AWS EventBridge, un servicio de bus de eventos «serverless», para recibir eventos de diferentes fuentes y activar la lógica de procesamiento necesaria. CDK le permite definir las reglas de eventos, las transformaciones de mapeo y los servicios de destino mediante el código de Python. Con el patrón ETL de EventBridge, puede crear canalizaciones de datos escalables y desacopladas que manejen el procesamiento de eventos en tiempo real y las tareas de integración.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OGGT1sXcok3bumYc" /><figcaption>El patrónEventBridge ETL— Imagen tomada de <a href="https://github.com/cdk-patterns/serverless/blob/main/the-eventbridge-etl/img/arch.png">cdk-patterns</a></figcaption></figure><h4>Usos comunes del patrón ETL de EventBridge:</h4><ol><li><strong><em>Integración de datos en tiempo real:</em></strong> el patrón ETL de EventBridge es ideal para escenarios de integración de datos en tiempo real. Le permite capturar eventos de varias fuentes, como bases de datos, API o servicios de transmisión, y transformarlos en un formato adecuado para su sistema de destino. Por ejemplo, puede usar el patrón para capturar y procesar eventos de una plataforma de comercio electrónico, convertirlos a un formato estandarizado y enviarlos a un almacén de datos o servicio de análisis en tiempo real. Este patrón permite una perfecta integración y sincronización de datos entre diferentes sistemas.</li><li><strong><em>Enriquecimiento y aumento de datos:</em></strong> el patrón ETL de EventBridge es valioso para enriquecer y aumentar los datos con información adicional. Al aprovechar el patrón, puede capturar eventos de una o más fuentes, extraer datos relevantes y mejorarlos con información complementaria de servicios o bases de datos externos. Por ejemplo, puede enriquecer los eventos de los clientes con datos demográficos, historial de compras o perfiles de redes sociales en un sistema de gestión de clientes. Este patrón le permite mejorar el valor de sus datos y habilitar experiencias personalizadas o campañas de marketing dirigidas.</li><li><strong><em>Monitoreo de aplicaciones y sistemas:</em></strong> el patrón ETL de EventBridge es adecuado para casos de uso de monitoreo de aplicaciones y sistemas. Puede capturar eventos de varias fuentes de monitoreo, como archivos de registro, métricas de rendimiento o notificaciones de error, y realizar análisis en tiempo real o desencadenar acciones apropiadas. Por ejemplo, puede usar el patrón para capturar y procesar registros de múltiples microservicios, identificar patrones de error o anomalías y generar alertas o iniciar procesos de corrección automatizados. Este patrón le permite construir un sistema de monitoreo robusto y proactivo.</li></ol><h3>Conclusiones</h3><p>Conclusiones Los patrones de diseño de software y el kit de desarrollo en la nube (CDK) de AWS son herramientas poderosas para crear arquitecturas «serverless» escalables y mantenibles. Al aprovechar los patrones, los desarrolladores pueden beneficiarse de soluciones comprobadas para problemas de diseño comunes, lo que garantiza la consistencia y la estandarización del proyecto. CDK mejora aún más la experiencia de desarrollo al permitir que los desarrolladores expresen la infraestructura como código utilizando lenguajes de programación familiares como Python. Con CDK, los patrones como EFS lambda, State Machine y EventBridge ETL se pueden implementar fácilmente, lo que permite a los desarrolladores crear aplicaciones «serverless» altamente escalables, resistentes y rentables que pueden escalar para satisfacer las demandas de los entornos informáticos en la nube modernos.</p><p>Al aprovechar AWS CDK y los poderosos patrones mencionados anteriormente, los desarrolladores pueden desbloquear todo el potencial de las arquitecturas sin «serverless» en AWS. Estos patrones brindan soluciones comprobadas a los desafíos de diseño comunes, lo que permite a los desarrolladores crear aplicaciones escalables, resistentes y rentables. Con la flexibilidad y expresividad de CDK, es más fácil implementar estos patrones usando Python y definir la infraestructura necesaria como código. Ya sea que comparta datos con el patrón lambda de EFS, organice flujos de trabajo complejos con el patrón State Machine o integre y transforme eventos con el patrón ETL de EventBridge, CDK permite a los desarrolladores diseñar sistemas «serverless» robustos y eficientes. Al aprovechar las capacidades de AWS CDK y estos patrones, los desarrolladores pueden acelerar su proceso de desarrollo, reducir los gastos generales operativos y centrarse en brindar valor a sus usuarios. Entonces, aproveche el poder de los patrones «serverless» de AWS y deje volar su imaginación mientras crea aplicaciones «serverless» innovadoras y escalables en la nube.</p><h3>Referencias</h3><ul><li><a href="https://cdkpatterns.com/">CDK Patterns</a>.</li><li><a href="https://github.com/cdk-patterns/serverless">Serverless CDK Patterns</a>.</li><li><a href="https://www.codehance.com/blog/aws-cdk-vs-aws-sdk/">AWS SDK</a>.</li><li><a href="https://methodpoet.com/behavioral-design-patterns/">11 Beautiful Behavioral Design Patterns in C#.</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a250223fd741" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All about AWS Serverless Design Patterns]]></title>
            <link>https://medium.com/globant/all-about-aws-serverless-design-patterns-885106882e5f?source=rss-93272cd3a923------2</link>
            <guid isPermaLink="false">https://medium.com/p/885106882e5f</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloudops]]></category>
            <category><![CDATA[aws-cdk]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <dc:creator><![CDATA[Miguel Hernández Giusti]]></dc:creator>
            <pubDate>Fri, 30 Jun 2023 12:44:07 GMT</pubDate>
            <atom:updated>2023-06-30T15:15:07.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M0wW8MXd0ffk7f-0" /><figcaption>Image from <a href="https://unsplash.com/photos/FvpVY7TpwNY">Unsplash</a></figcaption></figure><p>Software design and architecture play crucial roles in the success of any application or system. They define the code’s structure, behavior, and organization, ensuring the solution will be scalable, maintainable, and efficient. One of the critical aspects of software design is using software design patterns, which are proven and reusable solutions to common design problems. Patterns provide a structured approach to building software, enabling developers to leverage best practices and industry-standard techniques.</p><p>In this article, we will review the <a href="https://aws.amazon.com/cdk/">AWS Cloud Development Kit</a> (CDK) and how it can help us implement such software development patterns. The AWS CDK is a powerful tool that simplifies designing, developing, and deploying cloud infrastructure. We will discuss some software patterns commonly used when using AWS CDK.</p><h3>CDK Advantages</h3><p>The AWS CDK allows developers to use familiar programming languages like Python, JavaScript, or other general-purpose languages to create Infrastructure as Code (IaC) applications. The implementation of AWS CDK provides a higher-level abstraction and generates raw <a href="https://aws.amazon.com/cloudformation/">CloudFormation</a> templates, enabling developers to deploy their infrastructure requirements using object-oriented programming concepts.</p><h3>Advantages of patterns in software design and architecture</h3><p>Patterns offer several advantages when it comes to software design and architecture. Firstly, patterns provide proven solutions to recurring issues. They encapsulate the collective knowledge and experience of the software development community, ensuring developers don’t have to reinvent the wheel for every project. By using patterns, developers can benefit from battle-tested solutions that have been refined and optimized over time.</p><p>Secondly, patterns promote consistency and standardization. They establish a common language and set of conventions, making it easier for developers to collaborate and understand each other’s code. Patterns provide a common language that allows developers to communicate effectively and efficiently. Moreover, patterns ensure that the design and architecture of an application are consistent and coherent, becoming a more maintainable and scalable system.</p><h3>Popular CDK Patterns</h3><p>The following are popular, well-known patterns.</p><h4>The EFS lambda pattern</h4><p>The <em>EFS lambda pattern</em> is a practical approach for scenarios where you must share data across multiple invocations of a lambda function. It uses <a href="https://aws.amazon.com/efs/">Amazon Elastic File System</a> (EFS) to provide a shared file system that many instances of the lambda function can access. This pattern lets you store and retrieve data between function invocations, allowing for stateful processing within serverless architectures. By leveraging the CDK, you can easily define and deploy the necessary infrastructure components, including the EFS file system, lambda function, and their respective permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6ka3mDiSxPO-Id0x" /><figcaption>The EFS lambda pattern — Image from <a href="https://github.com/cdk-patterns/serverless/blob/main/the-efs-lambda/img/overview.png">cdk-patterns</a></figcaption></figure><p>Common uses for the EFS lambda pattern are:</p><ol><li><em>Data Sharing and Persistence:</em> The EFS lambda pattern is helpful in scenarios where you must share data across multiple invocations of a lambda function. You can store and retrieve data between function invocations using EFS as the shared file system. The EFS lambda pattern is particularly beneficial when you have stateful processing requirements to maintain data across multiple function executions. For example, in a video transcoding application, you can use EFS to store intermediate video files processed by multiple lambda functions.</li><li><em>Content Management Systems:</em> Content Management Systems (CMS) often require storing and retrieving media files, such as images, videos, or documents. The EFS lambda pattern can be employed to manage the storage and retrieval of these files across lambda function invocations. By storing the files in an EFS file system, you can ensure that the content is accessible to multiple functions, allowing for efficient processing and manipulation. This pattern enables seamless integration between lambda functions responsible for content management and other parts of the application stack.</li><li><em>Real-time Analytics and Data Processing:</em> EFS lambda pattern can benefit applications that require real-time analytics or data processing. For example, in a log processing system, you can use EFS to store and share log files across multiple lambda functions responsible for processing and analyzing the logs. This pattern allows you to maintain a centralized repository of logs that can be processed efficiently by numerous functions concurrently. It provides a scalable and cost-effective solution for real-time data processing scenarios.</li></ol><h4>The State Machine pattern</h4><p>The <em>State Machine</em> and <em>Step Functions</em> patterns help orchestrate complex workflows and business processes. It leverages <a href="https://aws.amazon.com/step-functions/">AWS Step Functions</a>, a serverless workflow service, to define and execute State Machines. With CDK, you can use Python to represent State Machines using a highly readable and expressive syntax. The CDK constructs abstract away the underlying CloudFormation resources and permissions required for Step Functions, making it easier to define and deploy complex State Machines within your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SYV1D32RRJ87Qdlj" /><figcaption>The State Machine pattern — Image from <a href="https://github.com/cdk-patterns/serverless/blob/main/the-state-machine/img/statemachine-arch.png">cdk-patterns</a></figcaption></figure><p>Common uses for the State Machine pattern:</p><ol><li><em>Workflow Orchestration:</em><strong> </strong>The State Machine pattern helps orchestrate complex workflows and business processes. It enables you to define and manage the flow of tasks and activities within an application. For example, in an e-commerce platform, you can use the State Machine pattern to control the order fulfillment process, which involves multiple steps such as inventory check, payment processing, and shipping. Each step can represent a state in the State Machine, and the transitions between states represent the progression of the workflow.</li><li><em>Error Handling and Retry Logic:</em> The State Machine pattern is excellent for handling error scenarios and implementing retry logic. Using the State Machine pattern, you can define states and transitions that control different error conditions. For instance, if a step fails due to a transient error in a data processing pipeline, the State Machine can be configured to retry the operation several times before moving to an error state. This pattern enables robust error handling and ensures the workflow progresses smoothly, even in the face of failures.</li><li><em>Chatbots and Conversational Interfaces:</em> The State Machine pattern is well-suited for building chatbots and conversational interfaces. It lets you define the different states and transitions based on user inputs and system responses. For instance, in a customer support chatbot, a State Machine can capture the conversation flow, determine the appropriate responses based on user queries, and guide the conversation toward the desired outcome. This pattern provides a structured approach to building intelligent and interactive conversational experiences.</li></ol><h4>The EventBridge ETL pattern</h4><p>The <em>EventBridge ETL pattern</em> facilitates the extraction, transformation, and loading of data from various sources into a target system. It leverages <a href="https://aws.amazon.com/eventbridge/">AWS EventBridge</a>, a serverless event bus service, to receive events from different sources and trigger the necessary processing logic. CDK enables you to define the event rules, mapping transformations, and target services using Python code. Using the EventBridge ETL pattern, you can build scalable and decoupled data pipelines that handle real-time event processing and integration tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OGGT1sXcok3bumYc" /><figcaption>The EventBridge ETL pattern — Image from <a href="https://github.com/cdk-patterns/serverless/blob/main/the-eventbridge-etl/img/arch.png">cdk-patterns</a></figcaption></figure><p>Common uses for the EventBridge ETL Pattern:</p><ol><li><em>Real-time Data Integration:</em> The EventBridge ETL pattern is ideal for real-time data integration scenarios. It enables you to capture events from various sources, such as databases, APIs, or streaming services, and transform them into a format suitable for your target system. For instance, you can use the pattern to capture and process events from an e-commerce platform, convert them into a standardized format, and deliver them to a data warehouse or analytics service in real-time. This pattern allows for seamless data integration and synchronization between different systems.</li><li><em>Data Enrichment and Augmentation:</em> The EventBridge ETL pattern is valuable for enriching and augmenting data with additional information. By leveraging the pattern, you can capture events from one or more sources, extract relevant data, and enhance it with supplementary information from external services or databases. For example, you can enrich customer events with demographic data, purchase history, or social media profiles in a customer management system. This pattern empowers you to enhance the value of your data and enable personalized experiences or targeted marketing campaigns.</li><li><em>System and Application Monitoring:</em> The EventBridge ETL pattern is well-suited for system and application monitoring use cases. You can capture events from various monitoring sources, such as log files, performance metrics, or error notifications, and perform real-time analysis or trigger appropriate actions. For example, you can use the pattern to capture and process logs from multiple microservices, identify error patterns or anomalies, and generate alerts or initiate automated remediation processes. This pattern enables you to build a robust and proactive monitoring system.</li></ol><h3>Conclusions</h3><p>Software design patterns and the AWS Cloud Development Kit (CDK) are powerful tools for building scalable and maintainable serverless architectures. By leveraging patterns, developers can benefit from proven solutions to common design problems, ensuring project consistency and standardization. CDK further enhances the development experience by allowing developers to express Infrastructure as Code using familiar programming languages like Python. With CDK, patterns like the EFS lambda, State Machine, and EventBridge ETL can be implemented easily, enabling developers to build highly scalable, resilient, and cost-efficient serverless applications that can scale to meet the demands of modern cloud computing environments.</p><p>By leveraging AWS CDK and the powerful patterns discussed above, developers can unlock the full potential of serverless architectures in AWS. These patterns provide proven solutions to common design challenges, enabling developers to build scalable, resilient, and cost-effective applications. With the flexibility and expressiveness of CDK, it becomes easier to implement these patterns using Python and define the necessary infrastructure as code. Whether sharing data with the EFS lambda pattern, orchestrating complex workflows with the State Machine pattern, or integrating and transforming events with the EventBridge ETL pattern, CDK empowers developers to architect robust and efficient serverless systems. By harnessing the capabilities of AWS CDK and these patterns, developers can accelerate their development process, reduce operational overhead, and focus on delivering value to their users. So, embrace the power of AWS Serverless Patterns and let your imagination soar as you build innovative and scalable serverless applications in the cloud.</p><h3>References</h3><ul><li><a href="https://cdkpatterns.com/">CDK Patterns</a>.</li><li><a href="https://github.com/cdk-patterns/serverless">Serverless CDK Patterns</a>.</li><li><a href="https://www.codehance.com/blog/aws-cdk-vs-aws-sdk/">AWS SDK</a>.</li><li><a href="https://methodpoet.com/behavioral-design-patterns/">11 Beautiful Behavioral Design Patterns in C#.</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=885106882e5f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/globant/all-about-aws-serverless-design-patterns-885106882e5f">All about AWS Serverless Design Patterns</a> was originally published in <a href="https://medium.com/globant">Globant</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>