<?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 Mahdi Azarboon on Medium]]></title>
        <description><![CDATA[Stories by Mahdi Azarboon on Medium]]></description>
        <link>https://medium.com/@azarboon?source=rss-3bb89b17d900------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0wk2wvyaqio8hPYEykKtzw.jpeg</url>
            <title>Stories by Mahdi Azarboon on Medium</title>
            <link>https://medium.com/@azarboon?source=rss-3bb89b17d900------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:21:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@azarboon/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[AWS’s Conflicting Guidance on Agentic AI Observability: Layers vs. Phases]]></title>
            <link>https://towardsaws.com/awss-conflicting-guidance-on-agentic-ai-observability-layers-vs-phases-f7023bd19416?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7023bd19416</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 15:24:23 GMT</pubDate>
            <atom:updated>2026-08-03T15:24:23.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dObDjbP9Ed3N8EtE_VtbnA.png" /><figcaption>Agentic AI &amp; Observability in AWS</figcaption></figure><p>Large language models (LLMs) and Agentic AI systems are inherently non-deterministic. The same input can produce different outputs depending on the model, prompt, context, or tool interactions. That makes observability much more important than it is in many traditional systems. While reading AWS’s official guidance on building agentic AI systems, I noticed something surprising. AWS’s two most detailed guidance documents recommend contradicting approaches for observing agentic AI systems, yet neither explains how those approaches relate to each other. Even more confusing, the newer guidance repeatedly recommends observing agentic AI systems per “phase” without ever defining the term.</p><p>We are already three years into the Agentic AI era, yet AWS’s guidance for serverless AI systems is still immature. This post looks at those inconsistencies, and I hope these gaps get clarified in future revisions; otherwise, it is harder for engineers to build reliable serverless AI systems.</p><p>The two documents discussed here are:</p><ol><li><a href="https://docs.aws.amazon.com/prescriptive-guidance/latest/agentic-ai-serverless/introduction.html">“Building Serverless Architectures for Agentic AI on AWS”</a></li><li><a href="https://docs.aws.amazon.com/wellarchitected/latest/agentic-ai-lens/agentic-ai-lens.html">“AWS Well-Architected Agentic AI Lens”</a>. Published two months ago, it was expected to be AWS’s most comprehensive and authoritative guidance on building agentic AI systems. However, as I’ll show below, it falls short of expectations.</li></ol><p>The first recommends observability per layer. The second recommends observability per phase. Unfortunately, the relationship between those two concepts is never explained. But this is not the whole story.</p><h3>Per Layer Observability</h3><p>The serverless guidance recommends dividing an agentic AI system into five architectural layers and explicitly defines what a layer means.</p><p>These layers are intentionally coarse-grained abstractions, such as the API layer, inference layer, and storage layer. AWS describes these layers as loosely coupled, event-driven services that can evolve and scale independently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/0*Sb5MIGcBMZwWn9bI.png" /><figcaption>Serverless guidance recommends dividing AI applications (right) into five coarse-grained architectural layers and observing metrics for each layer.</figcaption></figure><p>From an observability perspective, the recommendation is straightforward. The document explicitly recommends collecting metrics for each architectural layer, stating:</p><blockquote><a href="https://docs.aws.amazon.com/prescriptive-guidance/latest/agentic-ai-serverless/observability-and-monitoring.html">“Emit custom metrics per layer to help trace model-related errors compared to infrastructure issues.”</a></blockquote><p>This is a familiar architectural approach. Measuring metrics at these coarse-grained layers can help with troubleshooting without overcomplicating instrumentation.</p><h3><strong>Per-Phase Observability</strong></h3><p>The recently published Agentic AI Lens takes a different approach. It repeatedly recommends measuring metrics, including latency, per phase. However, the document never defines what it means by “phase,” nor is the term included in the AWS glossary.</p><p>In chapter AGENTPERF01-BP03, the guidance states:</p><blockquote><a href="https://docs.aws.amazon.com/wellarchitected/latest/agentic-ai-lens/agentperf01-bp03.html">“Without decomposing total latency into per-phase contributions, teams optimize assumed bottlenecks rather than measured ones, and engineering effort lands on work that doesn’t move performance for users.”</a></blockquote><p>Later in the same section, AWS again recommends identifying the phases that make up an end-to-end execution. Before looking at that recommendation, it is worth noting how the document describes a span. According to the guidance,</p><blockquote><a href="https://docs.aws.amazon.com/wellarchitected/latest/agentic-ai-lens/agentperf01-bp02.html">“Spans represent discrete operations inside a trace, a reasoning iteration, an LLM call, a tool invocation, a memory lookup, a retrieval query, or an inter-agent handoff.”</a></blockquote><p>Then, the AGENTPERF01-BP03 guidance suggests the following:</p><blockquote><a href="https://docs.aws.amazon.com/wellarchitected/latest/agentic-ai-lens/agentperf01-bp03.html">“Define the phase taxonomy for the workload: Enumerate the phases that make up end-to-end execution, input processing, context and memory retrieval, LLM inference, tool invocation, output generation or streaming, and inter-agent coordination, and map every span type emitted by the agent to exactly one phase, aligning span attributes with the OpenTelemetry generative AI semantic conventions.”</a></blockquote><p>Reading these sections together, the intended meaning seems fairly clear. <strong>Within the AGENTPERF01-BP03 chapter</strong>, a phase appears to represent a fine-grained execution step, such as context retrieval, model inference, tool invocation, or output generation. In other words, phases are repeatable execution steps that occur during every request. <a href="https://docs.aws.amazon.com/pdfs/wellarchitected/latest/agentic-ai-lens/agentic-ai-lens.pdf">However, “phase” appears to have different meanings throughout the same document. Mind you, the term appears approximately 127 times. </a>For example:</p><blockquote>Failure testing is treated as a phase rather than a living practice…</blockquote><p>Another example is:</p><blockquote>Vulnerability scanning is embedded at every phase of the agentic AI development lifecycle, covering design documents, pull requests, and deployed applications.</blockquote><p>A third example is:</p><blockquote>Compute percentile-level profiles for every phase: Calculate p50, p90, and p99 per phase and for end-to-end latency over a rolling window that matches the service level objective interval, and display the percentiles side by side.</blockquote><p>I really doubt AWS is suggesting that we calculate p50, p90, and p99 for every discrete granular operation because that would be overkill. However, without a formal definition, readers are left to infer what “phase” actually means. The authors could have imitated the serverless guidance by defining the term before using it extensively. For a document spanning more than 770 pages and positioned as part of the AWS Well-Architected Framework, that feels like a noticeable omission.</p><h3><strong>Choosing the Right Level of Observability for Agentic AI Systems</strong></h3><p>So far, we understand that the serverless guidance recommends measuring metrics (e.g., latency) per layer, which are coarse-grained. In contrast, the Agentic AI Lens recommends measuring latency per phase, which represents fine-grained execution steps. Neither document addresses the other approach. So, which approach should users take? Unfortunately, AWS doesn’t provide any guidance, but here are my two cents:</p><p><a href="https://a.co/d/0dMPQgGK">The First Law of Software Architecture</a> states that everything in software architecture is a trade-off. I believe this is no different and both approaches have their own pros, cons, and use cases. I will leave it to the AI experts to shed light on the advantages and disadvantages of each, but here’s how I would approach it:</p><p>Comprehensive observability is extremely important, but unfortunately, resources are often limited. I would start with the higher-level approach by instrumenting and observing the coarse-grained layers of my system. That would give me a comprehensive view, allowing me to diagnose and optimize the system where needed. From there, only if I have sufficient resources or a compelling reason, would I start observing finer-grained, discrete operations. Examples of compelling reasons include a mission-critical application or component, a problematic component, or Service Level Objective (SLO) or business requirements that justify the additional effort.</p><p>If you have expertise or insights on this topic, please share them in the comments.</p><h3>How AWS Could Improve Its Guidance</h3><p>Recommendations for agentic AI systems are scattered and evolving. Therefore, adding agentic AI guidance to the Well-Architected Framework is a good step. However, a few changes would make it much clearer.</p><p>First, formally define the term phase, along with other commonly used terms, to prevent ambiguity, and use these terms consistently throughout the document.</p><p>Second, reconcile the recommendations across the two guidance documents by explaining the strengths, trade-offs, and appropriate use cases of each approach to observing an agentic AI system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7023bd19416" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/awss-conflicting-guidance-on-agentic-ai-observability-layers-vs-phases-f7023bd19416">AWS’s Conflicting Guidance on Agentic AI Observability: Layers vs. Phases</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revisiting Microservices Architectural Characteristic Ratings in “Fundamentals of Software…]]></title>
            <link>https://levelup.gitconnected.com/revisiting-microservices-architectural-characteristic-ratings-in-fundamentals-of-software-5fc06b37ccc0?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fc06b37ccc0</guid>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[book-review]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Wed, 18 Feb 2026 17:46:06 GMT</pubDate>
            <atom:updated>2026-07-26T06:50:09.922Z</atom:updated>
            <content:encoded><![CDATA[<h3>Revisiting Microservices Architectural Characteristic Ratings in “Fundamentals of Software Architecture”</h3><figure><img alt="Cover of the book Fundamentals of Software Architecture by Mark Richards and Neal Ford" src="https://cdn-images-1.medium.com/max/1024/1*OBKptwR3JL6P0o91-gyBQg.jpeg" /><figcaption>Cover of the book Fundamentals of Software Architecture by Mark Richards and Neal Ford</figcaption></figure><p>The book <a href="https://a.co/d/07DUOTaR">Fundamentals of Software Architecture</a> is one of the must-reads for any architect. It is well written, practical, and widely respected, and I personally consider it one of the foundational texts in modern software architecture. Precisely because of that quality and influence, logical flaws in the book should be called out. I discovered a few technical issues while discussing the scalability topic with an acquaintance, citing the book and going down the rabbit hole, and I am honored to share these findings to help others. I shared these issues with the authors, and Mark Richards has already confirmed them.</p><p>The issue concerns how architectural characteristics are defined and rated for microservices. Below is how the book defines them.</p><blockquote>Scalability: Ability for the system to perform and operate as the number of users or requests increases.</blockquote><blockquote>Performance: Includes stress testing, peak analysis, analysis of the frequency of functions used, capacity required, and response times.</blockquote><p>In the book, the authors present star ratings for architectural characteristics of microservices [Figure 1]. One star represents the minimum rating, while five stars represent the maximum.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*qv0NRcaVVjcbrrM47_8PHg.jpeg" /><figcaption>Figure 1. Architectural characteristic ratings for microservices from the book Fundamentals of Software Architecture</figcaption></figure><p>As shown, performance is rated at two stars, just above the minimum, and the authors provide a clear rationale for this assessment. In short, they attribute the low rating to the distributed nature of microservices. As they state:</p><blockquote>Performance is often an issue in microservices — distributed architectures must make many network calls to complete work, which has high performance overhead, and they must invoke security checks to verify identity and access for each endpoint.</blockquote><p>This explanation is reasonable and internally consistent. However, scalability is rated at five stars, the highest possible score, without a comparable explanation. The authors’ justification is limited to the following statement:</p><blockquote>The high points of this architecture are scalability, elasticity, and evolutionary. Some of the most scalable systems yet written have utilized this style to great success.</blockquote><p>This does not explain the rationale behind the rating or why it receives the maximum possible score; it merely restates the authors’ conclusion. These omissions create an unresolved tension in the text. In my correspondence with Mark Richards (included at the end of this post), he admits that such a gap exists and explains that scalability is rated highly because microservices can run multiple instances of each service, while also reiterating that interservice communication overhead will “ALWAYS” impact responsiveness. That explanation is reasonable and should be added to the book, but it still does not justify a maximum scalability rating. If responsiveness is fundamentally constrained, assigning five stars to scalability is logically inconsistent and contradicts the book’s own definitions. A rating of three or four stars would be more logically consistent.</p><p>But it does not end here. Mark Richards has published the <a href="https://www.developertoarchitect.com/downloads/worksheets.html">Architecture Styles Worksheet</a> [Figure 2] on <a href="https://developertoarchitect.com/downloads/worksheets.html">his website</a>, which consolidates and publicly shares the architectural characteristics for all architectural styles described in the book. It is a very useful and practical sheet. For example, when looking at microservices, the ratings match those shown in the book.</p><figure><img alt="Figure 2. Architectural characteristics as presented in the Architecture Styles Worksheet. The author uses responsiveness and performance interchangeably." src="https://cdn-images-1.medium.com/max/1024/1*R8DMKRzl-KT_RLdO2rj0TQ.png" /><figcaption>Figure 2. Architectural characteristics as presented in the Architecture Styles Worksheet. The author uses responsiveness and performance interchangeably.</figcaption></figure><p>However, on closer inspection (marked in red in Figure 2), there is an issue with the naming of the architectural characteristics. Mark uses the term “responsiveness” instead of “performance”. (He actually makes the same error in his email response as well.) This introduces two problems. First, the authors never define “responsiveness” in the book, nor do they list it among their architectural characteristics, despite using the term at least 21 times. Responsiveness is a nuanced concept and therefore requires a clear definition to avoid ambiguity. Second, if we revisit the book’s own definition of “performance”, it is broader than “responsiveness” and includes additional aspects such as “analysis of the frequency of functions used”. As a result, using these two terms interchangeably is incorrect. To address these issues, the authors should explicitly define “responsiveness” and include it in the book’s list of architectural characteristics. Currently, 24 characteristics are defined and listed, and responsiveness is omitted despite being used more than twenty times. They also need to use consistent terminology rather than using “responsiveness” and “performance” interchangeably.</p><p>I shared these issues with Mark Richards. He initially acknowledged the discrepancies and later sent a follow-up email. Below is our email correspondence. If I receive any further response from him, I will add it here. I hope future revisions of the book address these issues, as it is otherwise a genuinely strong and valuable work.</p><h3>Email Correspondence with Mark Richards</h3><p>Mark Richards email sent on 10 February:</p><blockquote>thank you for pointing out these discrepancies. I’m currently traveling and have spotty times to respond.</blockquote><p>Mark Richards follow-up email sent on 16 February:</p><blockquote>Hi Mahdi,</blockquote><blockquote>While scalability and fault tolerance rate high in microservices (as opposed to performance), due to the fine-grained nature of services and the ability to have multiple instances of each service, this tends to mitigate the issues associated with scalability and fault tolerance. However, with respect to responsiveness it does not. Platforms such as Kubernetes do a great job at managing service instances but do not address the latency of inter-service calls. Therefore, due to a lot of inter-service communication typically found in most microservices architectures, responsiveness will ALWAYS be impacted, whereas scalability and fault tolerance can be managed through multiple instances. To your point, I should have made that more clear in my lessons and other resources.</blockquote><blockquote>Hope this helps clarify the discrepancy.</blockquote><p>My response on 16 February:</p><blockquote>Hi Mark, thank you for the explanation.</blockquote><blockquote>You already addressed another question I had regarding why scalability is rated higher for microservices than for monoliths. However, I am still unclear about my original point: how scalability can be rated at a maximum (five stars) while responsiveness is rated at only two stars.</blockquote><blockquote>Using your own definition of scalability, and considering inter-service communication overhead, a maximum scalability rating seems difficult to reconcile with limited responsiveness. It may be worth considering whether a slightly lower scalability rating, such as four stars, would better reflect this trade-off.</blockquote><blockquote>To be direct, scalability can be rated highly, but assigning it five stars is not accurate.</blockquote><h3>Key Takeaway</h3><p>I no longer take those star ratings at face value, but rather as a general indicator. Architectural characteristics are context-dependent. Check the comments section. @jonaswolffsen and I discussed this further there.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fc06b37ccc0" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/revisiting-microservices-architectural-characteristic-ratings-in-fundamentals-of-software-5fc06b37ccc0">Revisiting Microservices Architectural Characteristic Ratings in “Fundamentals of Software…</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serverless Development with Gen‑AI: Lessons from Amazon Q Developer CLI]]></title>
            <link>https://towardsaws.com/serverless-development-with-gen-ai-lessons-from-amazon-q-developer-cli-05e279c6a392?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/05e279c6a392</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Sun, 12 Oct 2025 04:14:03 GMT</pubDate>
            <atom:updated>2025-10-12T04:14:03.402Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*YMUBum2zqetxkiqlz5K-Ww.png" /><figcaption>Amazon Q Developer CLI: Strengths, Weaknesses, and Best Practices</figcaption></figure><p>Amazon sells Q Developer CLI as a way to “enhance productivity.” In reality, it can also generate unbelievable nonsense, hallucinate with total confidence, and forget instructions you gave it two minutes earlier. I forced it into <a href="https://github.com/azarboon/ai-powered-cdk-best-practices">a serverless app</a>, and here’s what actually happens when you rely on it. This post breaks down where Q Developer CLI delivers, where it falls short, and how to use it more effectively without losing control of your codebase.</p><h3>Limitations of LLM‑based Tools</h3><p>Large language model (LLM) tools do not reason; they guess. Amazon Q Developer CLI is no exception: it predicts patterns based on past data, not logic or intent. This leads to two unavoidable consequences:</p><ul><li>Hallucinations <a href="https://martinfowler.com/articles/202508-ai-thoughts.html">are a feature, not a bug</a>.</li><li>Outputs are <a href="https://martinfowler.com/articles/2025-nature-abstraction.html">nondeterministic</a>; the same input can produce different results.</li></ul><p>This unpredictability creates a new abstraction that breaks familiar assumptions about repeatability and control, and the industry is <a href="https://martinfowler.com/articles/2025-nature-abstraction.html">still figuring out how to use these tools effectively</a>. Ignoring these traits is a mistake. Later sections explain how to work within these limitations.</p><h3>Best Use Cases for Amazon Q Developer CLI</h3><p>Amazon Q Developer CLI is useful in specific scenarios, especially in AWS‑native environments. In my <a href="https://github.com/azarboon/ai-powered-cdk-best-practices">serverless project</a>, these were the areas where it actually delivered value:</p><h4>Troubleshooting</h4><p>It identifies errors and misconfigurations surprisingly well. Many times, I gave it AWS projects with broken configurations, and it found the issues much faster than I could manually. It can also fetch and analyze logs across services such as CloudWatch, API Gateway, and Lambda far faster than manual log-diving. I found it particularly useful, and it has saved me a lot of time.</p><h4>A faster search engine with execution power</h4><p>I rarely need to dig through Stack Overflow or GitHub issues for syntax fixes anymore. Q Developer CLI makes debugging far more convenient.</p><h4>Automating the boring stuff</h4><p>From syntax lookups to generating business logic for my functions, Q Developer CLI can save significant time. That said, it should be used cautiously (see later sections).</p><h4>Onboarding quickly</h4><p>If you’re new to a stack (in my case AWS CDK and TypeScript), Q Developer CLI can dramatically speed up onboarding. Don’t expect it to provide deep expertise, but it’s often enough to get moving and build momentum.</p><h4>Explaining and analyzing code</h4><p>When I wrote a cluttered function and later asked Q Developer CLI to explain it, the output was surprisingly useful.</p><h3>Amazon Q Developer CLI Issues and Pain Points</h3><p>Amazon Q Developer CLI has major reliability and usability gaps. Here are the most painful ones:</p><h4>Breaking updates</h4><p>Q Developer CLI gets updated frequently (which is good), but even patch releases can unexpectedly break things. For example, when I upgraded from version 1.13.0 to 1.13.02, the Model Context Protocol (MCP) servers stopped working.</p><h4>Bloated code and nonsensical logic</h4><p>Q Developer CLI often over-engineers solutions, writes bloated code, and sometimes produces outright nonsense that requires human judgment to catch. It also tends to apply brute‑force fixes: it keeps trying until it “works” and often forgets to clean up the mess from previous attempts. See the later section on how I worked around this.</p><h4>Fragile integration with its own stack</h4><p>The integration between Q Developer CLI and AWS MCP Servers is fragile (<a href="https://github.com/aws/amazon-q-developer-cli/issues/2452">this issue</a> is just one example), and the lack of proper documentation doesn’t help. In addition, Q Developer CLI can even fail to work with the very tools it’s supposed to support. For example, when I try to run sam deploy through the <a href="https://github.com/aws/aws-sam-cli">AWS SAM CLI</a> inside Q Developer CLI, it often hangs. I have to run sam deploy in a separate, clean terminal outside of Q Developer CLI. This happens even when using the <a href="https://github.com/awslabs/mcp/tree/main/src/aws-serverless-mcp-server">AWS Serverless MCP Server</a>, which is supposed to support SAM CLI. I reported <a href="https://github.com/awslabs/mcp/issues/894">this issue </a>two months ago, and there has still been no response.</p><h4>Open source, but poorly supported</h4><p>I encountered many bugs while using Amazon Q Developer CLI and reported several issues on GitHub, but nothing came of it. As of now, the repository has over <a href="https://github.com/aws/amazon-q-developer-cli/issues">680 open issues</a>, most of which have not been addressed by the maintainers. This problem extends beyond Q Developer CLI to its ecosystem as well. The <a href="https://github.com/awslabs/mcp">AWS MCP Servers</a> open‑source documentation is far from great. I tried to improve it, but nobody cared.</p><p>To be fair, this isn’t limited to these projects. In my view, I don’t find AWS strong when it comes to open source: gatekeeping, lack of responsiveness, and in one case I even experienced what felt like outright abuse from AWS employees (I had to involve GitHub support). Compared to Azure, AWS is definitely behind in this area.</p><h4>Poor documentation</h4><p>The <a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/what-is.html">official documentation</a> for Q Developer CLI on the AWS website includes outdated commands and is sometimes inconsistent with the information in its <a href="https://github.com/aws/amazon-q-developer-cli">GitHub repository</a>. When I wasn’t sure about commands or configuration steps, I tried asking Q Developer CLI itself. It rarely gave the right answer and, ironically, often responded with incorrect instructions or deprecated options.</p><h4>Security risks</h4><p>Q Developer CLI expands your attack surface and can be hijacked to manipulate files. This risk applies <a href="https://martinfowler.com/articles/exploring-gen-ai/software-supply-chain-attack-surface.html">to all coding assistants, not just this one.</a> A malicious code snippet was recently distributed to Q Developer CLI users; Amazon <a href="https://www.lastweekinaws.com/blog/amazon-q-now-with-helpful-ai-powered-self-destruct-capabilities/">reportedly failed to vet it and later downplayed the incident.</a> MCPs also <a href="https://elenacross7.medium.com/%EF%B8%8F-the-s-in-mcp-stands-for-security-91407b33ed6b">lack several security features</a>, further increasing exposure.</p><h4>False reports</h4><p>Sometimes Q Developer CLI claims it has followed my instructions, but when I check the result, I find it hasn’t. This can happen even with trivial tasks. It’s infrequent, but I still have to verify the outcome manually.</p><h3>Amazon Q Developer CLI Best Practices: Tips for Effective Use</h3><p>If you do not set hard boundaries, Amazon Q Developer CLI will create problems faster than it solves them. These practices are what kept it useful instead of destructive:</p><h4>Cross‑examine with other LLMs</h4><p>Anecdotally (and ironically), ChatGPT often outperforms Q Developer CLI in AWS solution design and provides better answers. I’ve found that cross-examining the outputs of two LLMs significantly improves quality and reduces hallucinations. By pitting them against each other, I also learn more. It feels like watching two experts debate.</p><p>When I’m stuck, I ask Q Developer CLI to summarize the problem. I then copy only the problem statement (not its solution) into ChatGPT and ask for feedback. ChatGPT usually proposes its own approach. I feed that back into Q Developer CLI and ask for its opinion. Often, Q Developer CLI agrees the ChatGPT solution is better, and I proceed with it. If it disagrees, I send its response back to ChatGPT for another round. Usually, they converge on a solution by the second or third iteration.</p><h4>Use a reference application</h4><p>A reference application that follows best practices can noticeably improve output quality. You can ask Q Developer CLI to analyze the reference application and generate code that aligns with it. Unfortunately, AWS has not done a good job in this area. Even its <a href="https://github.com/cdklabs/aws-cdk-testing-examples/">sole sample for CDK testing</a> is outdated, and I am not aware of any suitable application that can serve as a reference for Q Developer CLI.</p><p>To fill this gap, I created an AWS CDK TypeScript <a href="https://github.com/azarboon/ai-powered-cdk-best-practices">reference application</a> that follows best practices. It also includes <a href="https://github.com/azarboon/ai-powered-cdk-best-practices/blob/master/.amazonq/rules/PROJECT_RULES.md">a project rules section</a> to help guide Q Developer CLI’s behavior. After Q Developer CLI kept ignoring my instructions, I refined the rules. It now follows them much more often. The application is a work in progress, and I continue to improve it over time. Feedback is welcome.</p><h4>Don’t fight the unpredictability; work with it</h4><p>As mentioned earlier, LLM‑based tools are non‑deterministic. Do not rely on them for predictable outcomes, or <a href="https://brooker.co.za/blog/2025/08/12/llms-as-components.html">they will disappoint you even with trivial tasks</a>. If you need to run a repetitive operation, ask Q Developer CLI to generate a script and then run that script yourself. The same applies to code modernization. You can ask Q Developer CLI to generate a <a href="https://github.com/codemod/codemod">codemod</a>, then use that codemod to perform predictable transformations. Expecting predictable results directly from an LLM is unrealistic. This is not a flaw; it is just standard software development practice: <a href="https://brooker.co.za/blog/2025/08/12/llms-as-components.html">use each tool only where it fits.</a></p><p>In addition, I used to get frustrated when similar prompts produced different outputs. Now I treat those variations as a way <a href="https://martinfowler.com/articles/202508-ai-thoughts.html">to spot hallucinated or unreliable parts of the response.</a></p><h4>Human oversight and minimal permissions are essential</h4><p>Q Developer CLI cannot replace expert reasoning and often generates a surprising amount of nonsense. That’s why developers must always filter out irrelevant or incorrect results. <a href="https://martinfowler.com/articles/pushing-ai-autonomy.html">The goal isn’t to remove developers but to reduce friction and improve the developer experience.</a> For me, the question isn’t whether Q Developer CLI will make a mistake, but how much damage it could cause.<br> That’s why I never grant Q Developer CLI full autonomy, and I minimize its permissions. I use always allow only for specific read-only tools, such as fs_read, while all write and execute operations are denied by default. I approve each write operation manually.</p><h4>Automate checks</h4><p>Given the amount of code and nonsense that Q Developer CLI can generate, automated checks become even more important and absolutely non-negotiable. In my reference application, I use <a href="https://github.com/azarboon/ai-powered-cdk-best-practices/blob/master/.husky/pre-commit">pre-commit hooks</a>, ESLint, <a href="https://docs.aws.amazon.com/cdk/v2/guide/aspects.html">CDK Aspects</a>, <a href="https://github.com/cdklabs/cdk-nag">CDK-Nag</a>, and unit tests. But don’t be fooled; these checks cannot detect logical duplication or faulty logic. They are essential, but they cannot replace human judgment. That’s why I combine them with manual approval for every write operation.</p><p>I’ve also seen Q Developer CLI ignore instructions and remove tests just to commit and push code. This has happened less frequently after I tuned <a href="https://github.com/azarboon/ai-powered-cdk-best-practices/blob/master/.amazonq/rules/PROJECT_RULES.md">my project rules</a>, but the risk still exists. For that reason, I would never allow any AI assistant to run in my CI/CD servers. The risk is simply too high. I prefer to keep build servers conventional to ensure all tests pass, and use coding assistants only on the developer side.</p><h4>Don’t let it think for you</h4><p>Treat Amazon Q Developer CLI as an energetic junior assistant. Let it handle mundane tasks and broaden your perspective on possible options (especially by cross‑examining with other LLMs), but <a href="https://www.linkedin.com/posts/theburningmonk_your-brain-is-a-muscle-use-it-or-lose-it-activity-7323641498690797569-zZDu/">never outsource your thinking to Q Developer CLI or any other assistant.</a></p><h4>Leverage MCPs early</h4><p>MCPs can provide valuable review and insights for optimization. Use them early before technical debt accumulates. But remember, while they are useful, they cannot replace human expertise. Also be aware <a href="https://elenacross7.medium.com/%EF%B8%8F-the-s-in-mcp-stands-for-security-91407b33ed6b">of the security gaps they can introduce</a>, and don’t assume they’re risk-free.</p><h3>Final Thoughts</h3><p>Amazon Q Developer CLI is immature and often wrong, but it is still useful in the right hands. I tested Codex CLI by OpenAI and dropped it quickly, so the alternatives are not necessarily better. Amazon Q Developer CLI can solve real problems and waste your time in equal measure, including on AWS-native workloads. I use it because it speeds up the right kind of work, not because I trust it. It has saved me time, but only with tight constraints and constant oversight. And I don’t expect it (or any other Gen AI tool) <a href="https://kalele.io/thoughts-regarding-software-development-with-ai/">to create me a domain model tailored to my business nor replace domain expertise.</a></p><p>Whether you should use a coding assistant at all depends on your environment and risk tolerance. If you want a decision model for that choice, <a href="https://martinfowler.com/articles/exploring-gen-ai/to-vibe-or-not-vibe.html">the framework by Birgitta Böckeler is a good starting point.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=05e279c6a392" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/serverless-development-with-gen-ai-lessons-from-amazon-q-developer-cli-05e279c6a392">Serverless Development with Gen‑AI: Lessons from Amazon Q Developer CLI</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Lambda vs. Azure Functions: Key Differences and Considerations]]></title>
            <link>https://towardsaws.com/aws-lambda-vs-azure-functions-key-differences-and-considerations-8792b9bd9abc?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/8792b9bd9abc</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[azure-functions]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Thu, 23 Jan 2025 10:42:19 GMT</pubDate>
            <atom:updated>2025-01-23T10:42:19.505Z</atom:updated>
            <content:encoded><![CDATA[<p>Both AWS Lambda and Azure Functions promise to free developers from the burden of managing servers, allowing them to focus on running business code. However, beyond their shared goal lies a multitude of differences. Having explored both, I’m excited to share my insights and uncover what sets them apart — differences that shape the development experience and influence the types of workloads each platform is best suited for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*EokPFXXqVjPe1DVe.jpg" /><figcaption>AWS Lambda vs. Azure Functions. Image credit: <a href="https://www.tatvasoft.com/blog/aws-lambda-vs-azure-functions/">https://www.tatvasoft.com/blog/aws-lambda-vs-azure-functions/</a></figcaption></figure><h3>Orchestration and Long-Running Workflows</h3><p>One of the most striking contrasts between AWS Lambda and Azure Functions lies in the types of workloads they support.</p><p>AWS Lambda<a href="https://aws.amazon.com/blogs/compute/operating-lambda-anti-patterns-in-event-driven-architectures-part-3/"> explicitly discourages</a> using Lambda as an orchestrator for long-running or complex workflows. Its design is centered around event-driven, stateless applications, with a maximum execution time of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-timeout.html">just 15 minutes</a>. While AWS Lambda excels in executing short, discrete tasks with minimal overhead, it is not optimized for long-running processes. Azure Functions, on the other hand, provides an<a href="https://learn.microsoft.com/azure/azure-functions/durable/durable-functions-orchestrations"> orchestrator function</a> feature, allowing for stateful workflows. This capability makes Azure Functions a better fit for complex business logic that requires the orchestration of multiple tasks.</p><p>Azure Functions also offers greater flexibility with execution time limits. In most hosting plans, it provides <a href="https://learn.microsoft.com/azure/azure-functions/functions-scale">“unbounded” execution time</a>, allowing functions to run for extended periods without a predefined timeout. This makes it easier to execute long-running jobs compared to AWS Lambda, which has a strict 15-minute execution cap.</p><h3><strong>Database Connections</strong></h3><p>When serverless functions interact with relational databases, optimizing database connections becomes critical to performance, especially when handling heavy workloads.</p><p>In Azure, connection pooling is managed <a href="https://learn.microsoft.com/dotnet/framework/data/adonet/sql-server-connection-pooling">at the client library level</a> and incurs no additional cost. This allows developers to easily optimize connections using the libraries provided by Azure’s ecosystem, notably <a href="https://learn.microsoft.com/dotnet/framework/data/adonet/sql-server-connection-pooling">ADO.NET</a>.</p><p>On the other hand, while AWS SDKs offer <a href="https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/best-practices.html#bestpractice1">some level of connection pooling optimization</a>, for certain use cases — such as applications with frequent connection opening and closing, those needing connection surge protection, or scenarios requiring IAM authentication or failover handling — AWS recommends using <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html">RDS Proxy</a>. This managed service offers advanced features but it comes at an additional cost, which may be a consideration depending on the application’s needs.</p><h3>Granularity</h3><p>Azure Functions organizes related functions into a Function App, which serves as the deployment unit. A Function App can host multiple functions sharing the same runtime, environment, libraries, and configurations, providing a more cohesive deployment model.</p><p>In contrast, AWS Lambda embraces a more granular architecture and <a href="https://docs.aws.amazon.com/lambda/latest/dg/concepts-event-driven-architectures.html#event-driven-anti-patterns">explicitly discourages</a> monolithic functions as an anti-pattern. Each Lambda function is treated as a separate unit of deployment, enabling tasks to be divided into highly granular components. However, some users may over-extend this approach, creating excessively small functions, which can lead to anti-patterns such as the “<a href="https://www.thoughtworks.com/radar/techniques/lambda-pinball">Lambda Pinball</a>” or “<a href="https://www.developertoarchitect.com/downloads/microservices-pitfalls.pdf">Grain of Sand</a>” anti-patterns, resulting in unnecessary overhead.</p><h3>Development Tools and Ecosystem</h3><p>Both AWS and Azure provide Infrastructure as Code (IaC) solutions for managing serverless resources, but AWS offers more seamlessly integrated tools compared to Azure.</p><p><a href="https://aws.amazon.com/serverless/sam/">AWS SAM (Serverless Application Model)</a> simplifies the deployment and management of serverless applications, specifically designed for AWS Lambda. It<a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-resources-and-properties.html"> natively supports services such as</a> API Gateway, DynamoDB, SQS, and Step Functions. Additionally, AWS SAM extends AWS CloudFormation, enabling the creation of other resources, including <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html">complex configurations</a>, through integration with CloudFormation.</p><p>On the Azure side, <a href="https://learn.microsoft.com/azure/azure-functions/functions-run-local">Azure Functions Core Tools</a> primarily supports the local development and deployment of Azure Functions-based applications. While it handles application code and configurations, Core Tools does not offer a complete IaC solution. To provision and manage infrastructure, additional IaC tools, such as Terraform,<a href="https://learn.microsoft.com/azure/azure-resource-manager/bicep/overview"> Bicep</a>, or<a href="https://learn.microsoft.com/azure/azure-resource-manager/templates/overview"> Azure Resource Manager templates</a>, are required. Furthermore, there is currently <a href="https://github.com/hashicorp/terraform-provider-azurerm/blob/09cb4bc053b41ec7e19caa54ea2c148e63e213ea/website/docs/r/linux_function_app.html.markdown#azurerm_linux_function_app">no native integration</a> between Core Tools and IaC tools like Terraform, which can complicate the overall developer experience.</p><p>In my view, Azure’s development tools currently lack the maturity of AWS’s offerings, but its ecosystem, including <a href="https://registry.terraform.io/providers/hashicorp/azurerm/latest">Terraform</a>, is notably more open-source friendly and adaptive. Nearly all Azure documentation <a href="https://github.com/MicrosoftDocs">is open source</a>, and the platform has been more welcoming of community contributions, <a href="https://github.com/azarboon">including my own</a>. In contrast, while contributing to an AWS repository, I encountered blatantly unprofessional and abusive behavior from a maintainer who is an AWS employee, publicly displayed. While I recognize this as an isolated incident, it raises broader concerns, particularly given AWS’s decision <a href="https://aws.amazon.com/blogs/aws/retiring-the-aws-documentation-on-github/">to retire almost</a> all of its open-source documentation. Given these factors, I am optimistic that Azure’s tooling will continue to evolve and reach greater maturity in the near future.</p><h4>Testing</h4><p><a href="https://theburningmonk.com/2022/05/my-testing-strategy-for-serverless-applications/">“Remocal testing”</a> is a recommended best practice for serverless application testing, endorsed by <a href="https://docs.aws.amazon.com/lambda/latest/dg/testing-guide.html">AWS</a> and <a href="https://github.com/MicrosoftDocs/azure-devops-docs/blob/9690bd4de0e493498e7b86d8b486c6466f5955b8/docs/pipelines/test/test-glossary.md#best-practices">Azure</a>. It emphasizes the interaction of local code and tests with live cloud resources to ensure realistic and accurate results. Both AWS SAM and Azure Functions Core Tools support local development, debugging, and remocal testing.</p><p>AWS SAM provides local simulation capabilities for specific services, such as <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-invoke.html">Lambda</a> and <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-start-api.html">API Gateway</a>, and it can <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-local-generate-event.html">generate sample event payloads</a> without simulating the actual services. Core Tools can be used alongside emulators like the <a href="https://learn.microsoft.com/en-us/azure/cosmos-db/emulator">Cosmos DB Emulator</a> and <a href="https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite">Azurite</a> for local testing. For more complex testing scenarios, both tools require connections to real cloud services or the use of additional emulators to replicate other services.</p><h3>Documentation</h3><p>Spoiler alert: This section is subjective and opinionated, but I’ve made an effort to support my points with evidence. As mentioned earlier, Azure adopts a generally friendlier approach to open-source, but experiences can vary depending on the team managing the repository. From my experience, documentation does not seem to be a high priority for the Azure Functions team, and significant improvements are needed compared to AWS Lambda. I initially raised this concern <a href="https://medium.com/serverless-zone/what-aws-lambda-users-should-know-about-azure-functions-and-vice-versa-3b04f8aa05a0">three years ago</a>, yet meaningful progress remains elusive.</p><p>For example, the recommendations in the official documentation on <a href="https://learn.microsoft.com/en-us/azure/azure-functions/security-concepts">security principles for Azure Functions</a> can be incomplete, inconsistent with industry best practices like <a href="https://owasp.org/www-project-serverless-top-10/">OWASP Serverless</a>, or even misleading. Six months ago, I attempted to address this by submitting <a href="https://github.com/MicrosoftDocs/azure-docs/pull/123312">a pull request</a>, but it was completely ignored by the Azure Functions team. This was quite discouraging and made me hesitant to submit further PRs.</p><p>Another area of concern is the poor explanation of fundamental concepts in Azure Functions, such as its deployment methodologies. From unclear naming conventions to disorganized explanations, the documentation remains confusing and difficult to navigate. This issue has persisted for <a href="https://medium.com/serverless-zone/what-aws-lambda-users-should-know-about-azure-functions-and-vice-versa-3b04f8aa05a0">at least three years</a> without resolution. Every time I dealt with this foundational topic in Azure Functions, I had to consult several different sources to fully understand the deployment options. In response, I created <a href="https://github.com/MicrosoftDocs/azure-docs/pull/124767">several pull requests</a> to address these issues. While the Azure Functions team<a href="https://github.com/MicrosoftDocs/azure-docs/pull/124767#issuecomment-2455639964"> acknowledged the problems this time</a>, they deferred the fixes to an unspecified timeline.</p><p>It’s unfortunate that Azure Functions places such a low priority on improving documentation. Since I don’t know when they will address these shortcomings, I’ve decided to write a concise explanation of the deployment options myself. I hope it will save time for my future self and others. Feel free to skip this section if it’s not relevant to you.</p><blockquote>In Azure Functions, deploying function code as zipped files is called “Run From Package.” This is achieved by setting WEBSITE_RUN_FROM_PACKAGE to 1 or to a URL. Currently, there is no specific name for the technique of deploying unzipped files, although it can be achieved by not specifying any value for WEBSITE_RUN_FROM_PACKAGE.</blockquote><h3>Key Features Unique to Azure Functions</h3><p>The subscription-based model is fundamental to Azure and Azure Functions. The<a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale"> choice of subscription</a> plays a significant role in determining the constraints of various Azure services — something that may initially seem unintuitive to AWS developers but becomes more familiar over time.</p><p>Azure Functions, <a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-azure-function-app-settings?tabs=azure-portal%2Cto-premium">on certain plans</a>, offer advanced tools such as Kudu. Kudu provides a real-time interface to the underlying file system, environment variables, logs, and running processes, offering flexibility for debugging and troubleshooting. However, changes made directly in Kudu are ephemeral and typically do not persist across redeployments unless they are integrated with persistent storage or the deployment pipeline.</p><h3><strong>Final Thoughts</strong></h3><p>Exploring the differences between AWS and Azure, particularly in the context of their Function as a Service offerings, is an area of significant interest to me. However,<a href="https://architectelevator.com/cloud/selecting-cloud-provider/"> as Gregor Hohpe aptly noted,</a> while technology differences are an important consideration when selecting a cloud provider, they represent only one facet of the decision-making process. A comprehensive evaluation should encompass the provider’s overall capabilities and alignment with organizational needs and constraints. Thus, rather than overemphasizing individual technological distinctions, it is essential to adopt a holistic approach to inform and guide a robust cloud strategy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8792b9bd9abc" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/aws-lambda-vs-azure-functions-key-differences-and-considerations-8792b9bd9abc">AWS Lambda vs. Azure Functions: Key Differences and Considerations</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoding the Cloud: A Decade of Evolution Through Official Standards]]></title>
            <link>https://medium.com/@azarboon/decoding-the-cloud-a-decade-of-evolution-through-official-standards-ad06e13eeeb7?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad06e13eeeb7</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-services]]></category>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Sat, 28 Dec 2024 08:56:34 GMT</pubDate>
            <atom:updated>2024-12-28T09:04:07.147Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*tja6UnjzDOMqCHLlELDlDg.jpeg" /></figure><p>Cloud computing has come a long way since the National Institute of Standards and Technology (NIST) defined its five “essential characteristics” in 2011: ¹</p><ul><li>on-demand self-service</li><li>broad network access</li><li>resource pooling</li><li>rapid elasticity</li><li>measured service</li></ul><p>At the time, NIST’s definition was groundbreaking, capturing the essence of cloud computing in a concise, high-level framework. However, this simplicity came with limitations. Security and practical constraints were underexplored, and its three service models — Infrastructure as a Service, Platform as a Service, and Software as a Service — did not fully address the expanding needs of cloud users.</p><p>The International Organization for Standardization (ISO) has redefined cloud standards to meet the complexities of modern cloud environments.² ³ Unlike the high-level approach of NIST, ISO emphasizes practicality, security, and customer-centricity, focusing on the real-world challenges and constraints of today’s cloud systems. ISO’s updated framework addresses the limitations of theoretical “unlimited capabilities” by prioritizing robust, transparent contractual agreements. These agreements explicitly acknowledge service constraints, fostering greater trust in shared cloud environments. Additionally, ISO introduces four new service models (which ISO calls “cloud service categories”) to complement the original three, catering to diverse customer needs:</p><ul><li>Network as a Service</li><li>Communications as a Service</li><li>Compute as a Service</li><li>Data Storage as a Service</li></ul><p>Let’s explore how ISO’s updated standards enhance the essential characteristics of cloud computing while reflecting the industry’s evolution over the last decade.</p><p><strong>On-demand self-service</strong> is modernized by recognizing that some human interaction may still be required. Rather than assuming fully automated processes, ISO adopts a pragmatic approach that balances automation with flexibility. The scope is also expanded to include not only the provisioning but also the configuration of cloud resources.</p><p><strong>Broad network access</strong> is enhanced by ensuring convenient, secure, and policy-compliant access to cloud resources across various networks and deployment models (public, private, hybrid, and community). By requiring interoperable access through standard mechanisms like APIs and peered connections, ISO enables seamless integration for diverse consumer needs.</p><p><strong>Resource pooling</strong> takes on new depth under ISO standards. Providers are required to offer both multi-tenancy and single-tenancy options, allowing customers to choose exclusive or shared access to resources. ISO also emphasizes abstraction, shielding customers from the underlying complexity while taking on maintenance tasks previously handled by users.</p><p><strong>Rapid elasticity and scalability</strong> are addressed with greater clarity. ISO separates elasticity from scalability, explaining the differences between horizontal and vertical scaling. It acknowledges practical limitations, such as latency and infrastructure constraints, and mandates transparent Service Level Agreements (SLAs) to align customer and provider expectations.</p><p><strong>Measured service</strong> introduces a more flexible, consumption-based billing model, enabling customers to pay only for what they use. This characteristic is reinforced by detailed SLAs, ensuring clarity and fairness in billing while fostering trust between providers and users.</p><p><strong>Multi-tenancy</strong> is elevated to a key feature, acknowledging its critical role in modern cloud environments. By introducing granular roles for customers, users, and tenants, ISO ensures precise resource allocation and access control. This refinement is especially beneficial for large organizations navigating security, confidentiality, and regulatory compliance. ISO also highlights the importance of robust identity and access management systems to address the complexity of modern deployments.</p><p>ISO’s revised cloud standards mark a significant leap forward. By addressing the practical realities of cloud computing and expanding its scope, ISO paves the way for a more customer-centric, transparent, and secure cloud ecosystem. These updates highlight the industry’s progress and dedication to meeting real-world customer needs.</p><p>References<br>[1]: The NIST Definition of Cloud Computing. Special publication 800–145. U.S. Department of Commerce. National Institute of Standards and Technology</p><p>[2]: ISO/IEC 22123–1:2023(E) — Information technology Cloud computing Part 1: Vocabulary. International Organization for Standardization. September 2023</p><p>[3]: ISO/IEC 22123–2:2023(E) — Information technology Cloud computing Part 2: Concepts. International Organization for Standardization. September 2023</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad06e13eeeb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Identity Federation Protocols: Difference and Use Cases (in AWS)]]></title>
            <link>https://faun.pub/identity-federation-protocols-difference-and-use-cases-in-aws-571d71ca8664?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/571d71ca8664</guid>
            <category><![CDATA[aml]]></category>
            <category><![CDATA[federated-identity]]></category>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[federated-authentication]]></category>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Thu, 19 Jan 2023 17:17:33 GMT</pubDate>
            <atom:updated>2023-01-19T17:17:33.691Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*6Elg22KuA6HIqylqs-eRcQ.jpeg" /></figure><p>Some time ago, I was working for a big bank and was assigned to integrate their on-premise identity provider with their new application hosted in AWS. This would allow their employees to access the AWS application while being logged in the corporate network.</p><p>It was a daunting task, to say the least, and both the poor documentation of AWS and confusing articles on the web made things worse. I went down the rabbit hole of identity federation, read several articles and eventually managed to get the job done: what’s the difference between various identity federation protocols? What’s their use cases? Which one to use with AWS? This post aims to address particularly the first two questions, simply and succinctly. Hopefully it saves you some time.</p><h3>Basics Terms; Simply Explained</h3><ul><li>Authentication: login + password (who you are)</li><li>Authorization: permissions <em>(what you are allowed to do)</em></li><li>Identity Provider (IdP): stores and manages user’s data such as email, password etc. Active Directory is a commonly used IdP</li><li>Identity Federation: when you use an external IdP instead of managing your own. This way you also don’t need to create your sign-in code. The IdP takes care of those tasks, and you can grant those federated identities the permission to use your resources.</li></ul><h3>OAuth 2.0 vs SAML 2.0 vs OIDC</h3><p>These are common protocols for identity federation, each has its own characteristics and used for different use cases. Simply explained, OpenID Connect (OIDC) and SAML 2.0 are <strong>authentication and authorization </strong>protocols. SAML 2.0 is for enterprise usage and more complex to implement. Whereas, OIDC is used for mobile / consumer facing apps and has a low barrier to entry.</p><p>OAuth 2.0 is an<strong> authorization</strong> protocol for protected resources (e.g. APIs), and it doesn’t tell about the end user’s identity, presence etc. OAuth 2.0 can be used simultaneously with either OIDC or SAML 2.0.</p><p>Mind you that OIDC is based on OAuth 2.0 and complements it with an authentication mechanism (through addition of ID Token in the form of JWT).</p><h3>Example of Use Cases</h3><ul><li>OAuth 2.0: when you sign up for an app and agree to let it automatically get new contacts from Facebook without sharing credentials. OAuth 2.0 allows API authorisation.</li><li>OIDC: when you sign in to an Identity Provider (IdP) like Google then you can access other websites (like YouTube) without sharing your sign in information</li><li>SAML 2.0: when you log into your corporate intranet or IdP then access other services like Salesforce without having to re-enter your credentials.</li></ul><p>SAML 2.0 is constrained to browser operation and only as secure as the browser. There are extensions for OAuth 2.0 and OIDC that enable use cases without browsers that can be used for devices like smart TV etc.</p><h3>Identity Federation in AWS</h3><p>AWS supports all the mentioned protocols and two types of federation:</p><p>1. Use web identity federation if you use a third party well-known IdP such as Facebook, Google, or any OIDC compatible provider.</p><p>2. Use enterprise identity federation if you use a corporate IdP. You may be able to get out-of-box integration; Is your IdP compatible with SAML 2.0?</p><ul><li>Yes. Then you can use your IdP “without writing a code”. For example, you can use Microsoft ADFS to leverage your Active Directory. (my experience fell into this category)</li><li>No. Then you have to create a custom identity broker application. The broker application authenticates users, requests temporary credentials for users from AWS STS, and then provides them to the user to access AWS resources.</li></ul><p>And to enable federated access to your workforce, you can use following AWS services:</p><ul><li>AWS IAM Identity Center (successor to AWS SSO): helps you define federated access permissions for your users based on their group memberships in a single centralized directory.</li><li>AWS Identity and Access Management (IAM): Good fit if you want to use multiple directories, or want to manage the permissions based on user attributes</li></ul><h3>Sources for Further Read:</h3><p><a href="https://www.ubisecure.com/wp-content/uploads/2019/05/SAML-vs-OAuth-2.0-vs-OpenID-Connect.pdf?utm_source=ActiveCampaign&amp;utm_medium=email&amp;utm_content=Here+s+your+Ubisecure+White+Paper&amp;utm_campaign=OAuth+WP+Download#:~:text=OpenID%20Connect%2C%20or%20OIDC%20for,addition%20of%20the%20ID%20Token">https://www.ubisecure.com/wp-content/uploads/2019/05/SAML-vs-OAuth-2.0-vs-OpenID-Connect.pdf</a></p><p><a href="https://www.getkisi.com/blog/authentication-protocols-overview">https://www.getkisi.com/blog/authentication-protocols-overview</a></p><p><a href="https://www.okta.com/identity-101/whats-the-difference-between-oauth-openid-connect-and-saml/">https://www.okta.com/identity-101/whats-the-difference-between-oauth-openid-connect-and-saml/</a></p><p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers.html">https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers.html</a></p><p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html">https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html</a></p><p><a href="https://aws.amazon.com/identity/federation">https://aws.amazon.com/identity/federation</a></p><p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html">https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html</a></p><p><a href="https://aws.amazon.com/blogs/security/aws-federated-authentication-with-active-directory-federation-services-ad-fs/">https://aws.amazon.com/blogs/security/aws-federated-authentication-with-active-directory-federation-services-ad-fs/</a></p><p><a href="https://stackoverflow.com/questions/6556522/authentication-versus-authorization">Authentication versus Authorization</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*c6RfPy-QCS3UALfE.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=571d71ca8664" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/identity-federation-protocols-difference-and-use-cases-in-aws-571d71ca8664">Identity Federation Protocols: Difference and Use Cases (in AWS)</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying Databases Systems]]></title>
            <link>https://faun.pub/demystifying-databases-systems-d0261937c494?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0261937c494</guid>
            <category><![CDATA[sql-vs-nosql]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[oltp-vs-olap]]></category>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Wed, 04 Jan 2023 11:04:32 GMT</pubDate>
            <atom:updated>2023-01-05T08:18:35.315Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Difference Between Databases</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*pkOMtdr4N5bEU81dSV9p8Q.png" /></figure><h3><strong>SQL vs NoSQL (relational vs non-relational)</strong></h3><p>SQL databases (relational) are designed for well-understood data models that don’t change often (e.g. banking, OLTP, OLAP etc). They value data consistency over transaction speed. SQL databases are normalized, which means they store data in multiple tables. Tables are connected using JOINS. Normalization reduces data redundancy, and provides better consistency. However, it can be slow, especially when there are complex queries with a lot of data to process. SQL databases are ACID compliant which means data is consistent and stable on the disk after transactions are complete.</p><p>NoSQL databases<strong> </strong>(non-relational)<strong> </strong>are ideal for unstructured data (e.g. image, email, etc) and generally are faster than SQL databases: They are denormalized i.e. they store a particular data entity together (in one table), so performing operations on a single data entity is faster. However, denormalization causes data redundancy. NoSQL databases are ideal for ever changing data requirements and for those who need to deal with scalable and low latency applications (web apps, gaming etc).</p><h3><strong>Consistency vs Availability</strong></h3><p><strong>Strong consistency</strong> (SQL databases) means the latest data is returned, and this results in higher latency as it needs to wait for other replicas to be updated. <strong>Eventual consistency</strong> (NoSQL databases) means results are less consistent early on, but have lower latency.</p><p>According to CAP theorem, databases have to trade-off mostly between availability and consistency, and it’s a business decision:</p><ul><li>When each data write is vital and updates need to be reflected immediately, then you need strong consistency.</li><li>When aggregate speed and scale is more important than correctness of individual queries, then you probably need eventual consistency.</li></ul><h3><strong>OLTP vs OLAP</strong></h3><p>Online Transaction Processing (OLTP) enables real-time execution of large numbers of transactions concurrently. It requires fast response time (through indexing) and frequent backups. It modifies a small amount of data frequently. OLTP is ACID compliant, highly available and scalable with high throughput.</p><p>Online Analytical Processing (OLAP) enables complex query of databases for analytical purposes. It’s read intensive and doesn’t modify data. It requires slower response time but significant storage to store historical data.</p><h3>Summary</h3><p>SQL databases are ACID compliant and choose consistency over availability. Whereas, NoSQL databases follow the BASE model and choose availability over consistency.</p><h4>Additional sources for further read</h4><p><a href="https://www.scylladb.com/learn/nosql/nosql-vs-sql/">ScyllaDB | NoSQL vs SQL</a></p><p><a href="https://www.geeksforgeeks.org/sql-vs-nosql-which-one-is-better-to-use/">https://www.geeksforgeeks.org/sql-vs-nosql-which-one-is-better-to-use/</a></p><p><a href="https://www.oracle.com/database/what-is-oltp/">https://www.oracle.com/database/what-is-oltp/</a></p><p><a href="https://www.datastax.com/blog/sql-vs-nosql-pros-cons">https://www.datastax.com/blog/sql-vs-nosql-pros-cons</a></p><p><a href="https://aws.amazon.com/nosql/">https://aws.amazon.com/nosql/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*HrNk0Xokjjfs7SHr.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0261937c494" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/demystifying-databases-systems-d0261937c494">Demystifying Databases Systems</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloudy Reviews]]></title>
            <link>https://medium.com/series/cloudy-reviews-eb523d58d581?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb523d58d581</guid>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Mon, 22 Jun 2020 20:07:24 GMT</pubDate>
            <atom:updated>2020-06-22T20:07:24.898Z</atom:updated>
            <content:encoded><![CDATA[<p>A while ago, I purchased a book to expand my knowledge. The author is respected and the book has good reviews. So, I was excited, purchased and started reading it but couldn’t finish the book: the book is boring with an abundance of unnecessary information; my time, money and motivation got (kind of) wasted. Unfortunately, this is not a rare experience, and made me to stay away from books for a long time. But recently I’ve started the habit of reading 15 minutes/day books about cloud computing. And I would like to share my review for each: frank, practical and readable in less than 10 minutes. Hopefully, this helps cloud enthusiasts to decide whether they should read the whole book, and the author to improve their book(s). Of course, this is just my personal opinion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb523d58d581" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unit Test Serverless Applications The DevOps Way -Part 2]]></title>
            <link>https://medium.com/hackernoon/unit-test-serverless-applications-the-devops-way-part-2-aae59f05a32c?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/aae59f05a32c</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Sun, 14 Jul 2019 20:44:55 GMT</pubDate>
            <atom:updated>2019-07-14T20:44:55.439Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1zChtbObmnZpwewuEzdNrw.png" /></figure><p>Here you can find <a href="https://medium.com/@azarboon/unit-test-serverless-applications-the-devops-way-d7897944646c">link for the first</a> part of this tutorial. In this part, I’m going to explain how you can create a DevOps pipeline based on AWS CodePipeline to automatically perform tests.</p><h3>Pipeline</h3><p>Now that application and unit tests are ready, let’s see how we can automate unit test and deployment by a CI/CD pipeline. AWS CodePipeline and its associated services make your job easy. A pipeline consists of stages and runs them sequentially. Each stage consists of one (or more) action. You do the tasks by configuring actions. You need to assign role to actions, enabling them to perform their task.</p><p>In case any stage fails, the whole pipeline stops. Each stage consists of one or more actions. We are going to define three stages in our pipeline, each having one action:</p><ul><li>Source stage: retrieves latest status of your source code</li><li>Build stage: install dependencies, makes sure all your tests pass and returns built result (artifact) as output. Output of this stage is used input of next stage.</li><li>Deploy stage: receives the artifact from previous stage and deploys it by CloudFormation.</li></ul><p>Now, let’s start building our pipeline:</p><ol><li>In later stages, you will need to link your pipeline with an existing CloudFormation stack. If you already don’t have such, you can create a new stack by deploying your application. As an example, I create the stack <em>lambda-unit-test</em>:</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bd5224a9c99d95e76e1951fc614065d4/href">https://medium.com/media/bd5224a9c99d95e76e1951fc614065d4/href</a></iframe><p>2. In later steps, you will need a role that to grant permission to your deploy action to execute its tasks. To create it, go to <a href="https://console.aws.amazon.com/iam">IAM console</a> and create a role with following properties:</p><ul><li><strong>Trusted entity:</strong> AWS Service — CloudFormation.</li><li><strong>Permissions:</strong> AWSLambdaExecute.</li><li><strong>Role name:</strong> code-deploy-execution-role</li></ul><p>Then open the role, and add following inline policy to it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/08ab1d94e095fa9504f1d58c7a755309/href">https://medium.com/media/08ab1d94e095fa9504f1d58c7a755309/href</a></iframe><p>3. Go to <a href="https://aws.amazon.com/codepipeline/">CodePipeline console</a> and create a new pipeline similar to Figure 8. I’ve named it as sample-pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*x7irERN6PvuVKvI24DU9Yw.png" /><figcaption>Figure 8: create a new pipeline in CodePipeline</figcaption></figure><p>4. Connect your pipeline with your source provider, and your code (Figure 9). Then press Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*ne57FTg962Aro3TxVop21g.png" /><figcaption>Figure 9: Enabling the pipeline to access to the code, which is hosted in Github</figcaption></figure><p>5. Before deploying your application, you need to build it (i.e. install its dependencies). CodeBuild helps you to do that. Firstly, you need to add a Build stage to your pipeline, then you need to add a build project (action) to the stage. Press on the icon next to “Create Project”, to open it in a new window, otherwise you might get some unexpected issues (Fig 10)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*NG8rcz2wkubEa5CYSLnMYg.png" /><figcaption>Figure 10: Adds Build stage to the pipeline</figcaption></figure><p>6. Choose the right environment for your application (Node.js runtime, in here). If you are using an existing service role for your CodeBuild, make sure that it has the required permissions. SAM needs to upload the artifact into the s3. So, the role needs to have write permission (s3:PutObject).</p><p>We let the wizard to create a service role for us but we will need to add some policies to make it work. We’ll get back to this point later on.</p><p>CodeBuild uses buildspec.yml file which includes commands to build and to test your application (Fig 11). You can add various phases into it <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html">(more information here)</a> Once tests pass, aws cli packages local files, upload them to s3 bucket and returns a copy of new artifact, cf-template.yaml. We return cf-template.yaml as output of Build stage, and will use it input for the next stage.</p><p>Press “Continue to CodePipeline”</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dddd51e67f553460d246966acd69c5fd/href">https://medium.com/media/dddd51e67f553460d246966acd69c5fd/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*5GWp3GIj7oHbJaexZ7Lp-w.png" /><figcaption>Figure 12: create a build project by specifying runtime settings, build commands and service role</figcaption></figure><p>7. Now your project is created and can be added to your build stage. Press “Next” to proceed to Deploy stage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*UMm4AyPLjeixWWtYXbuR6w.png" /><figcaption>Figure 13: Create build stage and add a project to it.</figcaption></figure><p>8. Now you need to define deploy stage. Choose CloudFormation as “deploy provider”. For action mode choose “Create or replace a change set”. Choose an existing CloudFormation stack (from step #1). You also need to specify a change set. Change sets help you to understand how new changes can affect your stack. You can list existing changesets of your stack by this command (change stack name according to yours):</p><p>aws cloudformation list-change-sets — stack-name lambda-unit-test</p><p>Choose an available Changeset and use its ChangeSetName property. Or you can create a Changeset via UI by following <a href="https://aws.amazon.com/blogs/aws/new-change-sets-for-aws-cloudformation/">this tutorial</a>. In case you don’t see the changeset as an option, just type it in the “Change set name” field</p><p>Use role name that you created in step #2. For the Template part, note that</p><p>&lt;inputArtifactName&gt; is actually the “Output artifacts” of previous stage (build stage). By default name of the artifact is “BuildArtifact” (you can edit this later on). Whereas, TemplateFileName is the artifact that you have defined in the buildspec file, cf-template.yaml. So fill out the Template field with BuildArtifact::cf-template.yaml</p><p>As for the field Capabilities: make sure to choose an option; otherwise, you may get error later on. If your SAM (or CloudFormation) template includes named IAM resources, you need to choose CAPABILITY_NAMED_IAM. Otherwise, you can choose either of them (you need to choose one). We don’t have named IAM resource so we choose CAPABILITY_IAM.</p><p>Choose the role that you created from step #2. Press Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*c3GD56B2_ZgrUw8Koidzig.png" /><figcaption>Figure 14: choose an existing stack and changeset, define input, and capabilities for your Deploy stage</figcaption></figure><p>9. Review settings and create the pipeline. Upon create, CodePipeline runs it. This can take a few minutes, and pipeline fails in the build stage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*id0fP6_vYBt3Y5ngAy_3jQ.png" /><figcaption>Figure 15: our newly created pipeline fails at build stage</figcaption></figure><p>10. Click on “Details” to see the logs (Figure 16): CloudFormation is unable to upload the artifact to s3, access is denied. This is because our CodeBuild service role (which was automatically created) doesn’t have permission to write into s3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*0DmQo9086CElfQraLTbBnQ.png" /><figcaption>Figure 16: CloudFormation is unable to upload artifact to s3</figcaption></figure><p>11. To edit the stage, from the left column, choose Build -&gt; Build projects -&gt; and specify the project. Choose “Build details” pan and you can see associated service role with this build project (Fig 17).</p><p>Click on it to get redirected to its associated IAM page. Then add following inline policy. The inline policy grants enough permissions to your CodeBuild project to write into s3 and to log the data into CloudWatch. Remember the principle of least privilege: limit the resources and grant minimum required permissions. Also make sure that you put /* after your bucket name; otherwise your operation will fail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*5uTAq3iKK_G_qDnpK87-pQ.png" /><figcaption>Figure 17: you can see service role associated with the build project</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/50d94febf828c9cf38c29e1ad6a72e88/href">https://medium.com/media/50d94febf828c9cf38c29e1ad6a72e88/href</a></iframe><p>12. After implementing changes, rerun the pipeline, eventually all stages should pass, your functions should be live and working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*vSsGZfVUPiKgjJcjPS1wYA.png" /><figcaption>Figure 18: all stages and the pipeline pass</figcaption></figure><p>From now on, every time that a new change occurs to your code, CodePipeline runs the pipeline, perform tests and deploys your application (if all tests pass). You can add more stages to your pipeline according to your needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aae59f05a32c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/unit-test-serverless-applications-the-devops-way-part-2-aae59f05a32c">Unit Test Serverless Applications The DevOps Way -Part 2</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unit Test Serverless Applications The DevOps Way — Part 1]]></title>
            <link>https://medium.com/hackernoon/unit-test-serverless-applications-the-devops-way-d7897944646c?source=rss-3bb89b17d900------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7897944646c</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws-codepipeline]]></category>
            <category><![CDATA[continous-integration]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Mahdi Azarboon]]></dc:creator>
            <pubDate>Wed, 10 Jul 2019 14:11:42 GMT</pubDate>
            <atom:updated>2019-07-16T06:04:05.406Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9pVLG4BzEWIcMnfhFp9ULQ.png" /><figcaption>Picture taken from <a href="https://medium.com/@neonrocket/devops-is-a-culture-not-a-role-be1bed149b0">Irma Kornilova</a></figcaption></figure><h3>Unit Test Serverless Applications The DevOps Way -Part 1</h3><p><strong>P.S: </strong>This post was originally written as a single part. However, I’ve divided it into two, to make it easier to read. In the first part, I’m going to explain why DevOps matters, why is it a good fit for serverless applications, and I’ll show two different ways to unit test Node.js serverless applications. <a href="https://medium.com/@azarboon/unit-test-serverless-applications-the-devops-way-part-2-aae59f05a32c">In the second part</a>, I’ll explain how you can create DevOps pipeline based on AWS stacks.</p><h3><strong>Introduction</strong></h3><p>DevOps is a set of practices that emphasise on better collaboration between development and operation teams. DevOps purpose is to deliver features, updates and fixes rapidly, frequently and more reliably (<a href="https://aws.amazon.com/devops/what-is-devops/">source</a>).</p><p>Continuous Integration (CI) is a set of practices that drive development team to implement small changes and to check them frequently. Technical goal is to automate building, testing and packaging applications. Continues Delivery (CD) picks up where CI ends. CD automates delivery of application to selected environments (e.g. development, testing, production environments). CI/CD pipeline is considered as one of the best DevOps practices. Continuous integration and delivery requires continuous testing because the overall goal is to deliver a quality application (<a href="https://www.infoworld.com/article/3271126/what-is-cicd-continuous-integration-and-continuous-delivery-explained.html">source</a>).</p><p><a href="https://aws.amazon.com/lambda/">AWS Lambda</a> lets you run code without provisioning or managing servers. Just upload your code and Lambda takes care of everything required to run and scale your code. Using Lambda, shortens development time and increases velocity: you can write your code, deploy and make it functional even within few minutes. However, this speed in increase, shouldn’t sacrifice quality. To keep quality standards, you should develop your functions in a DevOps way, that is within a CI/CD pipeline. So, whenever any changes add to central repository, your pipeline makes sure that new changes, meets the minimum quality standard. This is achieved by continuous and automated tests within your pipeline.</p><p>DevOps helps you to minimize risks within your project. You can add different types of tests within your CI/CD pipeline to address different types of risk. Here are some of test types which you can add into your pipeline:</p><p><strong>Static code analysis: </strong>to examine your code<strong> </strong>before running it. This test can help you to find bugs and vulnerabilities in your code, before they cause a disaster.</p><p><strong>Unit test:</strong> to validate that each unit of software performs as designed. A unit is the smallest testable part of any software <a href="http://softwaretestingfundamentals.com/unit-testing/">(source)</a>. Unit tests are cheap to run and are recommended to be one of the first test phases within your CI/CD pipeline. So, in case new code changes ruins the application, developer gets notified ASAP. Keep in mind that other types of tests (e.g. integration tests) can be much more time consuming and expensive to run. Also, added benefit of unit test is that developer can run them locally.</p><p><strong>Integration test:</strong> to test connection and combination of your functions with the related services, as a whole group. Imagine that API Gateway triggers your function, and your function interacts with DynamoDB. There are emulators helping you to test all these locally. But for any reason, your function might not work as it should, in production. For example, your DynamoDB might have exceeded provisioned throughput. Then your function returns error to user. To avoid such kind of problem, you should perform integration test.</p><p>Your options are not limited to these, and you can add other types of tests to your pipeline.</p><p>In this post, I’m going to show you how you can you can perform automated unit tests for your serverless application with a CI/CD pipeline. I’m going to use AWS Serverless Application Model (SAM), which is a powerful and open-source framework to make serverless applications. It provides user with some great features, including ability for local development and testing. I’m going to create a pipeline with AWS CodePipeline. Combining it with SAM, provides a seamless integration that works just smoothly.</p><h3>Application</h3><p>I have created a tiny Node.js serverless application (<a href="https://github.com/azarboon/lambda-unit-test">source code</a>) that has two functions: one for creating item into DynamoDb (createItem) and one for reading item from Dynamodb (readItem). Following shows project structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/1*AZg5-ZBN45kILBPxm-_TCg.png" /><figcaption>Figure 1: application structure</figcaption></figure><p>I have separated business logic (app.js) from Lambda handlers. Handler interacts with Lambda environment, and is responsible for calling the business logic, injecting dependencies (e.g. Dynamodb client), processing event object and injecting the right input into the logic. This separation is considered as a good practice because it helps you to write more testable code, and also can help you to reuse your business logic in other environments. Let’s take a look at code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ccbdd83c9047a8513e0fe7b61363a839/href">https://medium.com/media/ccbdd83c9047a8513e0fe7b61363a839/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/df5bb94acba2a7215b51bbeaa640071b/href">https://medium.com/media/df5bb94acba2a7215b51bbeaa640071b/href</a></iframe><p>Meanwhile, I have defined a helper function (responseFactory) in ./lib.js. This is helpful when a method is used by different components. Lambda proxy integration requires specific output formatting from the function. That’s why I’m generating all outputs with a helper function to avoid unexpected errors.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff2ab17cf4df4abac4150dd5236b8429/href">https://medium.com/media/ff2ab17cf4df4abac4150dd5236b8429/href</a></iframe><p>Template.yaml is a configuration file used by SAM and describes our Lambda functions and their associated resources and permissions. It’s important to follow principle of least privilege: grant only minimum required permissions to your functions. SAM offers Policy Templates which are tighter and more secure version of AWS Managed Policies. Keeping that in mind I’m using DynamoDBReadPolicy for my readItem function. This prevents the function to write or do other unwanted operations on our table, while letting the function to log into CloudWatch.</p><p><em>createItem </em>function needs enough permissions to write into table and to update existing item in the table. Currently, there is no Policy Template with such permission, however SAM is flexible enough to enable you using custom policies for you functions. But using them, you have to take care of permissions by yourself. That is, you need to add policies enabling the function to log into CloudWatch (unless you don’t want logging). Please note that logging policies can be done in a more granular way and logging can be scoped to specific resource (i.e. log-group), however for brevity, I have given a more generous resource type for logging.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a0ce9d4562d0ccad3e664775f2fd738e/href">https://medium.com/media/a0ce9d4562d0ccad3e664775f2fd738e/href</a></iframe><h3>Unit Tests</h3><p>For testing, I have chosen Ava.js library over popular Mocha and Chai. Because it runs tests in parallel as separate process, and provides better performance and isolation for each test file (<a href="https://github.com/avajs/ava">source</a>). Also using it, your test cases can be written with shorter syntax.</p><p>When it comes unit testing serverless applications, there are at least two ways to do it: mocking or stubbing. I’m going to demonstrate both ways. It’s up to you which way you prefer to use.</p><h4>Stubbing</h4><p>Test stubs override methods to return specified and hard coded values (<a href="https://stackoverflow.com/a/27151309/5132065">source</a>). Sinon.js is a popular and easy-to-use library that can help you doing that. Following is a sample test case for readItem function using, doing stubbing. So, while running test case, it stubs DynamoDb client to return expected result, injects it into our business logic, and then continues the testing. It might be tricky to do stubbing if you don’t have access to your app dependency (in this case, DynamoDb client is dependency), that’s why it’s important to separate business logic and its dependencies.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/da71499aa4dda83518fdb62e91d5d92c/href">https://medium.com/media/da71499aa4dda83518fdb62e91d5d92c/href</a></iframe><h3>Mocking</h3><p>Mocking is creating objects that simulate the behaviour of real objects (<a href="https://stackoverflow.com/a/2666006/5132065">source</a>). Generally speaking, using test mocks is discouraged because they can bring extra complexity to your application: you have to always make sure that mocked behaviours is same as the actual behaviour (<a href="http://www.growing-object-oriented-software.com/">source</a>). This is especially true for tests which need to deal with real state of your application, e.g integration tests. But using mocks for unit tests is a common approach and can be the right choice. However, it might be annoying to find out how to configure mocks.</p><p><a href="https://www.npmjs.com/package/aws-sdk-mock">Aws-sdk-mock</a> is a popular npm library that uses sinon.js under the hood and mocks AWS SDK. Here you can see a sample test. It mocks DynamoDb client to behave as expected, and then does the rest of testing:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f22b648c08eccf1c65ef135d2d8fb861/href">https://medium.com/media/f22b648c08eccf1c65ef135d2d8fb861/href</a></iframe><p>So far we have created unit tests. <a href="https://medium.com/@azarboon/unit-test-serverless-applications-the-devops-way-part-2-aae59f05a32c">In the next post</a>, I’ll show you how you can create a DevOps pipeline for your tests with AWS CodePipeline.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7897944646c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/unit-test-serverless-applications-the-devops-way-d7897944646c">Unit Test Serverless Applications The DevOps Way — Part 1</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>