<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>DevOps Madness — IaC × AI agents</title><description>Practical notes on infrastructure as code and AI agents from someone who ships both — original posts plus writing published on the AWS blogs and with Spacelift, Gruntwork, StackGuardian and Qodo.</description><link>https://devopsmadness.com</link><language>en</language><item><title>Operations for AI on AWS: How to run AI agents in production</title><link>https://devopsmadness.com/blog/operations-for-ai-on-aws</link><guid isPermaLink="true">https://devopsmadness.com/blog/operations-for-ai-on-aws</guid><description>A reference stack for running AI agents in production on AWS: WAF, identity, Bedrock Guardrails, Cedar tool policies, observability, cost and adoption.</description><pubDate>Sun, 08 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;aside class=&quot;tldr border-line rounded-lg border p-5&quot; aria-label=&quot;TL;DR&quot;&gt;&lt;p class=&quot;font-mono text-sm font-semibold&quot;&gt;TL;DR&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Controls follow the request path: put each one at the earliest hop that can
enforce it.&lt;/li&gt;
&lt;li&gt;Bedrock Guardrails govern content, Cedar policies at AgentCore Gateway
govern tool actions, log masking governs who reads the logs, and IAM
governs what any of it can reach.&lt;/li&gt;
&lt;li&gt;Earn autonomy with numbers: start with a model-based use case, move to
shadow mode, and widen scope only where agreement and override rates
support it.&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;text-muted font-mono text-xs&quot;&gt;Last verified against AWS docs: 8 Nov 2026&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Most operations teams have AI pilots running somewhere. Getting the initial pilot up and running usually takes a few days, but getting approval for production use, plus maintaining and operating agents, is a different story.&lt;/p&gt;
&lt;p&gt;To move into production, you need guardrails, observability, access controls, runtime protection, and identity, among other things, especially when you need to scale agentic systems across a large organization.&lt;/p&gt;
&lt;p&gt;The debate on whether these systems can be useful is over; the main question now is how to adopt them safely at scale. Accountability still stays with humans. An agent that changes your infrastructure is still your agent.&lt;/p&gt;
&lt;p&gt;This post follows a reference stack for AI operations on AWS. It builds on the &lt;a href=&quot;/blog/building-an-agent-control-plane-on-aws&quot;&gt;agent control plane&lt;/a&gt; I described in August, and focuses on running agents day to day.&lt;/p&gt;
&lt;h2 id=&quot;two-halves-of-agentic-operations&quot;&gt;Two halves of agentic operations&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;AI for operations:&lt;/strong&gt; &lt;a href=&quot;/blog/ai-tooling-for-sres&quot;&gt;agents that do operations work&lt;/a&gt;. They triage tickets, categorize incidents, correlate logs, and pick runbooks. &lt;a href=&quot;https://aws.amazon.com/devops-agent/&quot;&gt;AWS DevOps Agent&lt;/a&gt; is a good example; it correlates telemetry with code and deployment data, then posts its findings to the incident channel.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Operations for AI:&lt;/strong&gt; the foundations that make all kinds of agents safe to run. Edge protection, identity, content guardrails, tool access, observability, and cost attribution all sit here. The rest of this post covers this half.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/operations-for-ai-on-aws/two-halves.png&quot; alt=&quot;Two halves of agentic operations in three rows: AI for operations (what you adopt) covers ticket triage, incident investigation, change risk review and runbook selection; operations for AI (what makes it safe) covers edge and identity, content guardrails, tool access, observability and cost attribution; organizational readiness (who owns it) covers roles and ownership, center of excellence, adoption stages and trust metrics&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 1: The two halves of agentic operations, with organizational readiness across both.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You should be thinking about several domains around the operations for AI:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Domain&lt;/th&gt;
&lt;th&gt;What it covers&lt;/th&gt;
&lt;th&gt;Main AWS services&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Governance and compliance&lt;/td&gt;
&lt;td&gt;Data classification, operating boundaries, audit trails&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://aws.amazon.com/bedrock/guardrails/&quot;&gt;Bedrock Guardrails&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/policy.html&quot;&gt;AgentCore Policy&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html&quot;&gt;CloudTrail&lt;/a&gt;, &lt;a href=&quot;https://aws.amazon.com/about-aws/whats-new/2026/07/aws-security-hub-ai/&quot;&gt;AI Inventory in Security Hub&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Operational reliability&lt;/td&gt;
&lt;td&gt;Quotas, drift, evaluation, safe model upgrades&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://aws.amazon.com/cloudwatch/&quot;&gt;CloudWatch&lt;/a&gt;, &lt;a href=&quot;https://aws.amazon.com/cloudwatch/omni/&quot;&gt;Omni&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html&quot;&gt;AgentCore Observability&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/evaluations.html&quot;&gt;AgentCore Evaluations&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data access and integration&lt;/td&gt;
&lt;td&gt;MCP, scoped tool access, workload identity&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html&quot;&gt;AgentCore Gateway&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/identity.html&quot;&gt;AgentCore Identity&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost management&lt;/td&gt;
&lt;td&gt;Token-level visibility, attribution, budgets&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://aws.amazon.com/aws-cost-management/aws-cost-explorer/&quot;&gt;Cost Explorer&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-create.html&quot;&gt;application inference profiles&lt;/a&gt;, &lt;a href=&quot;https://aws.amazon.com/aws-cost-management/aws-budgets/&quot;&gt;AWS Budgets&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security and forensics&lt;/td&gt;
&lt;td&gt;Prompt injection defense, PII in logs, blast radius&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://aws.amazon.com/waf/&quot;&gt;AWS WAF&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html&quot;&gt;CloudWatch Logs data protection&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/guardduty/latest/ug/ai-protection.html&quot;&gt;GuardDuty AI Protection&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Organizational readiness&lt;/td&gt;
&lt;td&gt;Roles, skills, center of excellence, adoption stages&lt;/td&gt;
&lt;td&gt;People and process&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;follow-one-request-through-the-stack&quot;&gt;Follow one request through the stack&lt;/h2&gt;
&lt;p&gt;Imagine we have an agentic application powered by a chatbot UI. Let’s track every request through the end-to-end path:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edge:&lt;/strong&gt; &lt;a href=&quot;https://aws.amazon.com/waf/&quot;&gt;AWS WAF&lt;/a&gt; screens the request before anything else sees it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Identity and authorization:&lt;/strong&gt; the gateway checks who is calling and what that caller may do.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Content governance:&lt;/strong&gt; an &lt;a href=&quot;https://aws.amazon.com/bedrock/guardrails/&quot;&gt;Amazon Bedrock Guardrail&lt;/a&gt; evaluates the prompt (and, later, the response).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Routing and tool access:&lt;/strong&gt; a model gateway sends the call to an approved model (a common implementation we see is &lt;a href=&quot;https://www.litellm.ai/&quot;&gt;LiteLLM Gateway&lt;/a&gt;); &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html&quot;&gt;Amazon Bedrock AgentCore Gateway&lt;/a&gt; sends tool calls to &lt;a href=&quot;https://modelcontextprotocol.io/&quot;&gt;MCP&lt;/a&gt; tools under &lt;a href=&quot;https://www.cedarpolicy.com/&quot;&gt;Cedar&lt;/a&gt; policies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Model invocation and observability:&lt;/strong&gt; &lt;a href=&quot;https://aws.amazon.com/bedrock/&quot;&gt;Amazon Bedrock&lt;/a&gt; or &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-tools-runtime.html&quot;&gt;AgentCore Runtime&lt;/a&gt; runs the request, while &lt;a href=&quot;https://aws.amazon.com/cloudwatch/&quot;&gt;Amazon CloudWatch&lt;/a&gt; records metrics and traces. &lt;a href=&quot;https://aws.amazon.com/cloudwatch/omni/&quot;&gt;Amazon CloudWatch Omni&lt;/a&gt; can pull those traces into one view with the rest of your application telemetry.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt; token counts turn into spend, which you tag and attribute in &lt;a href=&quot;https://aws.amazon.com/aws-cost-management/aws-cost-explorer/&quot;&gt;AWS Cost Explorer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/operations-for-ai-on-aws/request-path.png&quot; alt=&quot;One request through the operations-for-AI stack in seven layers: 1 edge with AWS WAF managed rule groups, injection patterns and rate-based rules; 2 identity with an IAM role per agent and AgentCore Identity short-lived workload credentials; 3 content with Amazon Bedrock Guardrails pinned to a numbered version, checking prompt and response; 4 routing with a model gateway for model-tier access per team and AgentCore Gateway plus Policy with Cedar default deny per tool; 5 invocation with Amazon Bedrock quotas reserving input plus max_tokens and AgentCore Runtime agent sessions; 6 observability with CloudWatch Omni plus AgentCore Observability and logs data protection masking PII; 7 cost with Cost Explorer and Budgets plus Anomaly Detection&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 2: One request through the operations-for-AI stack, with the AWS control at each hop.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;edge-protection-and-identity&quot;&gt;Edge protection and identity&lt;/h2&gt;
&lt;p&gt;The first hop is AWS WAF. A &lt;a href=&quot;https://docs.aws.amazon.com/waf/latest/developerguide/web-acl.html&quot;&gt;web ACL&lt;/a&gt; could sit in front of the gateway. &lt;a href=&quot;https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups.html&quot;&gt;AWS managed rule groups&lt;/a&gt; cover common web threats and bad bots. Custom rules match known prompt-injection phrasings in the request body, and &lt;a href=&quot;https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-rate-based.html&quot;&gt;rate-based rules&lt;/a&gt; stop floods from a single source. WAF is cheap, and it cuts the volume that reaches the expensive layers.&lt;/p&gt;
&lt;p&gt;Identity comes next, in two separate steps. Authentication proves who is calling. Authorization decides what that caller may do.&lt;/p&gt;
&lt;p&gt;For agents, identity is the base layer for everything else. Each agent needs a verifiable identity of its own, permissions scoped to its job and an execution history you can trace. On AWS, that maps to an &lt;a href=&quot;https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html&quot;&gt;IAM role&lt;/a&gt; per agent and to &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/identity.html&quot;&gt;AgentCore Identity&lt;/a&gt;, which issues short-lived workload credentials when an agent calls a downstream API or tool. The agent never stores a long-lived secret. If it is compromised, the credential it holds expires soon after.&lt;/p&gt;
&lt;p&gt;Think in &lt;a href=&quot;https://aws.amazon.com/security/zero-trust/&quot;&gt;zero-trust&lt;/a&gt; terms here; you should be able to audit any action an agent takes, and you should be able to reverse it.&lt;/p&gt;
&lt;p&gt;Figure 3 shows how these pieces fit together for the chatbot example. AWS WAF screens traffic at the edge. Behind it, &lt;a href=&quot;https://aws.amazon.com/cognito/&quot;&gt;Amazon Cognito&lt;/a&gt; signs users in, and AgentCore Identity hands the agent short-lived credentials for each tool it calls.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/operations-for-ai-on-aws/edge-and-identity.png&quot; alt=&quot;Edge protection and identity on AWS: operators reach the app through Amazon CloudFront and an AWS WAF web ACL, sign in through an Amazon Cognito user pool that issues a JWT with a team claim, and only requests that pass the web ACL reach a LiteLLM model gateway on Amazon ECS in private subnets; the gateway validates the JWT and invokes the agent on AgentCore Runtime, AgentCore Identity swaps the agent’s workload identity for a short-lived token to call third-party tools such as GitHub, Jira and PagerDuty, AWS calls to Amazon Bedrock use the agent’s own IAM execution role, and AWS CloudTrail audits every API call&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 3: Edge protection and identity on AWS for the chatbot example.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;content-governance-with-amazon-bedrock-guardrails&quot;&gt;Content governance with Amazon Bedrock Guardrails&lt;/h2&gt;
&lt;p&gt;Once a request is authenticated and authorized, the guardrail checks what it says.&lt;/p&gt;
&lt;p&gt;Start one step earlier, with the data. Classify operational data by sensitivity before it flows through inference: which log fields contain customer data, and which tickets carry personal information.&lt;/p&gt;
&lt;p&gt;A Bedrock Guardrail contains different policy types.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-content-filters.html&quot;&gt;&lt;strong&gt;Content filters&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; harmful categories such as hate, insults, sexual content and violence, plus a prompt attack category that detects jailbreaks and prompt injection.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-denied-topics.html&quot;&gt;&lt;strong&gt;Denied topics&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; subjects the application must not discuss, described in plain language.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-word-filters.html&quot;&gt;&lt;strong&gt;Word filters&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; exact-match words and phrases, including a managed profanity list.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-sensitive-filters.html&quot;&gt;&lt;strong&gt;Sensitive information filters&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; detect or mask PII and custom regex entities.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-contextual-grounding-check.html&quot;&gt;&lt;strong&gt;Contextual grounding checks&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; flag responses that are not grounded in the source material, or not relevant to the query.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-automated-reasoning-checks.html&quot;&gt;&lt;strong&gt;Automated Reasoning checks&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; validate responses against logical rules you define.&lt;/p&gt;
&lt;p&gt;Guardrails run in both directions: on the prompt before inference and on the response after it. If your model runs outside Bedrock, the &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-use-independent-api.html&quot;&gt;ApplyGuardrail API&lt;/a&gt; runs the same checks on any text you pass it.&lt;/p&gt;
&lt;p&gt;Versioning is what turns a guardrail into an operational control. You edit the working draft. When it passes testing, you create a &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-versions-create.html&quot;&gt;numbered version&lt;/a&gt;; numbered versions are immutable. Production pins to that version. Pinning also gives you separation of duties. The team that writes guardrail policy promotes a version; the team that deploys agents consumes it. Promotion becomes the approval step.&lt;/p&gt;
&lt;h2 id=&quot;tool-access-mcp-agentcore-gateway-and-cedar&quot;&gt;Tool access: MCP, AgentCore Gateway and Cedar&lt;/h2&gt;
&lt;p&gt;After the content check, the gateway routes the request. Model-tier access decides which models a team may call. Tool-tier access decides which tools an agent may invoke; it runs through AgentCore Gateway, which turns &lt;a href=&quot;https://aws.amazon.com/lambda/&quot;&gt;Lambda functions&lt;/a&gt; and existing APIs (including other MCP servers) into tools behind one &lt;a href=&quot;/blog/model-context-protocol-mcp&quot;&gt;MCP&lt;/a&gt; endpoint.&lt;/p&gt;
&lt;p&gt;Tool authorization uses AgentCore Policy. You attach a policy engine to the gateway and write policies in Cedar, the open-source policy language AWS also uses in &lt;a href=&quot;https://aws.amazon.com/verified-permissions/&quot;&gt;Amazon Verified Permissions&lt;/a&gt;. The gateway evaluates every tool call against those policies before the tool runs. Cedar denies by default: a call goes through only if a permit policy matches, and any matching forbid wins. All of this happens at the gateway, outside the agent’s code.&lt;/p&gt;
&lt;p&gt;Figure 4 follows one tool call through the gateway. The policy engine sits between authentication and the target, so a denied call never reaches the tool.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/operations-for-ai-on-aws/tool-access.png&quot; alt=&quot;Tool access with AgentCore Gateway, Policy and Cedar: Team A and Team B agents on AgentCore Runtime call one MCP endpoint; each tool call passes inbound auth with a Cognito JWT, a Cedar policy engine with default deny, guardrails on tool input and output, and outbound auth through AgentCore Identity before reaching gateway targets (a Lambda restart_service function, an OpenAPI ticketing API, a query_logs MCP server and a Smithy model for AWS service APIs); a Cedar access matrix tested in CI allows Team A query_logs and Team B restart_service and denies the rest, the policy engine logs every allow and deny to CloudWatch Logs, and CloudTrail records gateway and policy changes&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 4: One tool call through AgentCore Gateway, AgentCore Policy and the gateway targets.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Tools are named by target and tool, joined by three underscores. A policy that lets agents restart services in staging, and nowhere else, can check the tool’s arguments:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;permit(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  principal,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  action == AgentCore::Action::&quot;OpsTarget___restart_service&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  resource == AgentCore::Gateway::&quot;&amp;#x3C;gateway-arn&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;when {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  context.input.environment == &quot;staging&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Two practical notes. First, the &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/policy-natural-language.html&quot;&gt;AgentCore CLI&lt;/a&gt; can generate Cedar from a plain-language prompt (&lt;code&gt;agentcore gateway policy generate&lt;/code&gt;). Review the output before you attach it; a generated policy is still a policy you own.&lt;/p&gt;
&lt;p&gt;Second, in &lt;code&gt;ENFORCE&lt;/code&gt; mode, the policy engine logs every decision to CloudWatch, which gives you an audit trail of what each agent tried to do.&lt;/p&gt;
&lt;p&gt;AgentCore Policy can also &lt;a href=&quot;https://aws.amazon.com/about-aws/whats-new/2026/06/amazon-bedrock-agentcore-policy-guardrails-generally-available&quot;&gt;apply Bedrock Guardrails at the gateway&lt;/a&gt;. It checks the inputs to tool calls and the outputs that come back, looking for prompt injection and sensitive data.&lt;/p&gt;
&lt;p&gt;Some teams restrict tools through the system prompt instead. The problem is that a model can be talked out of a system prompt instruction. A Cedar deny never reaches the model, so there is nothing to talk it out of.&lt;/p&gt;
&lt;h2 id=&quot;reliability-and-observability&quot;&gt;Reliability and observability&lt;/h2&gt;
&lt;p&gt;Agents fail in non-deterministic ways. For example, prompt drift and cascading decisions for multi-agent systems are notoriously difficult to troubleshoot and predict. Drift could hurt reliability and also inflate spend.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Quotas reserve tokens up front.&lt;/strong&gt; When a request arrives, Bedrock deducts input tokens plus &lt;code&gt;max_tokens&lt;/code&gt; from your &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/quotas-token-burndown.html&quot;&gt;tokens-per-minute quota&lt;/a&gt; before the model generates anything. It adjusts the figure as output arrives and returns unused tokens at the end. Output tokens also count against quota at a multiple (high for newer models; check the model card). Set &lt;code&gt;max_tokens&lt;/code&gt; close to what you need, and concurrency goes up.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Latency metrics need context.&lt;/strong&gt; &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/monitoring.html&quot;&gt;&lt;code&gt;InvocationLatency&lt;/code&gt;&lt;/a&gt; rises for many reasons; a longer prompt or a longer answer will move it. &lt;code&gt;TimeToFirstToken&lt;/code&gt; only applies to streaming.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Usage needs a team label.&lt;/strong&gt; Behind a shared gateway, Bedrock metrics show a single caller. The gateway’s request log knows who sent what. A &lt;a href=&quot;https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html&quot;&gt;CloudWatch Logs Insights&lt;/a&gt; query over that log group gives you tokens per team (field names depend on your gateway’s log format):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fields @timestamp, team, model, usage.total_tokens&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;| stats sum(usage.total_tokens) as tokens by team, model&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;| sort tokens desc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Trace the agent as well as the model.&lt;/strong&gt; &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html&quot;&gt;AgentCore Observability&lt;/a&gt; emits &lt;a href=&quot;https://opentelemetry.io/&quot;&gt;OpenTelemetry&lt;/a&gt; traces to CloudWatch, using the &lt;a href=&quot;https://opentelemetry.io/docs/specs/semconv/gen-ai/&quot;&gt;generative AI semantic conventions&lt;/a&gt;. Each session shows its traces. Each trace breaks down into spans for every model call and tool call, with token use and latency on each one. Agents on AgentCore Runtime get this with no extra setup; agents running elsewhere can send the same telemetry through the &lt;a href=&quot;https://aws-otel.github.io/&quot;&gt;AWS Distro for OpenTelemetry&lt;/a&gt;. The data lands in the &lt;a href=&quot;https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/GenAI-observability.html&quot;&gt;CloudWatch GenAI Observability dashboard&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One view across agents and applications.&lt;/strong&gt; Amazon CloudWatch Omni brings agent traces and application telemetry into one place, along with the infrastructure underneath. You create an Omni space in a central account, and it collects telemetry from your other accounts and Regions (and from other clouds such as Azure). Omni discovers services and maps their dependencies without manual setup.&lt;/p&gt;
&lt;p&gt;For agents, it adds a session explorer and a topology view of sub-agents and tools. When something breaks, you can ask questions in plain language, and Omni runs the investigation with AWS DevOps Agent.&lt;/p&gt;
&lt;p&gt;Metrics tell you that something changed. You still need a process for what happens next. Version everything that shapes behavior: prompts, policies, model IDs, and inference parameters. Run prompt output and tool integrations through a CI/CD pipeline. Omni covers part of this. Its Prompt Management feature versions prompt configurations and rolls them back, and experiments run one dataset against two agent variants, so you can compare quality scores and token use before you ship.&lt;/p&gt;
&lt;p&gt;Use &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/evaluations.html&quot;&gt;AgentCore Evaluations&lt;/a&gt; to score agent output against test sets, with &lt;a href=&quot;https://aws.amazon.com/step-functions/&quot;&gt;AWS Step Functions&lt;/a&gt; running the evaluation workflows. Treat a model upgrade like a database upgrade. Test the new model against the same suite, and keep a rollback path. Omni uses AgentCore Evaluations as its evaluator engine.&lt;/p&gt;
&lt;p&gt;Two trust metrics belong on the same dashboard as latency. Agreement rate shows how often the agent’s conclusion matches a human’s on the same input. Override rate shows how often a human reverses the agent. For incident response agents, I cover more &lt;a href=&quot;/blog/ai-tooling-for-sres#how-to-measure-success&quot;&gt;metrics worth tracking&lt;/a&gt; in a separate post.&lt;/p&gt;
&lt;h2 id=&quot;logs-forensics-and-pii&quot;&gt;Logs, forensics and PII&lt;/h2&gt;
&lt;p&gt;Observability creates its own security problem. Bedrock &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/model-invocation-logging.html&quot;&gt;model invocation logging&lt;/a&gt; records prompts and responses in plain text. That includes content the guardrail blocked. If someone pastes a customer’s email address into the ops chatbot, it now sits in a log group that half the platform team can read.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html&quot;&gt;CloudWatch Logs data protection policies&lt;/a&gt; deal with this. You attach a policy to the log group (or to the whole account) that names the data identifiers to find and mask:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  &quot;Name&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;bedrock-invocation-logs&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  &quot;Version&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;2021-06-01&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  &quot;Statement&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      &quot;Sid&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;audit&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      &quot;DataIdentifier&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;        &quot;arn:aws:dataprotection::aws:data-identifier/EmailAddress&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      &quot;Operation&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;&quot;Audit&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;&quot;FindingsDestination&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: {} } }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      &quot;Sid&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;mask&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      &quot;DataIdentifier&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;        &quot;arn:aws:dataprotection::aws:data-identifier/EmailAddress&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      &quot;Operation&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;&quot;Deidentify&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;&quot;MaskConfig&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: {} } }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Both statements must list the same identifiers. The audit statement records findings; the deidentify statement masks the value.&lt;/p&gt;
&lt;p&gt;The rest of the forensic trail follows standard AWS practice. &lt;a href=&quot;https://aws.amazon.com/cloudtrail/&quot;&gt;AWS CloudTrail&lt;/a&gt; records API activity, including every change to a guardrail or policy. Exported invocation logs go to &lt;a href=&quot;https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html&quot;&gt;Amazon S3 with Object Lock&lt;/a&gt;, so nobody can alter them after the fact. &lt;a href=&quot;https://aws.amazon.com/guardduty/&quot;&gt;Amazon GuardDuty&lt;/a&gt; watches for unusual API behavior from agent roles; &lt;a href=&quot;https://aws.amazon.com/config/&quot;&gt;AWS Config&lt;/a&gt; flags drift in the IAM policies and resource settings that agents depend on.&lt;/p&gt;
&lt;p&gt;Finally, limit the blast radius. Scope credentials per agent and per tool:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/operations-for-ai-on-aws/control-layers.png&quot; alt=&quot;What each control layer governs: content is governed by Bedrock Guardrails (what the model reads and says), tool actions by AgentCore Policy with Cedar (which tools an agent may call, with which arguments), log access by logs data protection and logs:Unmask (who may see sensitive values in the logs), and reach by IAM (what any component can touch at all); four separate layers, and a gap in one is not covered by the others&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 5: Four control layers and what each one governs.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;cost-governance&quot;&gt;Cost governance&lt;/h2&gt;
&lt;p&gt;In this era, you pay per token, and costs can grow quite fast if you are not on top of things.&lt;/p&gt;
&lt;p&gt;Start with attribution:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-create.html&quot;&gt;&lt;strong&gt;Application inference profiles&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; create a profile per team or application, tag it, and send that team’s requests through it. The &lt;a href=&quot;https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html&quot;&gt;cost allocation tags&lt;/a&gt; then show up in Cost Explorer.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/about-aws/whats-new/2026/04/bedrock-iam-cost-allocation&quot;&gt;&lt;strong&gt;IAM principal attribution&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; Bedrock allocates inference costs to IAM users and roles. Tag the roles with a team or cost center, activate the tags, and filter in Cost Explorer or in &lt;a href=&quot;https://docs.aws.amazon.com/cur/latest/userguide/table-dictionary-cur2.html&quot;&gt;CUR 2.0&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost Explorer grouping:&lt;/strong&gt; split Bedrock spend by model and inference type first. You want to see where the money goes before you split it by team.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gateway logs:&lt;/strong&gt; the per-team token query from the previous section gives near-real-time numbers between billing updates.&lt;/p&gt;
&lt;p&gt;Then add controls:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html&quot;&gt;&lt;strong&gt;Prompt caching&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; cache the long, repeated prefix, such as the system prompt and tool definitions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Right-sized models:&lt;/strong&gt; send classification and extraction to a small model. Keep the large model for the reasoning steps that need it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Anomaly detection and budgets:&lt;/strong&gt; &lt;a href=&quot;https://aws.amazon.com/aws-cost-management/aws-cost-anomaly-detection/&quot;&gt;AWS Cost Anomaly Detection&lt;/a&gt; catches unexpected spikes; &lt;a href=&quot;https://aws.amazon.com/aws-cost-management/aws-budgets/&quot;&gt;AWS Budgets&lt;/a&gt; sends alerts and enforces caps per team.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Token estimates before the call:&lt;/strong&gt; the &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/count-tokens.html&quot;&gt;CountTokens API&lt;/a&gt; returns the token count for a request without running inference, which helps you reject oversized requests early.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Telemetry cost:&lt;/strong&gt; agents produce a lot of telemetry, and Omni bills for ingestion and storage per GB, plus analytics (analytics up to five times the ingested volume is included).&lt;/p&gt;
&lt;p&gt;Report cost per decision next to agreement rate. Together they give an honest return figure: what each agent decision costs, and how often it is right.&lt;/p&gt;
&lt;h2 id=&quot;people-and-the-adoption-sequence&quot;&gt;People and the adoption sequence&lt;/h2&gt;
&lt;p&gt;The technical path needs owners:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workflow designers&lt;/strong&gt; own the workflows that call agents. They decide what happens when an agent fails, and where a human must step in. Every workflow they own has a documented failure path: a named person or a named fallback.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Platform owners&lt;/strong&gt; own the runtime, the gateway, the pipelines and the default controls. They pick the approved model catalog and the default guardrails. When they do the job well, a new agent reaches production without a one-off negotiation, because the platform already encodes the policy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Domain specialists&lt;/strong&gt; own the agents and MCP servers for their area: scope, prompts, tools, and evaluation suite. They should be able to state the agent’s success criteria and its escalation path in one sentence each.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Human-in-the-loop decision makers&lt;/strong&gt; are the experienced operators that agents escalate to. Their escalation volume is measured, and the escalation path has a staffing plan.&lt;/p&gt;
&lt;p&gt;A small center of excellence helps, as long as it enables teams instead of gating them. That group owns the model catalog, the MCP server registry, reference architectures and reusable guardrail and policy patterns.&lt;/p&gt;
&lt;p&gt;An adoption sequence for inspiration (the same idea as giving &lt;a href=&quot;/blog/ai-in-platform-engineering&quot;&gt;platform agents autonomy in stages&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Start with a model-based use case.&lt;/strong&gt; Classify support cases to surface systemic issues. The model only produces text, so it is easy to govern. You still have to build the pipelines, logging, cost attribution, and guardrails that agents will reuse later.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Run the first agent in shadow mode.&lt;/strong&gt; It observes alongside the team and takes no action. Compare its findings with what the humans concluded. Move on when agreement reaches the rate you set, measured on real incidents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Grant one narrow, reversible action.&lt;/strong&gt; One action, in one workflow, behind a human approval. Now the guardrails and the audit trail do real work. You also learn your true escalation volume.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Widen autonomy where the evidence supports it.&lt;/strong&gt; Remove the approval gate for the specific decisions that have a track record. Keep it everywhere else.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/operations-for-ai-on-aws/adoption-stages.png&quot; alt=&quot;Earning autonomy in four stages: stage 1, a model-based use case with text output only, builds pipelines, logs, cost tags and guardrails; stage 2, shadow mode, where the agent observes and takes no action, exits when the agreement rate meets your target; stage 3, one narrow reversible action behind approval, exits on a low override rate and a staffed escalation path; stage 4, earned autonomy, removes the gate per decision type only where the track record supports it, and keeps measuring&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 6: The four-stage adoption sequence, from a model-based use case to earned autonomy.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Before you build any of this on AgentCore, check whether a managed agent already covers the use case. AWS DevOps Agent handles incident investigation across AWS and hybrid environments. The six domains still apply to a managed service. Use them as your evaluation checklist.&lt;/p&gt;
&lt;h2 id=&quot;key-points&quot;&gt;Key points&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Controls follow the request path.&lt;/strong&gt; Put each control at the earliest hop that can enforce it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Separate the layers.&lt;/strong&gt; Bedrock Guardrails govern content. Cedar policies at AgentCore Gateway govern tool actions. Log masking governs who reads the logs, and IAM governs what any of it can reach.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plan for quotas.&lt;/strong&gt; Bedrock reserves input tokens plus &lt;code&gt;max_tokens&lt;/code&gt; up front. An oversized &lt;code&gt;max_tokens&lt;/code&gt; can throttle you while your token metrics still look fine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Attribute cost from day one.&lt;/strong&gt; Use application inference profiles or IAM principal tags, and check that prompt caching clears the model’s minimum.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Earn autonomy with numbers.&lt;/strong&gt; Start with a model-based use case, move to shadow mode, and widen scope only where agreement and override rates support it.&lt;/p&gt;
&lt;h2 id=&quot;frequently-asked-questions&quot;&gt;Frequently asked questions&lt;/h2&gt;
&lt;section class=&quot;faq&quot;&gt;&lt;h3 id=&quot;what-is-the-difference-between-ai-for-operations-and-operations-for-ai&quot;&gt;What is the difference between AI for operations and operations for AI?&lt;/h3&gt;&lt;p&gt;AI for operations is agents doing operations work: triaging tickets,
categorizing incidents, correlating logs and picking runbooks, as AWS
DevOps Agent does. Operations for AI is the foundation that makes any agent
safe to run: edge protection, identity, content guardrails, tool access,
observability and cost attribution.&lt;/p&gt;&lt;h3 id=&quot;how-do-you-stop-an-agent-from-calling-tools-it-should-not-use&quot;&gt;How do you stop an agent from calling tools it should not use?&lt;/h3&gt;&lt;p&gt;Attach an AgentCore Policy engine to AgentCore Gateway and write Cedar
policies. The gateway evaluates every tool call before the tool runs. Cedar
denies by default, so a call goes through only if a permit policy matches,
and any matching forbid wins. Restricting tools through the system prompt
is weaker, because a model can be talked out of a prompt instruction.&lt;/p&gt;&lt;h3 id=&quot;can-bedrock-guardrails-protect-a-model-that-runs-outside-bedrock&quot;&gt;Can Bedrock Guardrails protect a model that runs outside Bedrock?&lt;/h3&gt;&lt;p&gt;Yes. The ApplyGuardrail API runs the same checks on any text you pass it.
Guardrails also run in both directions: on the prompt before inference and
on the response after it.&lt;/p&gt;&lt;h3 id=&quot;why-should-production-pin-a-numbered-guardrail-version&quot;&gt;Why should production pin a numbered guardrail version?&lt;/h3&gt;&lt;p&gt;Numbered versions are immutable, so production behavior cannot change under
you. Pinning also separates duties: the team that writes guardrail policy
promotes a version, the team that deploys agents consumes it, and promotion
becomes the approval step.&lt;/p&gt;&lt;h3 id=&quot;why-does-bedrock-throttle-requests-when-token-metrics-look-fine&quot;&gt;Why does Bedrock throttle requests when token metrics look fine?&lt;/h3&gt;&lt;p&gt;Bedrock deducts input tokens plus &lt;code&gt;max_tokens&lt;/code&gt; from your tokens-per-minute
quota before the model generates anything, then returns unused tokens at
the end. An oversized &lt;code&gt;max_tokens&lt;/code&gt; reserves quota you never use. Set it
close to what you need, and concurrency goes up.&lt;/p&gt;&lt;h3 id=&quot;how-do-you-keep-pii-out-of-model-invocation-logs&quot;&gt;How do you keep PII out of model invocation logs?&lt;/h3&gt;&lt;p&gt;Invocation logging records prompts and responses in plain text, including
blocked content. Attach a CloudWatch Logs data protection policy to the log
group (or the account) with an audit statement and a deidentify statement
that list the same data identifiers. Viewing masked values then requires
&lt;code&gt;logs:Unmask&lt;/code&gt;.&lt;/p&gt;&lt;h3 id=&quot;how-do-you-attribute-bedrock-costs-to-teams&quot;&gt;How do you attribute Bedrock costs to teams?&lt;/h3&gt;&lt;p&gt;Create a tagged application inference profile per team or application and
send that team’s requests through it, or tag the IAM roles that call
Bedrock and activate those cost allocation tags. Both show up in Cost
Explorer and CUR 2.0. Gateway logs give near-real-time per-team token
numbers between billing updates.&lt;/p&gt;&lt;h3 id=&quot;when-should-an-agent-get-more-autonomy&quot;&gt;When should an agent get more autonomy?&lt;/h3&gt;&lt;p&gt;When the numbers support it. Start with a model-based use case, run the
first agent in shadow mode until its agreement rate meets your target, then
grant one narrow, reversible action behind human approval. Remove the
approval gate only for the specific decisions that have a track record.&lt;/p&gt;&lt;/section&gt;</content:encoded><category>ai-agents</category><category>aws</category><category>security</category><category>platform-engineering</category></item><item><title>How to Build Golden Paths in Platform Engineering</title><link>https://devopsmadness.com/blog/golden-paths-in-platform-engineering</link><guid isPermaLink="true">https://devopsmadness.com/blog/golden-paths-in-platform-engineering</guid><description>Golden paths as products: a few templates with minimal inputs and policy built in, versioned and owned, which agents use through the same API as humans.</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; A golden path is a supported, self-service route for a common
task. Use your ticket data to find the slow, frequent requests; build paths
for those first, keep inputs minimal and bake policy into the template. Then
run each path as a product: an owner, semantic versions, a changelog, a
deprecation date. Agents use the same paths through an API or MCP server,
with scoped identities and approval gates for production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform teams whose catalog has grown faster than
anyone maintains it. Measure adoption before DORA metrics.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/golden-paths-in-platform-engineering&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>platform-engineering</category><category>iac</category><category>ai-agents</category></item><item><title>AWS Lambda Web Functions</title><link>https://devopsmadness.com/blog/aws-lambda-web-functions</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-lambda-web-functions</guid><description>Lambda Web Functions run an unmodified Node.js web server on Lambda, with many requests per environment. What changed, when to use them, and a Hono demo.</description><pubDate>Fri, 16 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;aside class=&quot;tldr border-line rounded-lg border p-5&quot; aria-label=&quot;TL;DR&quot;&gt;&lt;p class=&quot;font-mono text-sm font-semibold&quot;&gt;TL;DR&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Lambda Web Functions run your &lt;em&gt;unmodified&lt;/em&gt; Node.js web server (Express,
Hono, Fastify, Next.js…) on Lambda, with a built-in HTTPS endpoint,
scale-to-zero and response streaming.&lt;/li&gt;
&lt;li&gt;The big change: &lt;strong&gt;one execution environment serves many requests at
once&lt;/strong&gt;. You pay for requests, &lt;em&gt;active&lt;/em&gt; CPU, and memory over each
environment’s lifetime.&lt;/li&gt;
&lt;li&gt;That makes them a great fit for I/O-bound HTTP apps.&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;text-muted font-mono text-xs&quot;&gt;Last verified against AWS docs: 16 Oct 2026&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;AWS &lt;a href=&quot;https://aws.amazon.com/blogs/aws/announcing-aws-lambda-web-functions-for-fast-consistent-web-app-performance-anywhere/&quot;&gt;announced Lambda Web Functions&lt;/a&gt; on 12 October 2026. Here is what changed, when to use them, and a small demo you can deploy with one command.&lt;/p&gt;
&lt;h2 id=&quot;what-changed&quot;&gt;What changed?&lt;/h2&gt;
&lt;p&gt;Classic Lambda (now called &lt;strong&gt;Event Functions&lt;/strong&gt;) gives you a handler, and each execution environment processes &lt;strong&gt;one request at a time&lt;/strong&gt;. To serve HTTP you put API Gateway or a Function URL in front and translate events into requests, often with an adapter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Web Functions&lt;/strong&gt; flip that model:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Event Functions (classic)&lt;/th&gt;
&lt;th&gt;Web Functions&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Programming model&lt;/td&gt;
&lt;td&gt;&lt;code&gt;handler(event, context)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A normal HTTP server listening on a port&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Requests per environment&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Many (dynamic, up to 128; default 64)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTP front door&lt;/td&gt;
&lt;td&gt;API Gateway / Function URL&lt;/td&gt;
&lt;td&gt;Built-in HTTPS endpoint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Billing&lt;/td&gt;
&lt;td&gt;Requests + duration × configured memory&lt;/td&gt;
&lt;td&gt;Requests + &lt;strong&gt;active CPU&lt;/strong&gt; + memory over environment lifetime&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Streaming&lt;/td&gt;
&lt;td&gt;Opt-in&lt;/td&gt;
&lt;td&gt;On by default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtimes&lt;/td&gt;
&lt;td&gt;Many&lt;/td&gt;
&lt;td&gt;Node.js 24 only (for now)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Triggers&lt;/td&gt;
&lt;td&gt;SQS, S3, Kinesis, EventBridge…&lt;/td&gt;
&lt;td&gt;HTTP only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The resource model has three pieces:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Web Function&lt;/strong&gt;: the app.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Revision&lt;/strong&gt;: an &lt;em&gt;immutable&lt;/em&gt; snapshot of code and config. Every deploy or config change creates a new one.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Endpoint&lt;/strong&gt;: an HTTPS domain that routes traffic to one or two revisions by weight. Canary and blue/green are built in, and each endpoint carries its own auth type, rate limit, and environment cap.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;when-to-use-them&quot;&gt;When to use them&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Great fit&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;I/O-bound APIs and BFFs.&lt;/strong&gt; A request waiting 200 ms on a database or an LLM API burns almost no CPU, and while it waits the same environment serves dozens of other requests. You aren’t billed for idle wall-clock time per request the way you are with Event Functions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Streaming LLM responses.&lt;/strong&gt; Server-Sent Events work with no configuration, and requests can run up to 15 minutes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SSR apps.&lt;/strong&gt; Next.js, React Router, and similar frameworks run their production servers as-is, with no separate hosting layer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;“Lift and shift” Express/Fastify apps.&lt;/strong&gt; No adapter, no rewrite. It runs locally exactly as it runs in Lambda.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spiky or low-traffic services.&lt;/strong&gt; Endpoints scale to zero, and you pay nothing while idle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Global apps.&lt;/strong&gt; A MultiRegion endpoint puts several Regions behind one domain with latency-based routing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;demo-one-hono-app-one-command&quot;&gt;Demo: one Hono app, one command&lt;/h2&gt;
&lt;p&gt;The demo is a &lt;a href=&quot;https://hono.dev/&quot;&gt;Hono&lt;/a&gt; server with no Lambda-specific code. You can find it &lt;a href=&quot;https://github.com/Imoustak/lambda-web-functions-demo&quot;&gt;in this repository&lt;/a&gt;. It has four routes:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Shows&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Static page served from the same deploy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /api/info&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Which execution environment served you, and how many requests it has in flight&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /api/work?ms=2000&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Simulated I/O wait, for testing concurrency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /api/stream&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;SSE token stream (an LLM-style response)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&quot;architecture&quot;&gt;Architecture&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws-lambda-web-functions/architecture.png&quot; alt=&quot;Demo architecture: a browser calls the HTTPS endpoint, which routes by weight to an immutable revision running on auto-scaled execution environments. S3 holds the code, IAM provides the execution role, and logs go to CloudWatch. CloudFront + WAF is an optional front door.&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Demo architecture: a browser calls the HTTPS endpoint, which routes by weight to an immutable revision running on auto-scaled execution environments. S3 holds the code, IAM provides the execution role, and logs go to CloudWatch. CloudFront + WAF is an optional front door.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&quot;the-demo-page&quot;&gt;The demo page&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws-lambda-web-functions/demo-page.png&quot; alt=&quot;The demo page with all three panels populated: environment info, a concurrency burst, and a streamed response&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The demo page with all three panels populated: environment info, a concurrency burst, and a streamed response&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&quot;the-only-lambda-part-of-the-code&quot;&gt;The only “Lambda” part of the code&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;host&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;port&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (process.env.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;AWS_LAMBDA_HTTP_ENDPOINT&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;localhost:3000&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;split&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;:&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;serve&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;({ fetch: app.fetch, hostname: host, port: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(port) });&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That’s it. The same file runs with &lt;code&gt;node index.js&lt;/code&gt; on your laptop.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/api/info&lt;/code&gt; shows which execution environment served you. &lt;code&gt;envId&lt;/code&gt; is a random ID generated once per environment at startup, and &lt;code&gt;served&lt;/code&gt; and &lt;code&gt;peakInFlight&lt;/code&gt; count the requests that environment has handled since then:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws-lambda-web-functions/api-info.png&quot; alt=&quot;GET /api/info response showing envId, region us-east-1, Node v24.21.0, inFlight, peakInFlight, and served counters&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;GET /api/info response showing envId, region us-east-1, Node v24.21.0, inFlight, peakInFlight, and served counters&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Module scope lives as long as the execution environment, which makes it a handy place to observe concurrency:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; ENV_ID&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; randomUUID&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;().&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;slice&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;); &lt;/span&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;// one per execution environment&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; inFlight &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, peakInFlight &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;app.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;/api/*&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#E36209;--shiki-dark:#FFAB70&quot;&gt;c&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#E36209;--shiki-dark:#FFAB70&quot;&gt;next&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  inFlight&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;; peakInFlight &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; Math.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;max&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(peakInFlight, inFlight);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  try&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; next&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(); } &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;finally&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; { inFlight&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;app.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;/api/work&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#E36209;--shiki-dark:#FFAB70&quot;&gt;c&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; sleep&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(c.req.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;query&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;ms&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;??&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 1000&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)); &lt;/span&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;// stands in for a DB/API call&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; c.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;json&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;({ envId: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;ENV_ID&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, peakInFlight });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Streaming uses nothing but Hono’s standard helper:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;app.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;/api/stream&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#E36209;--shiki-dark:#FFAB70&quot;&gt;c&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; streamSSE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(c, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#E36209;--shiki-dark:#FFAB70&quot;&gt;stream&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  for&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; word&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; of&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; words) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;    await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; stream.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;writeSSE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;({ event: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;token&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, data: word &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;    await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; sleep&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;120&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}));&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws-lambda-web-functions/stream-mid.png&quot; alt=&quot;Streamed response building up token by token, mid-stream&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws-lambda-web-functions/stream-complete.png&quot; alt=&quot;Completed stream, tagged with the execution environment that served it&quot;/&gt;&lt;/p&gt;
&lt;h3 id=&quot;deploy&quot;&gt;Deploy&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; app&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; &amp;#x26;&amp;#x26; &lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --omit=dev&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; &amp;#x26;&amp;#x26; &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; ..&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;aws&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; lambda-web&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; deploy&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  --name&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; wf-blog-demo&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  --code&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; ./app&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  --create&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  --region&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; us-east-1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  --endpoint-name&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; demo&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  --auth-type&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; ApplicationManaged&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  --timeout-seconds&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 60&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  --max-environments&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 30&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  --rate-limit&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 500&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On first run, &lt;code&gt;deploy&lt;/code&gt; zips the folder and creates a versioned S3 bucket and an execution role. It then creates the function, its first revision, and a HomeRegion endpoint, and prints the URL:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://&amp;#x3C;id&gt;.&amp;#x3C;cell&gt;.lambda-web.us-east-1.on.aws&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The endpoint went Active within seconds of the upload. Later deploys run the same command; each one creates a new revision, and the endpoint (in LatestRevision mode) picks it up automatically.&lt;/p&gt;
&lt;p&gt;Even for a demo, set &lt;code&gt;--max-environments&lt;/code&gt; and &lt;code&gt;--rate-limit&lt;/code&gt; on any public endpoint. Together they put a ceiling on your bill.&lt;/p&gt;
&lt;h2 id=&quot;frequently-asked-questions&quot;&gt;Frequently asked questions&lt;/h2&gt;
&lt;section class=&quot;faq&quot;&gt;&lt;h3 id=&quot;what-are-aws-lambda-web-functions&quot;&gt;What are AWS Lambda Web Functions?&lt;/h3&gt;&lt;p&gt;A Lambda form factor that runs a normal Node.js HTTP server (Express,
Hono, Fastify, Next.js and similar) without changes. Each function gets a
built-in HTTPS endpoint, scales to zero when idle, and streams responses
by default.&lt;/p&gt;&lt;h3 id=&quot;how-are-web-functions-different-from-classic-lambda-functions&quot;&gt;How are Web Functions different from classic Lambda functions?&lt;/h3&gt;&lt;p&gt;Classic Lambda, now called Event Functions, calls a handler and processes
one request per execution environment. Web Functions run a server
listening on a port, and one environment serves many requests at once:
up to 128, with a default of 64. They also come with their own HTTPS
endpoint, so you don’t need API Gateway or a Function URL in front.&lt;/p&gt;&lt;h3 id=&quot;how-are-web-functions-billed&quot;&gt;How are Web Functions billed?&lt;/h3&gt;&lt;p&gt;You pay for requests, active CPU, and memory over each environment’s
lifetime. A request waiting on a database or an LLM API burns almost no
CPU, so you aren’t billed for that idle wall-clock time the way you are
with Event Functions.&lt;/p&gt;&lt;h3 id=&quot;do-i-need-to-change-my-code-to-run-on-web-functions&quot;&gt;Do I need to change my code to run on Web Functions?&lt;/h3&gt;&lt;p&gt;Barely. The server has to listen on the host and port in the
&lt;code&gt;AWS_LAMBDA_HTTP_ENDPOINT&lt;/code&gt; environment variable. In the demo that is two
lines, and the same file still runs with &lt;code&gt;node index.js&lt;/code&gt; locally.&lt;/p&gt;&lt;h3 id=&quot;how-do-canary-and-bluegreen-deployments-work&quot;&gt;How do canary and blue/green deployments work?&lt;/h3&gt;&lt;p&gt;Every deploy or config change creates an immutable revision. An endpoint
routes traffic to one or two revisions by weight, so you shift traffic
between them. In LatestRevision mode, the endpoint picks up each new
revision automatically.&lt;/p&gt;&lt;h3 id=&quot;how-do-i-keep-the-bill-under-control-on-a-public-endpoint&quot;&gt;How do I keep the bill under control on a public endpoint?&lt;/h3&gt;&lt;p&gt;Set &lt;code&gt;--max-environments&lt;/code&gt; and &lt;code&gt;--rate-limit&lt;/code&gt; on the endpoint. Together
they cap how far it can scale and how many requests it accepts, which
puts a ceiling on your bill.&lt;/p&gt;&lt;/section&gt;</content:encoded><category>aws</category><category>devops-tooling</category></item><item><title>AI in Platform Engineering: When Agents Join Your Platform</title><link>https://devopsmadness.com/blog/ai-in-platform-engineering</link><guid isPermaLink="true">https://devopsmadness.com/blog/ai-in-platform-engineering</guid><description>Agents are a new class of platform user. Give each one an identity, an owner, spend caps and audit logs, then widen its autonomy in stages as it earns trust.</description><pubDate>Thu, 15 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Agents now act on infrastructure, so treat them as platform
users that make mistakes. Each one gets a short-lived identity, a named
owner, spend caps and a searchable audit log; model and tool access runs
through governed gateways. The article lays out a five-stage path from
fixing platform quality to autonomy by exception. It also names the open
problems: non-determinism, cost forecasting, moving standards and skills.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform teams being asked to let agents into
their internal developer platform. Fix the platform first; agents amplify
its weak spots.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ai-in-platform-engineering&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ai-agents</category><category>platform-engineering</category><category>security</category></item><item><title>AI tooling for SREs</title><link>https://devopsmadness.com/blog/ai-tooling-for-sres</link><guid isPermaLink="true">https://devopsmadness.com/blog/ai-tooling-for-sres</guid><description>A map of AI SRE agents in 2026: where they fit in the incident workflow, the main tools by category, guardrails, platform readiness and what to measure.</description><pubDate>Thu, 15 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;aside class=&quot;tldr border-line rounded-lg border p-5&quot; aria-label=&quot;TL;DR&quot;&gt;&lt;p class=&quot;font-mono text-sm font-semibold&quot;&gt;TL;DR&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Almost every observability vendor and cloud provider now ships an agent
that investigates alerts on its own. Most teams still keep a human
between the agent and production changes.&lt;/li&gt;
&lt;li&gt;An agent is only as good as the context it can see and the tools it can
call. Ownership, telemetry, change history and alert quality decide how
far it gets.&lt;/li&gt;
&lt;li&gt;Measure utilization, accuracy, impact and cost on top of your core
reliability metrics, with a baseline taken before rollout.&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;text-muted font-mono text-xs&quot;&gt;Last verified against vendor docs: 15 Oct 2026&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;If you have been on call for a nasty production incident and tried to figure out what’s happening, jumping from console to console and checking logs across multiple systems, you have felt the pain of a real site reliability engineer. I am coming from an SRE background, so I have definitely been there.&lt;/p&gt;
&lt;p&gt;AI and agents have gone mainstream for code generation, but they are trending up in the SRE tooling category as well. Let’s take a look at how this space is evolving as almost every observability vendor and cloud provider now ships an agent that investigates alerts on its own.&lt;/p&gt;
&lt;h2 id=&quot;where-ai-fits-in-the-sre-workflow&quot;&gt;Where AI fits in the SRE workflow&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Detect and triage:&lt;/strong&gt; This is the oldest and most proven use of machine learning in operations. Tools group related alerts and manage noise. Event correlation platforms such as &lt;a href=&quot;https://www.bigpanda.io/&quot;&gt;BigPanda&lt;/a&gt; and &lt;a href=&quot;https://www.servicenow.com/products/it-operations-management.html&quot;&gt;ServiceNow&lt;/a&gt; have done this for years.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Investigate:&lt;/strong&gt; The agent forms hypotheses about the cause. It queries metrics, logs, traces, and recent changes, then shares findings. The promise here is to reduce incident investigation time for operators as much as possible.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remediate:&lt;/strong&gt; The next step is to attempt to fix the issue. The spectrum here varies from suggestions to opening pull requests, running a runbook, restarting services, or performing actions on a platform. In reality, most teams aren’t yet comfortable letting agents auto-operate and auto-remediate production systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Learn and prevent:&lt;/strong&gt; After the incident, AI drafts the postmortem timeline and links the incident to similar past ones.&lt;/p&gt;
&lt;h2 id=&quot;how-an-ai-sre-agent-works&quot;&gt;How an AI SRE agent works&lt;/h2&gt;
&lt;p&gt;Most agents run a similar loop: alerts fire, agents pull context and form hypotheses. They collect more data and evidence and possibly run investigation commands to finalize which hypothesis to accept.&lt;/p&gt;
&lt;p&gt;Two things decide the quality of that loop: the &lt;strong&gt;context&lt;/strong&gt; the agent can see, and the &lt;strong&gt;tools&lt;/strong&gt; it has available.&lt;/p&gt;
&lt;p&gt;Context means telemetry, service topology, deploy and config history, runbooks, ownership data and past incidents. Most agents now reach tools through the &lt;a href=&quot;/blog/model-context-protocol-mcp&quot;&gt;Model Context Protocol (MCP)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To improve accuracy of these agents, some vendors pair language models with deterministic analysis. We see more and more topology graphs and causal engines being part of these solutions.&lt;/p&gt;
&lt;p&gt;Agents can also pass work to each other. Observability-focused agents can be used to send information to remediation-focused agents that open PRs or perform hot-fixes, while incident management agents update live cases with everything that happens.&lt;/p&gt;
&lt;h2 id=&quot;ai-sre-tools-in-2026&quot;&gt;AI SRE tools in 2026&lt;/h2&gt;
&lt;h3 id=&quot;agents-inside-observability-platforms&quot;&gt;Agents inside observability platforms&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://www.datadoghq.com/product/ai/bits-ai-sre/&quot;&gt;Datadog Bits AI SRE&lt;/a&gt;:&lt;/strong&gt; It starts an investigation when a monitor fires and tests hypotheses against telemetry and runbooks. The conclusion is posted to &lt;a href=&quot;https://slack.com/&quot;&gt;Slack&lt;/a&gt; or your incident tool.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://grafana.com/whats-new/2026-07-29-assistant-investigations-is-now-generally-available-in-grafana-cloud/&quot;&gt;Grafana Assistant Investigations&lt;/a&gt;:&lt;/strong&gt; Grafana Labs moved Investigations to general availability in July 2026, together with its &lt;a href=&quot;https://grafana.com/press/2026/07/27/grafana-labs-ships-six-tools-that-power-agentic-operations-from-planning-to-production/&quot;&gt;Cloud MCP server&lt;/a&gt; and an agentic CLI called &lt;a href=&quot;https://grafana.com/press/2026/07/27/grafana-labs-ships-six-tools-that-power-agentic-operations-from-planning-to-production/&quot;&gt;gcx&lt;/a&gt;. The agent forms hypotheses and checks them against your Grafana data. Engineers can steer it mid-run, or wait for the report at the end. It suits teams already on the Grafana LGTM stack (&lt;a href=&quot;https://grafana.com/oss/loki/&quot;&gt;Loki&lt;/a&gt;, &lt;a href=&quot;https://grafana.com/oss/grafana/&quot;&gt;Grafana&lt;/a&gt;, &lt;a href=&quot;https://grafana.com/oss/tempo/&quot;&gt;Tempo&lt;/a&gt;, &lt;a href=&quot;https://grafana.com/oss/mimir/&quot;&gt;Mimir&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://www.dynatrace.com/news/press-release/dynatrace-intelligence-redefines-observability/&quot;&gt;Dynatrace Intelligence&lt;/a&gt;:&lt;/strong&gt; It pairs the existing causal engine (formerly Davis AI) with agents that act inside set guardrails.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://www.checklyhq.com/docs/ai/rocky-ai&quot;&gt;Checkly Rocky AI&lt;/a&gt;:&lt;/strong&gt; Rocky’s starting point is a failing synthetic check, such as a &lt;a href=&quot;https://playwright.dev/&quot;&gt;Playwright&lt;/a&gt; browser flow, an API call, a DNS lookup, or a TCP check. Each analysis has four parts: a classification (an infrastructure error or a downstream dependency, for example), the root cause, the user impact, and a suggested fix.&lt;/p&gt;
&lt;h3 id=&quot;cloud-provider-agents&quot;&gt;Cloud provider agents&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://aws.amazon.com/devops-agent/&quot;&gt;AWS DevOps Agent&lt;/a&gt;:&lt;/strong&gt; When an alarm fires, the agent starts investigating, using a topology it builds from telemetry and code. Afterward, it recommends changes. Integrations include &lt;a href=&quot;https://aws.amazon.com/cloudwatch/&quot;&gt;CloudWatch&lt;/a&gt;, Datadog, Dynatrace, Grafana, &lt;a href=&quot;https://www.pagerduty.com/&quot;&gt;PagerDuty&lt;/a&gt;, &lt;a href=&quot;https://github.com/&quot;&gt;GitHub&lt;/a&gt;, and ServiceNow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/sre-agent/overview&quot;&gt;Azure SRE Agent&lt;/a&gt;:&lt;/strong&gt; It reads &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-monitor/&quot;&gt;Azure Monitor&lt;/a&gt; data, including &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview&quot;&gt;Application Insights&lt;/a&gt; and &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-monitor/logs/log-analytics-overview&quot;&gt;Log Analytics&lt;/a&gt;. It also connects to GitHub, &lt;a href=&quot;https://azure.microsoft.com/en-us/products/devops&quot;&gt;Azure DevOps&lt;/a&gt;, &lt;a href=&quot;https://www.atlassian.com/software/jira&quot;&gt;Jira&lt;/a&gt;, and Slack.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://docs.cloud.google.com/cloud-assist/investigations&quot;&gt;Gemini Cloud Assist Investigations&lt;/a&gt;:&lt;/strong&gt; Google’s root cause agent analyses &lt;a href=&quot;https://cloud.google.com/logging&quot;&gt;Cloud Logging&lt;/a&gt; data and configuration changes from &lt;a href=&quot;https://cloud.google.com/asset-inventory/docs/overview&quot;&gt;Cloud Asset Inventory&lt;/a&gt;. It ranks its observations and suggests fixes. Its knowledge base includes Google SRE playbooks and Cloud support material.&lt;/p&gt;
&lt;h3 id=&quot;incident-management-platforms&quot;&gt;Incident management platforms&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://www.pagerduty.com/newsroom/pagerduty-operations-cloud-spring-2026-release/&quot;&gt;PagerDuty SRE Agent&lt;/a&gt;:&lt;/strong&gt; It joins the on-call roster and escalation policy as a virtual responder. It runs diagnostics before a human gets paged. PagerDuty plans a fully autonomous responder soon.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://incident.io/resolve-incidents-while-you-sleep&quot;&gt;incident.io Investigations&lt;/a&gt;:&lt;/strong&gt; incident.io’s agent works inside Slack. It links alerts and code changes to past incidents. It also pulls data from Grafana and Datadog, then drafts the postmortem. When the cause sits in code, an engineer can ask it to write a fix and open a pull request from the incident channel.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://rootly.com/&quot;&gt;Rootly&lt;/a&gt;:&lt;/strong&gt; Rootly adds AI to a Slack-first incident workflow. It links incidents to recent code changes, and it writes a catch-up summary for responders who join late.&lt;/p&gt;
&lt;p&gt;These platforms own the process. The telemetry lives elsewhere and is accessed through integrations, so their investigations go only as deep as the available connections.&lt;/p&gt;
&lt;h3 id=&quot;standalone-ai-sre-agents&quot;&gt;Standalone AI SRE agents&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://resolve.ai/&quot;&gt;Resolve AI&lt;/a&gt;:&lt;/strong&gt; One of the most prominent standalone players. It provides agents that triage, mitigate, and remediate issues, either (semi-)autonomously or alongside humans.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://traversal.com/&quot;&gt;Traversal&lt;/a&gt;:&lt;/strong&gt; Traversal builds a model of the production environment and runs a causal search across it. The search can follow a failure through many service hops. Focused on large enterprises with complex service graphs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://cleric.ai/&quot;&gt;Cleric&lt;/a&gt;:&lt;/strong&gt; Cleric checks changes in production and investigates regressions, producing fix PRs with the evidence to review them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://help.komodor.com/hc/en-us/articles/22447540595218&quot;&gt;Komodor Klaudia&lt;/a&gt;:&lt;/strong&gt; Komodor focuses on Kubernetes; Klaudia is its multi-agent system tuned for &lt;a href=&quot;https://kubernetes.io/&quot;&gt;Kubernetes&lt;/a&gt; failure modes.&lt;/p&gt;
&lt;h3 id=&quot;open-source-and-build-your-own&quot;&gt;Open source and build-your-own&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/HolmesGPT/holmesgpt&quot;&gt;HolmesGPT&lt;/a&gt;:&lt;/strong&gt; &lt;a href=&quot;https://home.robusta.dev/&quot;&gt;Robusta&lt;/a&gt; created HolmesGPT, now a CNCF Sandbox project. It breaks a question into tasks, queries &lt;a href=&quot;https://prometheus.io/&quot;&gt;Prometheus&lt;/a&gt;, Kubernetes events, logs, and runbooks, then returns a diagnosis.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://k8sgpt.ai/&quot;&gt;K8sGPT&lt;/a&gt;:&lt;/strong&gt; Also a CNCF Sandbox project. It runs analyzers across a cluster and explains Kubernetes errors in plain language. It supports local model backends and can anonymise data before anything reaches a model.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/GoogleCloudPlatform/kubectl-ai&quot;&gt;kubectl-ai&lt;/a&gt;:&lt;/strong&gt; Google’s open source assistant turns natural language into kubectl commands. It can also run as an MCP server, so other agents can call it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MCP servers plus a general agent:&lt;/strong&gt; Many teams now point a general-purpose coding agent (such as &lt;a href=&quot;https://www.claude.com/product/claude-code&quot;&gt;Claude Code&lt;/a&gt; or &lt;a href=&quot;https://openai.com/codex/&quot;&gt;Codex&lt;/a&gt;) at MCP servers for Grafana, Kubernetes, GitHub and their cloud provider, then add a short runbook prompt. This gives you control over the on-call investigation, and it offers a familiar interface for engineers.&lt;/p&gt;
&lt;p&gt;Open source also gives you control over the model and over where your data goes.&lt;/p&gt;
&lt;h2 id=&quot;trust-permissions-and-guardrails&quot;&gt;Trust, permissions and guardrails&lt;/h2&gt;
&lt;p&gt;Most SREs will still agree in 2026 that they wouldn’t be 100% confident to let an AI agent change production. Reversible actions like scaling capacity are probably ok, but things get scary on anything that touches data. &lt;a href=&quot;https://www.xurrent.com/blog/ai-sre-agent-survey&quot;&gt;Gartner 2026 research on infrastructure operations&lt;/a&gt; forecasts that human-in-the-loop in IT operations workflows will fall from 95% in 2025 to 40% by 2028.&lt;/p&gt;
&lt;p&gt;Autonomy usually grows in four levels:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read-only investigation:&lt;/strong&gt; The agent queries data and reports back, but can’t change anything.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Suggest and draft:&lt;/strong&gt; The agent proposes a fix as a pull request or a runbook step.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Act with approval:&lt;/strong&gt; The agent runs actions from an approved list after a human confirms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bounded autonomy:&lt;/strong&gt; The agent acts alone on a short list of reversible actions, such as scaling out, restarting a pod, rolling back a deploy, or turning off a feature flag. Automatic rollback kicks in if health checks fail.&lt;/p&gt;
&lt;p&gt;Keep these controls in place across solutions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Give every agent its own identity with least-privilege IAM.&lt;/li&gt;
&lt;li&gt;Log every query and action.&lt;/li&gt;
&lt;li&gt;Put approval gates on business-critical changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;platform-readiness-for-ai-agents&quot;&gt;Platform readiness for AI agents&lt;/h2&gt;
&lt;p&gt;An agent can only reason over what your platform exposes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ownership and documentation:&lt;/strong&gt; Every service has a defined owner, a README, and runbooks the agent can read. Many teams now add an &lt;a href=&quot;https://agents.md/&quot;&gt;AGENTS.md&lt;/a&gt; file to each repository, with context written for agents: how the service runs, where its logs live, which dashboards matter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Telemetry and topology:&lt;/strong&gt; Structured logs, metrics with consistent labels, and &lt;a href=&quot;https://opentelemetry.io/&quot;&gt;OpenTelemetry&lt;/a&gt; traces that cross service boundaries. A service catalog or dependency map gives the agent the relationships it needs to follow a failure from symptom to cause.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Change and rollback:&lt;/strong&gt; Deploy markers on dashboards, configuration changes tracked in Git, feature flags, and an automated rollback path.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Signal quality:&lt;/strong&gt; Alerts tied to SLOs, each one linked to a runbook.&lt;/p&gt;
&lt;h2 id=&quot;how-to-measure-success&quot;&gt;How to measure success&lt;/h2&gt;
&lt;p&gt;Here are a few high-level categories of metrics to track:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Utilization:&lt;/strong&gt; How much the team relies on the agent, and how often on-call engineers act on its findings. Measure how many postmortem drafts, user questions, and fix PRs you get on the tool.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Accuracy:&lt;/strong&gt; How often the agent is right. Track root cause precision (the top-ranked cause, confirmed in the postmortem) and false leads per investigation. Add the share of investigations that end inconclusive, and the share of suggested fixes merged without changes. Review these often; precision drifts as your systems change.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact:&lt;/strong&gt; Track time to first useful hypothesis, MTTR, escalations per incident, and active incident hours per on-call shift. Ask on-call engineers every quarter how they feel about using the tool.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt; Track total agent spend and cost per investigation, then set both against engineer hours saved.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/ai-tooling-for-sres/measuring-ai-sre-agents.png&quot; alt=&quot;Measuring AI SRE agents: four AI metric categories (utilization, accuracy, impact, cost) sit on top of core reliability metrics such as SLO attainment, error budget burn, change failure rate and incidents by severity&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;AI metrics on top of core reliability metrics&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Keep your core reliability metrics underneath all four. AI metrics describe what the agent does. SLO attainment, error budget burn, change failure rate and incident count by severity tell you whether reliability improved. Take a baseline before rollout and keep both sets on the same dashboard.&lt;/p&gt;
&lt;h2 id=&quot;frequently-asked-questions&quot;&gt;Frequently asked questions&lt;/h2&gt;
&lt;section class=&quot;faq&quot;&gt;&lt;h3 id=&quot;what-does-an-ai-sre-agent-do&quot;&gt;What does an AI SRE agent do?&lt;/h3&gt;&lt;p&gt;It investigates alerts on its own. When an alert fires, the agent pulls
context, forms hypotheses about the cause, queries metrics, logs, traces
and recent changes, then shares its findings. Some agents go further and
suggest fixes, open pull requests or run runbook steps.&lt;/p&gt;&lt;h3 id=&quot;how-do-ai-sre-agents-connect-to-my-tools&quot;&gt;How do AI SRE agents connect to my tools?&lt;/h3&gt;&lt;p&gt;Most agents now reach tools through the
&lt;a href=&quot;/blog/model-context-protocol-mcp&quot;&gt;Model Context Protocol (MCP)&lt;/a&gt;. The
quality of an investigation depends on the context the agent can see
(telemetry, topology, deploy history, runbooks, ownership, past incidents)
and the tools it can call.&lt;/p&gt;&lt;h3 id=&quot;which-category-of-ai-sre-tool-should-i-look-at&quot;&gt;Which category of AI SRE tool should I look at?&lt;/h3&gt;&lt;p&gt;Start from where your data lives. Observability platform agents work
directly on that vendor’s telemetry, such as Grafana Assistant on the LGTM
stack. Incident management platforms own the process, but their
investigations only go as deep as their integrations. Open source tools
and MCP servers with a general agent give you control over the model and
over where your data goes.&lt;/p&gt;&lt;h3 id=&quot;should-i-let-an-ai-agent-fix-production-on-its-own&quot;&gt;Should I let an AI agent fix production on its own?&lt;/h3&gt;&lt;p&gt;Most teams are not there yet. Grow autonomy in levels: read-only
investigation, then suggest and draft, then act with approval, then
bounded autonomy on a short list of reversible actions such as scaling
out or rolling back a deploy. Keep approval gates on business-critical
changes and anything that touches data.&lt;/p&gt;&lt;h3 id=&quot;what-does-my-platform-need-before-i-add-an-ai-sre-agent&quot;&gt;What does my platform need before I add an AI SRE agent?&lt;/h3&gt;&lt;p&gt;Defined owners, READMEs and runbooks for every service (many teams add an
AGENTS.md file per repository). Structured logs, consistently labelled
metrics and OpenTelemetry traces, plus a service catalog or dependency
map. Deploy markers, config changes tracked in Git and an automated
rollback path. Alerts tied to SLOs, each linked to a runbook.&lt;/p&gt;&lt;h3 id=&quot;how-do-i-measure-whether-an-ai-sre-agent-is-working&quot;&gt;How do I measure whether an AI SRE agent is working?&lt;/h3&gt;&lt;p&gt;Track four categories: utilization, accuracy, impact and cost. Keep core
reliability metrics such as SLO attainment, error budget burn, change
failure rate and incidents by severity underneath them. Take a baseline
before rollout and keep both sets on the same dashboard.&lt;/p&gt;&lt;/section&gt;</content:encoded><category>ai-agents</category><category>devops-tooling</category><category>platform-engineering</category></item><item><title>Simplify application migrations to AWS with Elastic Beanstalk</title><link>https://devopsmadness.com/blog/simplify-application-migrations-to-aws-with-elastic-beanstalk</link><guid isPermaLink="true">https://devopsmadness.com/blog/simplify-application-migrations-to-aws-with-elastic-beanstalk</guid><description>Elastic Beanstalk adds Cluster Mode on EKS Auto Mode: one managed platform for lift-and-shift .NET apps and for teams moving off Heroku-style PaaS.</description><pubDate>Thu, 17 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Elastic Beanstalk now has two modes. Standard gives each app
its own EC2 instances. Cluster Mode can run and manage your apps in
containers without caring about the underlying cluster (an
AWS-managed EKS Auto Mode cluster). If you are looking for a PaaS
alternative such as Heroku or Render on AWS, look no further! We walk two
paths: a lift and shift of a legacy .NET Framework app, and a six-step
move off a PaaS like Heroku, ending in a Route 53 weighted cutover.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams whose app count outgrew their ops
capacity, and anyone planning to leave a PaaS for their own AWS account.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/migration-and-modernization/simplify-application-migrations-to-aws-with-elastic-beanstalk/&quot;&gt;Read the full article on AWS →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>containers</category><category>platform-engineering</category></item><item><title>Guardrails for AI-Generated Infrastructure</title><link>https://devopsmadness.com/blog/guardrails-for-ai-generated-infrastructure</link><guid isPermaLink="true">https://devopsmadness.com/blog/guardrails-for-ai-generated-infrastructure</guid><description>Five layers of guardrails for AI-written infrastructure code: before generation, at review, at apply, after apply, and the policy that ties them together.</description><pubDate>Tue, 25 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; 93% of organizations have had at least one
AI-caused infrastructure incident; 76% of infrastructure teams would apply
AI-generated HCL to production with little or no review. Review capacity
has not kept up. This article walks the whole lifecycle from before
generation to after applying infrastructure changes. Control what gets
generated, verify at review, gate the apply, and measure what happens
after.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Target controls and guardrails at every level: before generation, at
review, at apply, after apply, across the organization. Guardrails are
important for AI workflows to keep incidents, misconfigurations and
security concerns under control when letting agents loose.&lt;/li&gt;
&lt;li&gt;Treat agent output as untrusted. The risky combination for AI agents is
access to private data, exposure to untrusted content, and the ability
to act externally. To mitigate this, gate changes to important systems
with pull requests. CI runs static analysis, secret scanning, OPA
policies and cost checks. Agents get their own short-lived identities,
destroy is denied by default, and production needs a human sign-off.&lt;/li&gt;
&lt;li&gt;The work does not end at apply. Scheduled
&lt;a href=&quot;/blog/what-is-configuration-drift&quot;&gt;drift detection&lt;/a&gt; and session logs
close the loop. Measuring is the weak spot: only 15% of teams track how
much of their IaC is AI-generated. Start with review-stage controls,
then apply gates, then measure; build golden modules last.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; any platform, DevOps, SRE and security teams
experimenting with AI and letting agents write and interact with IaC
workflows. When the agent itself becomes the workload you run,
&lt;a href=&quot;/blog/building-an-agent-control-plane-on-aws&quot;&gt;building an agent control plane on AWS&lt;/a&gt;
is the follow-up read.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/guardrails-for-ai-generated-infrastructure&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ai-agents</category><category>iac</category><category>security</category><category>platform-engineering</category></item><item><title>Building an Agent Control Plane on AWS</title><link>https://devopsmadness.com/blog/building-an-agent-control-plane-on-aws</link><guid isPermaLink="true">https://devopsmadness.com/blog/building-an-agent-control-plane-on-aws</guid><description>How to build an agent control plane on AWS: lifecycle, identity, tool governance, policy, guardrails, sandboxed execution, and detection with AgentCore.</description><pubDate>Wed, 12 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;aside class=&quot;tldr border-line rounded-lg border p-5&quot; aria-label=&quot;TL;DR&quot;&gt;&lt;p class=&quot;font-mono text-sm font-semibold&quot;&gt;TL;DR&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Agents are the next big workload that needs to be hosted, governed,
observed.&lt;/li&gt;
&lt;li&gt;Gartner expects the average Fortune 500 company to run more than
150,000 agents by 2028. The controls have to catch up.&lt;/li&gt;
&lt;li&gt;Registry, identity, governed gateway, policy, guardrails, telemetry,
evaluations: AWS gives you all the building blocks for a robust
control plane.&lt;/li&gt;
&lt;li&gt;Most of agentic development is not adjusting the models themselves
but the harness, tools, and infrastructure around them.&lt;/li&gt;
&lt;/ul&gt;&lt;/aside&gt;
&lt;p&gt;Gartner expects the average Fortune 500 company to run more than 150,000 AI agents by 2028. In 2025, the same companies ran fewer than 15. Agents and AI models have been moving faster than the controls around them.&lt;/p&gt;
&lt;p&gt;Models are increasingly becoming a swappable commodity though. Users adjust to changing a foundation model as a simple configuration change. What seems to be the more durable engineering investment; the tool layer your agents depend on such as the catalog, the credentials, the hosting, the discovery path.&lt;/p&gt;
&lt;p&gt;With so many &lt;a href=&quot;/blog/agentic-ai-deployment-with-infrastructure-as-code&quot;&gt;agents moving to production&lt;/a&gt;, we need a well-defined platform to list which agents exist, what permissions they have, and what they do.&lt;/p&gt;
&lt;p&gt;Platform teams have been shifting to accommodate exactly these problems with agent control plane implementations. Agents became the next type of workload requiring deterministic policy enforcement, sitting outside the agent’s reasoning loop.&lt;/p&gt;
&lt;p&gt;The control plane registers them, issues their identities, brokers their credentials, authorizes each tool call, records everything, and monitors how they operate.&lt;/p&gt;
&lt;p&gt;AWS has all the primitives we need to build a robust agent-first control plane. This post walks through the architecture.&lt;/p&gt;
&lt;h2 id=&quot;the-shape-of-the-control-plane&quot;&gt;The shape of the control plane&lt;/h2&gt;
&lt;p&gt;An agent control plane is responsible for:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Lifecycle.&lt;/strong&gt; Register your agents, version them, offer golden templates for common use cases and starting points, promote them, and retire them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Identity.&lt;/strong&gt; Give each agent its own well-scoped identity with least privilege and short-lived credentials.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool governance.&lt;/strong&gt; Put one governed path between agents and the tools, APIs, and data they call.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Policy enforcement.&lt;/strong&gt; Authorize every action against explicit rules.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Guardrails and secure execution.&lt;/strong&gt; Monitor, inspect, and validate content in and out of agents. Run agent code in isolated and dedicated sandboxes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observability and audit.&lt;/strong&gt; Trace every agent session and make operational, behavioral, and reasoning logs available.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Posture and detection.&lt;/strong&gt; Inventory all the agents that exist and operate in your estate. Automatically detect misuse, flag issues, and alert and (auto)remediate.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/bedrock/agentcore/&quot;&gt;Amazon Bedrock AgentCore&lt;/a&gt; covers many of these responsibilities with its component services: &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-tools-runtime.html&quot;&gt;Runtime&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/identity.html&quot;&gt;Identity&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html&quot;&gt;Gateway&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/policy.html&quot;&gt;Policy&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/memory.html&quot;&gt;Memory&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/evaluations.html&quot;&gt;Evaluations&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/code-interpreter-tool.html&quot;&gt;Code Interpreter&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/browser-tool.html&quot;&gt;Browser&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/optimization.html&quot;&gt;Optimization&lt;/a&gt;, and &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html&quot;&gt;Observability&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The story is complemented by other surrounding AWS services: &lt;a href=&quot;https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html&quot;&gt;Amazon S3&lt;/a&gt; for storage, &lt;a href=&quot;https://aws.amazon.com/iam/&quot;&gt;AWS IAM&lt;/a&gt; for permissions, &lt;a href=&quot;https://aws.amazon.com/bedrock/&quot;&gt;Amazon Bedrock&lt;/a&gt; for model access, &lt;a href=&quot;https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html&quot;&gt;AWS CloudTrail&lt;/a&gt;, &lt;a href=&quot;https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html&quot;&gt;AWS X-Ray&lt;/a&gt;, and &lt;a href=&quot;https://aws.amazon.com/cloudwatch/&quot;&gt;Amazon CloudWatch&lt;/a&gt; for overall observability and governance, &lt;a href=&quot;https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-v2-ai-inventory.html&quot;&gt;AWS Security Hub AI inventory&lt;/a&gt; and &lt;a href=&quot;https://docs.aws.amazon.com/guardduty/latest/ug/ai-protection.html&quot;&gt;Amazon GuardDuty AI Protection&lt;/a&gt; for watching and protecting your running agents. The new &lt;a href=&quot;https://docs.aws.amazon.com/lambda/latest/dg/microvms-how-it-works.html&quot;&gt;Lambda MicroVMs&lt;/a&gt; offering can add another self-managed tier useful for code development environments and AI code execution sandboxes. A new class of managed agents, which AWS calls &lt;a href=&quot;https://aws.amazon.com/ai/frontier-agents/&quot;&gt;frontier agents&lt;/a&gt;, can help operate, debug, and secure the platform itself.&lt;/p&gt;
&lt;p&gt;Diagram 1 shows the layers and the AWS services aligned:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/agent-control-plane/diagram-1.png&quot; alt=&quot;Layered architecture of an agent control plane on AWS: applications, coding assistants, and external agents enter through a control plane with lifecycle, identity, governance and policy, secure execution, observability and audit, and posture and detection layers, reaching Lambda APIs, MCP servers, SaaS, and data stores, while frontier agents operate the platform through telemetry and actions&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Diagram 1: The agent control plane on AWS, with frontier agents operating it.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;lifecycle-layer&quot;&gt;Lifecycle layer&lt;/h2&gt;
&lt;p&gt;AgentCore Runtime hosts the agents themselves. It is framework-agnostic, supporting any framework or model you want to bring along, such as LangGraph, CrewAI, Strands, or OpenAI Agents SDK, and each deployment gets versioned endpoints. This allows you to promote or roll back an agent safely.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/registry.html&quot;&gt;AWS Agent Registry&lt;/a&gt; adds the catalog listing agents, their skills, and their tools. Registration becomes the entry ticket to the platform in order to get an identity and get deployed.&lt;/p&gt;
&lt;p&gt;To ensure that agents perform the way they should, AgentCore Evaluations offer an automatic method. &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/batch-evaluations.html&quot;&gt;Batch evaluations&lt;/a&gt; replay curated sessions in CI, so a prompt or model change that degrades the overall system fails the build. &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/online-evaluations.html&quot;&gt;Online evaluations&lt;/a&gt; sample production traces continuously and score them with built-in evaluators for goal success, tool selection accuracy, faithfulness, and harmfulness, plus &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/custom-evaluators.html&quot;&gt;custom evaluators&lt;/a&gt; for your own criteria. Scores land in CloudWatch, where alarms can trigger a rollback. A/B testing splits live traffic when you want evidence before a full promotion.&lt;/p&gt;
&lt;p&gt;New agents start with narrow tool access and a human approval step. Sustained evaluation scores widen the permissions and provide confidence to move towards autonomous agent scenarios.&lt;/p&gt;
&lt;h2 id=&quot;identity-and-least-privilege&quot;&gt;Identity and least privilege&lt;/h2&gt;
&lt;p&gt;The control plane is responsible to give agents their own identity:&lt;/p&gt;
&lt;p&gt;AgentCore Identity maintains a directory of workload identities. Each agent gets its own entry with an ARN. Alongside the directory sits a token vault, encrypted with KMS keys you can own, which stores the OAuth tokens, client credentials, and API keys agents need for external systems. Agents never hold these secrets, but they request them at run time. The vault provides the required credentials only against proof of the appropriate workload identity.&lt;/p&gt;
&lt;p&gt;The vault can reference secrets you already manage in &lt;a href=&quot;https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html&quot;&gt;AWS Secrets Manager&lt;/a&gt;, keeping rotation in one place.&lt;/p&gt;
&lt;p&gt;Inbound, agents and gateways authenticate callers with IAM SigV4 or with JWTs from any OIDC provider: Cognito, Okta, or Entra ID.&lt;/p&gt;
&lt;p&gt;Outbound is where least privilege gets enforced. The On-Behalf-Of token exchange takes the inbound user token and exchanges it for a downstream token scoped to the specific resource, short-lived, and carrying both the agent’s identity and the original caller’s. Every hop downstream can authorize against both.&lt;/p&gt;
&lt;p&gt;Two identities matter for every action: the agent’s own, and the person or system it acts for.&lt;/p&gt;
&lt;p&gt;For AWS resources, agents assume ordinary IAM roles, so existing policy tooling applies. For external SaaS, IAM outbound identity federation lets a workload request a short-lived signed JWT from STS that asserts its AWS identity to the external service.&lt;/p&gt;
&lt;p&gt;Diagram 2 traces the full flow from user sign-in to a scoped downstream call:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/agent-control-plane/diagram-2.png&quot; alt=&quot;Agent identity and credential flow: a user signs in through an OIDC provider, AgentCore Identity issues the agent’s workload identity and its token vault exchanges the inbound token on behalf of the user for a short-lived, scoped downstream credential&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Diagram 2: Agent identity and credential flow through AgentCore Identity.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;tool-governance&quot;&gt;Tool governance&lt;/h2&gt;
&lt;p&gt;Tools and &lt;a href=&quot;/blog/model-context-protocol-mcp&quot;&gt;MCP servers&lt;/a&gt; offer options for agents to interact with other systems. The control plane routes everything through &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html&quot;&gt;AgentCore Gateway&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Gateway exposes one MCP endpoint and translates whatever sits behind it into MCP tools: Lambda functions, OpenAPI and Smithy specs, API Gateway stages, existing MCP servers, plain HTTP endpoints, and other agents.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-using-mcp-semantic-search.html&quot;&gt;Semantic tool selection&lt;/a&gt; keeps the catalog usable at scale: an agent facing thousands of registered tools receives only the handful relevant to its current request, which also keeps tool descriptions from flooding its context window.&lt;/p&gt;
&lt;p&gt;AWS now ships fully &lt;strong&gt;managed tools&lt;/strong&gt; you attach to a Gateway as connectors, including &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-target-connector-web-search-tool.html&quot;&gt;Web Search on AgentCore&lt;/a&gt;, an MCP-compatible connector.
Agents discover it with a standard &lt;code&gt;tools/list&lt;/code&gt; call and invoke it like any other MCP tool. Managed tools simplify what you &lt;em&gt;don’t&lt;/em&gt; have to govern: there is no third-party search API key in your token vault, no outbound credential to rotate, and queries never leave AWS.
Domain filtering and a Gateway service role give you the allow/deny controls on top.&lt;/p&gt;
&lt;p&gt;For anything that you don’t get as managed tool, you can build your own custom tool, with &lt;a href=&quot;https://gofastmcp.com/getting-started/welcome&quot;&gt;FastMCP&lt;/a&gt; for example, and
&lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-mcp.html&quot;&gt;deploy to AgentCore Runtime&lt;/a&gt;. Runtime hosts it as a streamable-HTTP MCP server which is stateless by default, but stateful when tools need elicitation or sampling.
Finally, register the Runtime endpoint as a Gateway target.&lt;/p&gt;
&lt;p&gt;Managed tools reduce the supply chain you must govern, and custom tools hosted on Runtime get governed like agents. Either way, the Gateway is the point where governance attaches.&lt;/p&gt;
&lt;p&gt;Enforcement happens in the request path. AgentCore Policy attaches a policy engine to the Gateway. Every tool call is intercepted and evaluated before it reaches the target, outside the agent’s code and regardless of which framework or model produced it.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/machine-learning/securing-ai-agents-with-temporal-policies-in-amazon-bedrock-agentcore/&quot;&gt;Temporal policies&lt;/a&gt; let you define stateful rules that determine authorization to AgentCore Gateway targets by evaluating the current request in the context of prior events in an agent’s trajectory.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/bedrock/guardrails/&quot;&gt;Bedrock Guardrails&lt;/a&gt; can run inside policy evaluation, screening tool inputs and outputs for prompt injection and sensitive data at a layer the agent cannot reason around. Lambda interceptors handle custom validation and transformation. &lt;a href=&quot;https://aws.amazon.com/about-aws/whats-new/2026/06/aws-waf-amazon-bedrock-agentcore/&quot;&gt;AWS WAF attaches to the Gateway&lt;/a&gt; for network-level filtering.&lt;/p&gt;
&lt;p&gt;Coding assistants also belong behind the same gateway. &lt;a href=&quot;/blog/claude-code-for-infrastructure-as-code&quot;&gt;Claude Code&lt;/a&gt; authenticates through &lt;a href=&quot;https://aws.amazon.com/cognito/&quot;&gt;Amazon Cognito&lt;/a&gt; with OAuth, and the Gateway fronts the actual MCP servers under its own IAM role with semantic search picking the tools.&lt;/p&gt;
&lt;p&gt;The platform team owns the catalog, the credentials, and the logs. For AWS access itself, the &lt;a href=&quot;https://github.com/aws/agent-toolkit-for-aws&quot;&gt;Agent Toolkit for AWS&lt;/a&gt; packages the managed &lt;a href=&quot;https://docs.aws.amazon.com/agent-toolkit/latest/userguide/mcp-server.html&quot;&gt;AWS MCP Server&lt;/a&gt;, which exposes AWS APIs and documentation behind SigV4 auth. Its requests carry dedicated IAM condition keys (&lt;code&gt;aws:CalledViaAWSMCP&lt;/code&gt;), so you can write policies that treat agent-initiated AWS calls differently from human ones, such as restricting them to read-only. Everything is logged in &lt;a href=&quot;https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html&quot;&gt;AWS CloudTrail&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/agent-control-plane/diagram-3.png&quot; alt=&quot;Tool governance and policy enforcement at the AgentCore Gateway: agents call one MCP endpoint, policy evaluation with guardrails and Lambda interceptors screens every tool call before it reaches Lambda functions, APIs, MCP servers, SaaS, or other agents&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Diagram 3: Tool governance and policy enforcement at the AgentCore Gateway.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;guardrails-and-secure-execution&quot;&gt;Guardrails and secure execution&lt;/h2&gt;
&lt;p&gt;Security principles for agentic AI:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enforcement must be deterministic&lt;/li&gt;
&lt;li&gt;Live in infrastructure&lt;/li&gt;
&lt;li&gt;And sit outside the agent’s reasoning loop.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-how.html&quot;&gt;Bedrock Guardrails&lt;/a&gt; can be &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/agents-guardrail.html&quot;&gt;associated with agents&lt;/a&gt; and offer the content control layer, and it is model-independent. Its policy types cover harmful content filters, prompt-attack detection, denied topics, PII blocking or masking, contextual grounding, and Automated Reasoning checks, which validate outputs against formal rules rather than a classifier’s judgment.&lt;/p&gt;
&lt;p&gt;The ApplyGuardrail API runs these checks standalone, so the same guardrail configuration covers models Bedrock hosts, models you self-host, and third-party APIs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Execution isolation&lt;/strong&gt; comes in different tiers, powered by &lt;a href=&quot;https://firecracker-microvm.github.io/&quot;&gt;Firecracker microVMs&lt;/a&gt;. AgentCore Runtime gives each agent session a dedicated microVM, terminated and sanitized when the session ends.&lt;/p&gt;
&lt;p&gt;AgentCore Code Interpreter and Browser do the same for running generated code and browsing the web, as managed sandboxes with per-session isolation. &lt;a href=&quot;https://aws.amazon.com/lambda/lambda-microvms/&quot;&gt;Lambda MicroVMs&lt;/a&gt; is the tier below: a raw sandbox primitive you orchestrate yourself. Each MicroVM is a dedicated Firecracker instance for one user, session, or job, sessions up to eight hours, suspend and resume with state intact, and its own HTTPS endpoint. Choose Code Interpreter when an agent needs a managed code-execution tool. Choose Lambda MicroVMs when you are building the execution layer yourself: custom runtimes and packages, coding-assistant sessions, or sandboxes for AI-generated code that runs outside any AgentCore agent.&lt;/p&gt;
&lt;p&gt;Runtime isolation must be paired with VPC connectivity with explicit egress controls, private endpoints so agent traffic never crosses the public internet, and &lt;a href=&quot;https://docs.aws.amazon.com/kms/latest/developerguide/overview.html&quot;&gt;KMS&lt;/a&gt; keys. Treat the sandbox as one boundary in a stack.&lt;/p&gt;
&lt;h2 id=&quot;observability-audit-and-detection&quot;&gt;Observability, audit, and detection&lt;/h2&gt;
&lt;p&gt;Agents emit OpenTelemetry spans, either through the &lt;a href=&quot;https://docs.aws.amazon.com/xray/latest/devguide/xray-services-adot.html&quot;&gt;ADOT SDK&lt;/a&gt; or through frameworks like Strands and LangGraph that carry instrumentation already. CloudWatch GenAI Observability organizes them into a session, trace, and span hierarchy with agent-level views of token usage, latency, and error rates, and it works across accounts, which matters once agents span an AWS organization.&lt;/p&gt;
&lt;p&gt;The audit trail needs data from the whole setup: &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-event-types.html&quot;&gt;Gateway data events&lt;/a&gt; on, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/model-invocation-logging.html&quot;&gt;Bedrock invocation logging&lt;/a&gt; on, &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/policy.html&quot;&gt;policy decision logs&lt;/a&gt; on, OTEL traces flowing.&lt;/p&gt;
&lt;p&gt;Detection then can be performed effectively on top of these logs, traces, and events:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.aws.amazon.com/guardduty/latest/ug/ai-protection.html&quot;&gt;GuardDuty AI Protection&lt;/a&gt; analyzes CloudTrail management and data events from AI services and raises findings for anomalous model invocations, cost harvesting with stolen credentials, and prompt injection attempts surfaced through its Guardrails integration.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-v2-ai-inventory.html&quot;&gt;Security Hub AI inventory&lt;/a&gt; addresses the discoverability of agentic systems running in your estate. It discovers managed AI resources (Bedrock, AgentCore, SageMaker) through AWS Config, finds self-hosted models and agents on EC2, ECS, and EKS through Inspector’s SBOM analysis, and spots external AI API usage through GuardDuty’s DNS telemetry. Each discovered asset is mapped to its compute, IAM roles, and data stores and correlated with findings. This is the &lt;strong&gt;answer to shadow agents&lt;/strong&gt;: the inventory can cover what teams built outside the platform, whether or not anyone registered it.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/evaluations.html&quot;&gt;Evaluations&lt;/a&gt; feed the same telemetry back into lifecycle decisions. &lt;a href=&quot;https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/online-evaluations.html&quot;&gt;Online evaluation&lt;/a&gt; samples production traces, scores them, and publishes to CloudWatch, so you can create automation flows accordingly to trigger notifications, rollbacks, or remediation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/agent-control-plane/diagram-4.png&quot; alt=&quot;Telemetry, audit, and detection loop: OpenTelemetry traces, CloudTrail events, and model invocation logs feed CloudWatch GenAI Observability, GuardDuty AI Protection, and Security Hub AI inventory, whose findings feed back into lifecycle and policy decisions&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Diagram 4: Telemetry, audit, and the detection loop.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;managed-agents-that-help-you-operate&quot;&gt;Managed agents that help you operate&lt;/h2&gt;
&lt;p&gt;The control plane is itself infrastructure that needs review, monitoring, and cost control. &lt;a href=&quot;https://aws.amazon.com/ai/frontier-agents/&quot;&gt;AWS’s frontier agents&lt;/a&gt; are managed agents that can greatly help you there.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/security-agent/&quot;&gt;AWS Security Agent&lt;/a&gt; reviews designs, threat-models them with STRIDE, scans pull requests against your security policies, and runs autonomous penetration tests against deployed applications. Pointed at an agent platform, that means pentesting the Gateway endpoints and the agent-built applications behind them, and reviewing the pull requests that add new tools to the catalog. Its &lt;a href=&quot;https://aws.amazon.com/blogs/aws/aws-security-agent-adds-threat-modeling-kiro-power-and-claude-code-plugin-and-more/&quot;&gt;Claude Code plugin&lt;/a&gt; puts those reviews inside the same coding assistants the platform governs.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/devopsagent/latest/userguide/about-aws-devops-agent.html&quot;&gt;AWS DevOps Agent&lt;/a&gt; runs continuous incident triage and root-cause analysis across telemetry, code, and deployment data. It consumes CloudWatch alongside third-party observability stacks and extends over MCP, so the AgentCore telemetry described above is within its reach. When there are issues with agents in production, the first responder can be an agent with the full trace history available.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/finops-agent/&quot;&gt;AWS FinOps Agent&lt;/a&gt; investigates cost anomalies to root cause, runs scheduled cost workflows, and posts findings to Slack or opens Jira tickets. Agent platforms earn their own FinOps attention: runtime hours, token consumption, and per-tool costs move with model behavior.&lt;/p&gt;
&lt;h2 id=&quot;what-organizations-are-actually-building&quot;&gt;What organizations are actually building&lt;/h2&gt;
&lt;p&gt;Uber’s platform, described in its 2026 engineering posts, anchors agent identity in SPIRE-issued workload credentials, issues short-lived, audience-scoped tokens that carry the full attested actor chain, and routes tool traffic through an MCP gateway that enforces access policy and redacts PII. It supports more than 1,500 monthly active agents running 60,000 executions a week.&lt;/p&gt;
&lt;p&gt;Block’s security team, writing about its Goose agent, argued for allowlists of vetted MCP servers and deterministic access controls over reliance on model judgment.&lt;/p&gt;
&lt;p&gt;An MCP-gateway category formed around the same needs: IBM’s ContextForge, Docker’s MCP Gateway, Kong’s MCP Registry, Cloudflare’s MCP Server Portals, the Linux Foundation’s agentgateway, and AWS’s open-source MCP Gateway and Registry.&lt;/p&gt;
&lt;p&gt;Registry, identity, governed gateway, policy, guardrails, telemetry, evaluations. Building on AWS primitives means buying that consensus architecture as managed parts instead of playing catch-up on building a platform across all these layers.&lt;/p&gt;
&lt;h2 id=&quot;loom-an-opinionated-implementation-over-the-primitives&quot;&gt;Loom: an opinionated implementation over the primitives&lt;/h2&gt;
&lt;p&gt;A platform is a set of decisions and connections of all the different parts that we discussed.&lt;/p&gt;
&lt;p&gt;Such an assembly of the different parts is &lt;a href=&quot;https://github.com/awslabs/loom/&quot;&gt;Loom for AWS&lt;/a&gt;. It is a platform implementation for building, deploying, and operating agents on AgentCore Runtime and &lt;a href=&quot;https://strandsagents.com/&quot;&gt;Strands Agents&lt;/a&gt;. Its stated tenets are simple, opinionated, and enterprise-grade.&lt;/p&gt;
&lt;p&gt;The architecture is three layers: a FastAPI control plane API that wraps boto3 and restricts deployments to approved parameters, a React management UI behind Cognito with navigation scoped per persona, and backend services that manage agents, memory, MCP servers, and agent-to-agent integrations. It runs on SQLite locally and PostgreSQL on RDS in production, and deploys to ECS Fargate behind an Application Load Balancer.&lt;/p&gt;
&lt;p&gt;Access control runs in two dimensions, role-based personas crossed with attribute-based resource groups, so a builder sees only the agents, memory stores, and MCP servers tagged to their group. Tagging is mandatory: every resource carries &lt;code&gt;loom:application&lt;/code&gt;, &lt;code&gt;loom:group&lt;/code&gt;, and &lt;code&gt;loom:owner&lt;/code&gt;, plus whatever custom tag profiles the platform defines, so cost attribution and inventory work from the first deployment.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/agent-control-plane/diagram-5.png&quot; alt=&quot;Loom’s paved path: a FastAPI control plane API wrapping the AWS primitives, a React management UI behind Cognito, and backend services for agents, memory, and MCP servers, deployed on ECS Fargate behind an Application Load Balancer&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Diagram 5: Loom’s paved path, an opinionated control plane API over the AWS primitives.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Loom combines some of the primitives in this post composing them into a working platform, and it supports three modes of consumption: run it as shipped, fork it and adapt, or read it as a pattern and copy the decisions into a control plane API you own.&lt;/p&gt;
&lt;h2 id=&quot;frequently-asked-questions&quot;&gt;Frequently asked questions&lt;/h2&gt;
&lt;section class=&quot;faq&quot;&gt;&lt;h3 id=&quot;what-is-an-agent-control-plane&quot;&gt;What is an agent control plane?&lt;/h3&gt;&lt;p&gt;The layer that manages agents as a governed workload: it registers and
versions them, issues their identities, brokers their credentials,
authorizes every tool call against explicit policy, isolates their
execution, and records and monitors everything they do. Enforcement is
deterministic and sits outside the agent’s reasoning loop.&lt;/p&gt;&lt;h3 id=&quot;which-aws-services-make-up-the-control-plane&quot;&gt;Which AWS services make up the control plane?&lt;/h3&gt;&lt;p&gt;Amazon Bedrock AgentCore carries most of it: Runtime, Identity, Gateway,
Policy, Memory, Evaluations, Code Interpreter, Browser, and
Observability. Around it sit the AWS Agent Registry, IAM and STS,
Bedrock Guardrails, CloudTrail, X-Ray, CloudWatch GenAI Observability,
Security Hub AI inventory, GuardDuty AI Protection, and Lambda MicroVMs
for self-managed sandboxes.&lt;/p&gt;&lt;h3 id=&quot;how-do-agents-get-identities-and-credentials&quot;&gt;How do agents get identities and credentials?&lt;/h3&gt;&lt;p&gt;Each agent gets a workload identity with an ARN in AgentCore Identity. A
KMS-encrypted token vault holds the OAuth tokens and API keys; agents
request credentials at run time against proof of identity and never hold
secrets. Outbound, the On-Behalf-Of token exchange issues short-lived
downstream tokens carrying both the agent’s identity and the original
caller’s, so every hop can authorize against both.&lt;/p&gt;&lt;h3 id=&quot;how-are-tool-calls-governed&quot;&gt;How are tool calls governed?&lt;/h3&gt;&lt;p&gt;Everything routes through AgentCore Gateway, which exposes one MCP
endpoint and translates Lambda functions, API specs, MCP servers, and
HTTP endpoints into tools. AgentCore Policy intercepts and evaluates
every call in the request path, temporal policies factor in the agent’s
prior trajectory, and Bedrock Guardrails screen inputs and outputs at a
layer the agent cannot reason around.&lt;/p&gt;&lt;h3 id=&quot;how-do-agents-discover-which-tools-and-agents-exist&quot;&gt;How do agents discover which tools and agents exist?&lt;/h3&gt;&lt;p&gt;Three mechanisms for three questions. Developers check the Agent Registry
at design time to find existing agents and capabilities. Agents at runtime
use Gateway’s built-in tool to find relevant tools with a natural-language query.
And the security team uses Security Hub’s AI inventory to discover what’s actually running,
including self-hosted agents.&lt;/p&gt;&lt;h3 id=&quot;what-is-loom-for-aws&quot;&gt;What is Loom for AWS?&lt;/h3&gt;&lt;p&gt;An opinionated platform implementation over these primitives for
building, deploying, and operating agents on AgentCore Runtime and
Strands Agents: a FastAPI control plane API, a React management UI
behind Cognito, and mandatory tagging for cost attribution. Run it as
shipped, fork it, or copy its decisions into a control plane you own.&lt;/p&gt;&lt;/section&gt;</content:encoded><category>ai-agents</category><category>aws</category><category>platform-engineering</category></item><item><title>AWS Certified Generative AI Developer - Professional: Cheat Sheet</title><link>https://devopsmadness.com/blog/aws-generative-ai-developer-professional-cheat-sheet</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-generative-ai-developer-professional-cheat-sheet</guid><description>Study notes, exam pointers, and cheat sheet for the AWS Certified Generative AI Developer - Professional exam: Bedrock, SageMaker, RAG, and agents.</description><pubDate>Mon, 10 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;aside class=&quot;tldr border-line rounded-lg border p-5&quot; aria-label=&quot;TL;DR&quot;&gt;&lt;p class=&quot;font-mono text-sm font-semibold&quot;&gt;TL;DR&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;The exam rewards decision ladders more than pure knowledge: which Bedrock
feature, which vector store, and which SageMaker inference option fit a
given constraint. The maps in these notes exist for exactly that.&lt;/li&gt;
&lt;li&gt;One of the most difficult AWS exams. At the current format really heavy on
RAG design choices and optimizations.&lt;/li&gt;
&lt;li&gt;Once you get the base knowledge, practice exams will get you closer to passing
than anything else. Skillbuilder, Tutorials Dojo, Udemy.&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;text-muted font-mono text-xs&quot;&gt;Last verified against AWS docs: 12 Aug 2026&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;AWS Certified Generative AI Developer - Professional exam study notes, exam pointers, and cheat sheet.&lt;/p&gt;
&lt;p&gt;This material was gathered during my preparation for the AWS Certified Generative AI Developer - Professional exam (here’s my &lt;a href=&quot;https://www.credly.com/badges/13007b25-dcbc-49fd-9640-a9453998f900/public_url&quot;&gt;badge&lt;/a&gt;). I created and curated this cheat sheet with useful information that will be handy to review before taking the exam, as I have done for my other &lt;a href=&quot;/topics/aws-certifications&quot;&gt;AWS certifications&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To pass this exam you need a solid working understanding of Amazon Bedrock, SageMaker AI, RAG architectures, and the surrounding AWS services used to build generative AI applications. Use these notes as complementary material, not as complete study material for the exam. If you are new to AWS AI exams, start with the &lt;a href=&quot;/blog/aws-ai-practitioner-certification-cheat-sheet&quot;&gt;AWS AI Practitioner cheat sheet&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;AWS frequently changes information, configuration, and options of different services, so some of this content might become outdated at some point. Cross-check anything you get from online sources with the official AWS documentation and FAQs before your exam.&lt;/p&gt;
&lt;p&gt;OK, enough with the disclaimers, let’s get to it.&lt;/p&gt;
&lt;h2 id=&quot;general-concepts&quot;&gt;General concepts&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;temperature&lt;/strong&gt; parameter controls the randomness of the model’s output. A lower temperature value (e.g., 0.1) makes the model’s responses more deterministic and consistent. The &lt;strong&gt;top_k&lt;/strong&gt; parameter limits the number of most probable tokens the model considers at each step, leading to more focused outputs. By lowering both temperature and top_k, similar inputs yield more consistent and reliable responses.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Transfer learning&lt;/strong&gt; enables a model to leverage pretrained knowledge learned from a large corpus rather than starting from zero. When applied correctly, the pretrained representation layers are preserved. Only the final classifier layer should be adjusted to reflect the specific prediction task.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Overfitting&lt;/strong&gt; occurs when a model learns the noise or irrelevant details in the training data rather than generalizable patterns, leading to high accuracy on the training set but poor performance on unseen data. It happens when a model is too complex for the available data. Techniques to address it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;L1 and L2 regularization&lt;/strong&gt; penalize large weights, with L1 promoting sparsity and L2 preventing excessively large weight values. The model focuses on generalizable features and avoids fitting noise. SageMaker AI allows easy integration of these techniques during training.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dropout&lt;/strong&gt; randomly deactivates neurons during training, so the model doesn’t rely too heavily on any specific neuron or feature. Easily implemented in SageMaker AI with frameworks like TensorFlow, Keras, and PyTorch.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reducing the number of layers&lt;/strong&gt; simplifies the model and reduces its capacity to overfit.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Quantization&lt;/strong&gt;: techniques for reducing the precision of model parameters, decreasing the memory footprint and computational requirements.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;SMOTE&lt;/strong&gt; (Synthetic Minority Oversampling Technique) addresses class imbalance by generating synthetic examples for the minority class. It interpolates new samples based on existing ones from the underrepresented category.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Chain-of-thought prompting&lt;/strong&gt; guides the model to reason step by step before providing a final answer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A comprehensive &lt;strong&gt;evaluation system&lt;/strong&gt; for GenAI outputs typically combines automated scoring (to scale across many prompts and releases) with human feedback (to capture real-world usefulness and UX).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cost optimization patterns worth knowing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Prompt compression&lt;/strong&gt;: use a smaller FM to summarize older conversation history into a short running summary. Include only the summary plus the most recent turns in each request.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Intelligent prompt routing&lt;/strong&gt;: a tiered model selection strategy so that routine requests (like basic summaries) use a cheaper model while complex requests use a higher-capability model.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;model-customization&quot;&gt;Model customization&lt;/h2&gt;
&lt;p&gt;Choose &lt;strong&gt;continued pre-training or fine-tuning&lt;/strong&gt; when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You have a specific task or use case that requires improved performance&lt;/li&gt;
&lt;li&gt;You have labeled data relevant to your task&lt;/li&gt;
&lt;li&gt;You need the model to understand domain-specific language (for example, medical or legal terminology)&lt;/li&gt;
&lt;li&gt;You want to enhance the model’s accuracy for your application&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Build a &lt;strong&gt;custom foundation model&lt;/strong&gt; (typically the highest option in resources and cost) when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;None of the available pre-trained models meet your specific requirements&lt;/li&gt;
&lt;li&gt;You have a vast amount of proprietary data to train on&lt;/li&gt;
&lt;li&gt;You need complete control over the model architecture and training process&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Low-Rank Adaptation (LoRA)&lt;/strong&gt; is a cost-effective fine-tuning method. Only a small portion of a large foundation model needs to be updated to adapt it for new tasks or domains. A LoRA adapter enhances inference from a base foundation model by adding just a few additional adapter layers. SageMaker AI supports &lt;strong&gt;adapter inference components&lt;/strong&gt;, which let you attach LoRA adapters to a hosted foundation model at inference time. This enables dynamic selection of region-specific adapters without redeploying the model or creating multiple endpoints.&lt;/p&gt;
&lt;h2 id=&quot;rag-chunking-strategies&quot;&gt;RAG: chunking strategies&lt;/h2&gt;
&lt;p&gt;The document chunking strategy determines how effectively the system can locate and retrieve relevant information from unstructured content. It directly impacts response accuracy, processing costs, and user experience. Unlike embedding models, which can be optimized through dimensional adjustments, chunking fundamentally alters how information is segmented and retrieved.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Fixed-size chunking&lt;/strong&gt;: divides documents into uniform token-based segments (typically 1000 tokens with 200-token overlap) regardless of content structure or logical boundaries. Predictable processing costs, consistent retrieval performance, and reliable implementation across diverse document types. Works well for varied content formats, FAQ systems, and scenarios prioritizing operational consistency. It may fragment related concepts across chunk boundaries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Semantic chunking&lt;/strong&gt;: breaks content at natural boundaries (section headers, topic transitions, paragraph breaks) to preserve logical units of information. Improves retrieval relevance for well-structured documents such as policy documents, procedures, and structured business reports. Requires 30-50% higher processing costs due to boundary detection complexity, and creates variable chunk sizes that can affect retrieval consistency.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Hierarchical chunking&lt;/strong&gt;: creates multiple representation levels from document summaries down to detailed paragraphs, enabling retrieval at different granularities based on the query. Supports both executive-level summaries and detailed analysis from the same content. Superior query adaptability, but storage costs increase by 200-400% and it requires more sophisticated retrieval logic. Hierarchical chunking is purpose-built for RAG document segmentation when answers depend on small, specific passages but still require surrounding context.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;embeddings-and-vector-search&quot;&gt;Embeddings and vector search&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For &lt;strong&gt;semantic similarity search&lt;/strong&gt; in a vector store, the Amazon Titan multimodal embeddings model embeds images, text, or both into vector representations that can be stored and queried in a vector database.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Smaller embedding dimensionality&lt;/strong&gt; reduces storage and indexing costs for large corpora, but should be validated to ensure it still captures the semantic detail needed for the domain. Use an Amazon Titan embedding model and configure a smaller embedding vector dimension. &lt;strong&gt;Titan Text Embeddings V2&lt;/strong&gt; supports 256 / 512 / 1024 dimensions and normalization; smaller dimensions mean cheaper storage and faster search.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;embedding model must match between indexing and querying&lt;/strong&gt;. A mismatch (or a dimension change) silently degrades retrieval; changing the embedding model or dimensions requires a full re-index. &lt;strong&gt;Embedding drift&lt;/strong&gt; occurs when query embeddings are generated with a different model than the one used to index documents, causing a mismatch in vector space that makes retrieval ineffective.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;ANN search algorithms&lt;/strong&gt;: when selecting an approximate nearest neighbor algorithm, consider the trade-offs between accuracy, speed, memory usage, and scalability. Common options: &lt;strong&gt;locality-sensitive hashing (LSH)&lt;/strong&gt; for fast indexing, &lt;strong&gt;hierarchical navigable small world (HNSW)&lt;/strong&gt; for high accuracy, &lt;strong&gt;inverted file index (IVF)&lt;/strong&gt; for balance, and &lt;strong&gt;product quantization (PQ)&lt;/strong&gt; for compact storage. Benchmark multiple algorithms with your dataset.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vector search can be slowed by coordinating many shard-level searches and merging results. &lt;strong&gt;Reindexing to use fewer, larger shards&lt;/strong&gt; reduces fan-out and coordination overhead, improving retrieval latency without changing the FM or the document set.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;vector-store-and-retrieval-decision-map&quot;&gt;Vector store and retrieval decision map&lt;/h3&gt;
&lt;p&gt;Vector stores a Bedrock knowledge base can use: OpenSearch Serverless (default, auto-created), Aurora PostgreSQL (pgvector), Pinecone, Redis Enterprise Cloud, MongoDB Atlas, Neptune Analytics (managed GraphRAG), Kendra GenAI index.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Managed end-to-end RAG with least ops → Bedrock Knowledge Base on OpenSearch Serverless.&lt;/li&gt;
&lt;li&gt;Existing relational data, want SQL joins next to vectors → Aurora pgvector (HNSW / IVFFlat indexes).&lt;/li&gt;
&lt;li&gt;Full control of index, hybrid search, very large scale → OpenSearch Service.&lt;/li&gt;
&lt;li&gt;Enterprise search with connectors plus per-user document ACLs honored → Kendra (the Retrieve API returns semantically ranked passages; the GenAI index plugs into both Bedrock KB and Q Business).&lt;/li&gt;
&lt;li&gt;Relationship-heavy / multi-hop corpora → Neptune GraphRAG. GraphRAG (Neptune Analytics) builds an entity/relationship graph over the corpus; choose it when answers require connecting facts across documents.&lt;/li&gt;
&lt;li&gt;Ultra-low-latency lookups or a semantic-cache layer → in-memory vector search (MemoryDB / ElastiCache-based patterns).&lt;/li&gt;
&lt;li&gt;Infrequent searches at low cost → &lt;strong&gt;S3 Vectors&lt;/strong&gt;: scalable, cost-effective vector search that automatically optimizes vector data for low-cost performance as datasets scale.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pinecone&lt;/strong&gt; is a fully managed vector database service designed for high-performance similarity search and retrieval of high-dimensional embeddings at scale.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-bedrock&quot;&gt;Amazon Bedrock&lt;/h2&gt;
&lt;p&gt;If you need a refresher on the fundamentals first, see my overview of &lt;a href=&quot;/blog/what-is-amazon-bedrock&quot;&gt;what Amazon Bedrock is&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Custom models trained in Bedrock (fine-tuning / continued pre-training) can only be invoked via &lt;strong&gt;Provisioned Throughput&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bedrock supports &lt;strong&gt;regional endpoints&lt;/strong&gt; for low-latency, region-aware inference workflows.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Amazon Bedrock Data Automation (BDA)&lt;/strong&gt; is a fully managed service that automates transforming unstructured media content (text, images, audio, video) into structured insights.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Amazon Titan Image Generator&lt;/strong&gt; creates high-quality images from natural-language text prompts or reference visuals. Its outputs carry &lt;strong&gt;invisible watermarks&lt;/strong&gt;, and Bedrock provides watermark detection.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With the &lt;strong&gt;Jamba&lt;/strong&gt; model from AI21 Labs, users can efficiently summarize large volumes of text. Jamba is optimized for generating coherent, concise summaries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For model selection based on business logic: centralize model selection behind API Gateway and route based on request content. Start a Step Functions workflow, run a lightweight classification step, use Choice states for routing, and invoke the selected Bedrock model from a Lambda task.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To improve throughput: set task-specific &lt;code&gt;maxTokens&lt;/code&gt; ceilings for short JSON responses, and trim oversized prompt context before invocation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;runtime-apis&quot;&gt;Runtime APIs&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Converse API&lt;/strong&gt;: a consistent interface that works with all models that support messages. Write code once and use it with different models. Model-specific inference parameters can still be passed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ConverseStream&lt;/strong&gt;: sends messages to the specified model and returns the response in a stream, with the same consistent cross-model interface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;InvokeModelWithBidirectionalStream&lt;/strong&gt;: runs inference using a bidirectional stream. The response stream remains open for 8 minutes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CountTokens API&lt;/strong&gt;: returns the token count for a given inference request without invoking the model. Use it to estimate token usage and enforce token budget checks; CloudWatch metrics provide ongoing visibility into latency and token consumption.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stop sequences&lt;/strong&gt;: stop the model after it generates certain key phrases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool use&lt;/strong&gt;: &lt;code&gt;toolConfig&lt;/code&gt; carries tool specs (JSON schema) plus &lt;code&gt;toolChoice&lt;/code&gt;: &lt;code&gt;auto&lt;/code&gt; (model decides), &lt;code&gt;any&lt;/code&gt; (must call some tool), &lt;code&gt;tool&lt;/code&gt; (force one specific tool). The loop: model returns a &lt;code&gt;toolUse&lt;/code&gt; block → app executes → send back &lt;code&gt;toolResult&lt;/code&gt; → repeat until &lt;code&gt;end_turn&lt;/code&gt;. This is the same loop coding agents run; I wrote about it in &lt;a href=&quot;/blog/claude-code-for-infrastructure-as-code&quot;&gt;Claude Code for infrastructure as code&lt;/a&gt;. Forcing a specific tool is the reliable structured-output pattern: schema-conformant JSON without prompt pleading. Combine with schema validation and a single retry on failure.&lt;/li&gt;
&lt;li&gt;Converse also carries &lt;code&gt;guardrailConfig&lt;/code&gt; (id/version/trace), &lt;code&gt;additionalModelRequestFields&lt;/code&gt; (model-specific params like top_k), and document/image content blocks for multimodal input.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;throughput-quotas-and-cost&quot;&gt;Throughput, quotas, and cost&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Quotas are &lt;strong&gt;per-model, per-Region RPM + TPM&lt;/strong&gt;. Throttling answer ladder: exponential backoff + jitter (SDK adaptive retry mode) → cross-Region inference → SQS buffering → Provisioned Throughput → quota increase.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cross-Region inference (CRIS)&lt;/strong&gt;: with a geographic cross-region inference profile, data movement remains within the Regions of that geography. Input and output data may be transmitted to a different Region within the geography for processing, but the data is stored in the source Region and encrypted in transit. CRIS also increases burst throughput (~2x quotas) by spreading traffic across Regions in the geography, so it’s an answer to throttling, not only resilience.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Application inference profiles&lt;/strong&gt;: create a profile wrapping a base or CRIS profile and attach cost-allocation tags → per-team/tenant/app spend in Cost Explorer plus per-profile CloudWatch metrics. The answer to “attribute Bedrock cost by application”.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Prompt caching&lt;/strong&gt;: &lt;code&gt;cachePoint&lt;/code&gt; markers on a stable prefix; ~5-minute sliding TTL (resets on hit); cache-read tokens billed at a steep discount (~90%); model-specific minimum prefix token counts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudWatch Bedrock runtime metrics worth recognizing by name: &lt;code&gt;Invocations&lt;/code&gt;, &lt;code&gt;InvocationLatency&lt;/code&gt;, &lt;code&gt;InputTokenCount&lt;/code&gt;, &lt;code&gt;OutputTokenCount&lt;/code&gt;, &lt;code&gt;InvocationThrottles&lt;/code&gt;, &lt;code&gt;InvocationClientErrors&lt;/code&gt;, &lt;code&gt;InvocationServerErrors&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With &lt;strong&gt;Bedrock invocation logging&lt;/strong&gt;, you can capture the complete request data, response data, and metadata for all calls made in your account within a Region. Supported destinations: CloudWatch Logs and S3.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;guardrails&quot;&gt;Guardrails&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Six policy types:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Content filters&lt;/strong&gt; (hate, insults, sexual, violence, misconduct, prompt attack) with per-category strength NONE→HIGH, configured independently for input vs output.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Denied topics&lt;/strong&gt;: natural-language topic definitions, up to ~30.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Word filters&lt;/strong&gt;: managed profanity plus custom words/phrases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sensitive information filters&lt;/strong&gt;: managed PII entity types with per-entity action Block or Mask (masked output uses &lt;code&gt;{NAME}&lt;/code&gt;-style placeholders), plus custom regex.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Contextual grounding checks&lt;/strong&gt;: grounding score and relevance score thresholds; requires source content passed with the request. Provides an automated way to assess whether the response is supported by the retrieved context.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automated reasoning checks&lt;/strong&gt;: apply structured policy logic derived from a policy document.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Guardrails can filter or mask PII in both incoming prompts and outgoing responses. Note: guardrail PII masking does not mask model invocation logs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Guardrail profiles&lt;/strong&gt; allow configurations to be applied across multiple Regions for consistent safety controls and cross-Region inference failover. Detailed guardrail actions (blocked content, modified responses, rejected prompts) can be captured in CloudWatch Logs for monitoring and auditing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure guardrail tracing with &lt;code&gt;{&amp;quot;trace&amp;quot;: &amp;quot;enabled&amp;quot;}&lt;/code&gt; in &lt;code&gt;guardrailConfig&lt;/code&gt;. Monitor &lt;code&gt;InvocationsIntervened&lt;/code&gt; metrics filtered by the &lt;code&gt;GuardrailPolicyType&lt;/code&gt; dimensions: ContentPolicy, TopicPolicy, and SensitiveInformationPolicy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;ApplyGuardrail API&lt;/strong&gt;: evaluate any text against a guardrail standalone, with no Bedrock model invocation. Works for SageMaker-hosted, third-party, or self-hosted models. The answer to “consistent safety controls across models running anywhere”.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Guardrails add latency and are billed per text unit; expect cost/latency trade-off questions about applying them selectively.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can enforce the use of a specific guardrail for model inference by including the &lt;code&gt;bedrock:GuardrailIdentifier&lt;/code&gt; condition key in your IAM policy.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;knowledge-bases&quot;&gt;Knowledge Bases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Knowledge bases support built-in &lt;strong&gt;logging&lt;/strong&gt; you can send to CloudWatch Logs. The logs track the status of files during data ingestion jobs: successfully ingested, ignored, or failed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Chunking options at ingestion&lt;/strong&gt;: default (~300 tokens), fixed-size, semantic, hierarchical (parent-child: match on the child chunk, return the parent for context), none (use when documents are pre-chunked upstream), or custom chunking via a Lambda transformation during ingestion.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Grounding&lt;/strong&gt; ensures the foundation model produces evidence-supported content rather than relying solely on internal model parameters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;Retrieve API&lt;/strong&gt; queries a knowledge base and returns &lt;code&gt;retrievalResults&lt;/code&gt; that include content, location, metadata, and a relevance score. Calling Retrieve for each focused subquery improves coverage for multi-intent questions, because each part can retrieve its own relevant evidence before the application performs synthesis.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RetrieveAndGenerate&lt;/strong&gt; can generate a response and return citations that connect response spans to retrieved source references.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reranking&lt;/strong&gt;: Knowledge Bases can reorder retrieved chunks using a Bedrock reranking model, which addresses the ranking problem without a custom retriever. Bedrock reranker models are specifically designed to improve the relevance of retrieved results. The &lt;strong&gt;Rerank API&lt;/strong&gt; also exists standalone (Amazon and Cohere rerankers), usable in a custom RAG stack outside Knowledge Bases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Metadata filtering&lt;/strong&gt;: a sidecar &lt;code&gt;&amp;lt;file&amp;gt;.metadata.json&lt;/code&gt; per document enables query-time filters (equals / in / greater-than, etc.). The fix for “restrict retrieval by department/date/tenant”. Implicit filtering can derive filters from the natural-language query.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data sources beyond S3&lt;/strong&gt;: Confluence, SharePoint, Salesforce, Web Crawler, custom. Knowledge Bases connect directly to enterprise knowledge sources such as Confluence and SharePoint, providing a managed path from source documents to semantic retrieval. Ingestion enforces per-file size limits (~50 MB) and file-count quotas. Skipped or failed files appear in the sync (ingestion job) history and statistics, the first place to look when retrieval “misses” documents.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Keeping documents up to date&lt;/strong&gt;: send S3 event notifications for object create, overwrite, and delete events to EventBridge. An EventBridge rule invokes a Lambda function that calls &lt;code&gt;StartIngestionJob&lt;/code&gt; for the knowledge base whenever relevant S3 changes occur.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Structured data retrieval&lt;/strong&gt;: a knowledge base can target Redshift and generate SQL (text-to-SQL), giving grounded answers over warehouse data without moving it into a vector store.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;model-evaluation&quot;&gt;Model evaluation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Bedrock Model Evaluations&lt;/strong&gt; provides a systematic way to compare models and inference settings on the same prompt dataset. When you create an evaluation job you specify the model, the type of task, and the prompt dataset. You can create a custom prompt dataset for automatic evaluation jobs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Steps for evaluating chatbot accuracy in text generation: start the automatic model evaluation in Bedrock, use the &lt;strong&gt;TREX dataset&lt;/strong&gt; for general text generation, and assess performance using the &lt;strong&gt;Real World Knowledge (RWK) score&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Evaluation results can be centrally stored in S3, then made queryable through the Glue Data Catalog and Athena.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Managed RAG evaluation jobs&lt;/strong&gt; can score retrieval-and-generation behavior with LLM-as-a-judge techniques against a prompt dataset in S3, including faithfulness/groundedness and citation-oriented metrics.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;prompt-management-and-flows&quot;&gt;Prompt management and flows&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Bedrock Flows&lt;/strong&gt; orchestrates multistep prompts and prompt chains. It enables graceful failure and recovery for long prompt chains, and has nodes for controlling flow logic, including iterator nodes and condition nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Bedrock Prompt Management&lt;/strong&gt; provides centralized prompt storage, parameterization (template variables), and version governance, including controlled promotion of prompt versions through an approval process. It can enforce a consistent response format (such as a required JSON structure). Prompt Management variants and Prompt Flows support systematic A/B testing without building custom orchestration.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Advanced Prompt Optimization&lt;/strong&gt; supports up to five models per job and allows 1 to 100 evaluation samples per template.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;bedrock-agents-and-agentcore&quot;&gt;Bedrock agents and AgentCore&lt;/h2&gt;
&lt;p&gt;Every response from a Bedrock agent includes a &lt;strong&gt;trace&lt;/strong&gt; that outlines the steps the agent is taking:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PreProcessingTrace&lt;/strong&gt;: the pre-processing step, where the agent contextualizes and categorizes user input and determines if it is valid.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OrchestrationTrace&lt;/strong&gt;: the orchestration step, where the agent interprets the input, invokes action groups, and queries knowledge bases, then returns output to continue orchestration or respond to the user.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PostProcessingTrace&lt;/strong&gt;: the post-processing step, where the agent handles the final output of the orchestration and determines how to return the response.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CustomOrchestrationTrace&lt;/strong&gt;: details about the custom orchestration step, where the agent determines the order in which actions are executed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RoutingClassifierTrace&lt;/strong&gt;: the input and output of the routing classifier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FailureTrace&lt;/strong&gt;: the reason a step failed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GuardrailTrace&lt;/strong&gt;: the actions of the guardrail.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AgentCore capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;AgentCore Evaluations&lt;/strong&gt;: for a CI pipeline that submits one session and needs an immediate result, the &lt;strong&gt;Evaluate API&lt;/strong&gt; is the right fit: the on-demand, synchronous scoring API for agent traces. It requires a specified &lt;code&gt;evaluatorId&lt;/code&gt;, accepts traces in OpenTelemetry format, and returns &lt;code&gt;evaluationResults&lt;/code&gt; that can pass or fail the pipeline.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Identity&lt;/strong&gt;: workload identities and a token vault for agents; OAuth 2LO/3LO flows and API keys. An agent acts on a user’s behalf across services without hardcoded credentials.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Gateway&lt;/strong&gt;: turns existing capabilities into &lt;a href=&quot;/blog/model-context-protocol-mcp&quot;&gt;MCP&lt;/a&gt; tools. Targets are Lambda functions, OpenAPI specs, and Smithy models. Handles inbound authorization (OAuth) and outbound credential injection, and provides semantic tool search so an agent can find the right tool among hundreds.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Observability&lt;/strong&gt;: built-in deep visibility into applications that rely on foundation models. Captures structured invocation data, including request and response metadata, input validation information, model interaction traces, and FM-level error patterns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Runtime&lt;/strong&gt;: when configured for the MCP protocol, the container must expose the MCP endpoint at &lt;code&gt;0.0.0.0:8000/mcp&lt;/code&gt;. Stateless HTTP is the default and fits simple, independent tool calls. Tools that need multi-turn elicitation, LLM sampling, or progress notifications need retained MCP session state, so they should use stateful mode. For portable client integration, AWS documents using the official &lt;code&gt;mcp&lt;/code&gt; package.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Orchestration positioning: Step Functions = deterministic, auditable orchestration; Bedrock Agents / AgentCore = managed agentic runtime; Strands / Agent Squad = code-first AWS-native frameworks. If you plan to run agents like these in production, see my post on &lt;a href=&quot;/blog/agentic-ai-deployment-with-infrastructure-as-code&quot;&gt;deploying agentic AI solutions with infrastructure as code&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;amazon-sagemaker&quot;&gt;Amazon SageMaker&lt;/h2&gt;
&lt;h3 id=&quot;inference-options&quot;&gt;Inference options&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Real-time endpoints&lt;/strong&gt;: auto scaling on &lt;code&gt;InvocationsPerInstance&lt;/code&gt;. Real-time endpoints also support streaming via &lt;code&gt;InvokeEndpointWithResponseStream&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Serverless Inference&lt;/strong&gt;: spiky or intermittent traffic; cold starts; no GPUs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asynchronous Inference&lt;/strong&gt;: a managed, scalable approach for large or variable workloads where requests can be queued and processed later rather than needing real-time responses. Supports payloads up to 1 GB and automatically stores both input data and prediction results in S3. Can be configured with an automatic scaling policy based on request volume.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Batch Transform&lt;/strong&gt;: can send multiple records in each request when the container supports batched input and output. Increasing concurrent transforms and tuning payload size can raise per-instance utilization and throughput.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-Model Endpoints&lt;/strong&gt;: many models behind one endpoint, lazily loaded. The cost play for many small models.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inference Recommender&lt;/strong&gt;: automated load testing to choose instance type and endpoint config.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Large Model Inference (LMI)&lt;/strong&gt;: the best fit when the deployment challenge is specific to LLMs rather than ordinary model hosting. Specialized containers, libraries, and tooling for large model inference, including optimizations such as quantization, tensor parallelism, and continuous batching.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inferentia2 (Inf2) / Trainium&lt;/strong&gt;: purpose-built silicon via the Neuron SDK. The price-performance answer for self-hosted LLM inference and training (LMI containers support it).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;training-tuning-and-algorithms&quot;&gt;Training, tuning, and algorithms&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;DeepAR&lt;/strong&gt;: a supervised learning algorithm for forecasting scalar (one-dimensional) time series using recurrent neural networks (RNN). When your dataset contains hundreds of related time series, DeepAR is the answer.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Hyperband&lt;/strong&gt; tuning strategy makes hyperparameter tuning more efficient by intelligently allocating computational resources: it automatically stops poorly performing training jobs early while allocating more resources to promising configurations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;max_depth&lt;/strong&gt; controls the maximum depth of individual trees in a tree-based model. Reducing tree depth simplifies the model, prevents it from fitting noise or overly complex relationships, and helps it generalize.&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;object detection&lt;/strong&gt;, SageMaker’s built-in algorithms both classify and localize multiple objects within an image by generating bounding boxes and corresponding class labels.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SageMaker Processing&lt;/strong&gt; fits tabular preparation steps: it runs a supplied processing container as a managed job and writes curated outputs to S3.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ground truth data&lt;/strong&gt; (a golden dataset) is a curated set of prompts and responses that describe the ideal workflow with a model. Use SageMaker Ground Truth or similar to scale the curation of this dataset.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;tooling-and-governance&quot;&gt;Tooling and governance&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;JumpStart&lt;/strong&gt;: ready-to-use, one-click solutions tailored to common use cases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clarify&lt;/strong&gt;: assess model fairness and interpretability. Set up a Clarify processing job to calculate bias metrics, generate feature attribution scores, and produce explainability reports.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autopilot&lt;/strong&gt;: automates building and deploying ML models (AutoML). Primarily optimized for tabular data and classification/regression tasks, not time series forecasting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Canvas&lt;/strong&gt;: a no-code ML interface for business analysts and domain experts who want accurate predictions without writing code or managing infrastructure. Used together, AWS Glue DataBrew and SageMaker Canvas form a robust, no-code data-to-insight pipeline.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model Monitor&lt;/strong&gt; has four monitor types: data quality, model quality, bias drift, feature attribution drift.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model cards&lt;/strong&gt; document model intent, limitations, and versioning. Maintaining a model card addresses governance needs by documenting intended use, limitations, and constraints in a standardized way.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network isolation&lt;/strong&gt;: set &lt;code&gt;EnableNetworkIsolation&lt;/code&gt; to &lt;code&gt;True&lt;/code&gt; when calling &lt;code&gt;CreateTrainingJob&lt;/code&gt;, &lt;code&gt;CreateHyperParameterTuningJob&lt;/code&gt;, or &lt;code&gt;CreateModel&lt;/code&gt; if you don’t want SageMaker AI to provide external network access to training or inference containers.&lt;/li&gt;
&lt;li&gt;To secure SageMaker notebook instances so only authorized users within the VPC can access them, create an IAM policy with a condition that restricts access to the VPC interface endpoint.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;other-ai-services&quot;&gt;Other AI services&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Amazon Comprehend&lt;/strong&gt;: toxicity detection is a safety classifier that automatically identifies harmful or abusive language in text. The PII detection feature enables automated identification and redaction of PII in plain-text documents (the &lt;code&gt;DetectPiiEntities&lt;/code&gt; API operation). Custom Entity Recognition (CER) identifies and labels domain-specific terms or entities within text. Pre-processing with Comprehend can detect common PII types and mask them before the request reaches the FM.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Amazon Textract&lt;/strong&gt;: provides structured outputs and confidence scores for each extracted element, indicating the reliability of the detected text or data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Amazon Transcribe&lt;/strong&gt;: converts audio speech into text, with real-time and batch transcription for many languages and audio formats. Custom vocabularies fine-tune transcription for domain-specific terminology such as technical terms, proper names, or specialized phrases. Its Toxicity Detection capability applies to voice data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Amazon Translate&lt;/strong&gt;: custom terminology lets you create specialized word lists for accurate and consistent translations of domain-specific terms, acronyms, or technical phrases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Amazon Lex&lt;/strong&gt;: a fully managed service for conversational interfaces using automatic speech recognition (ASR) and natural language understanding (NLU) to convert speech and text into structured intents and slot values. Custom slot types define lists of acceptable input values for a slot, which helps the chatbot handle linguistic variety without additional backend logic or retraining.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Amazon Rekognition&lt;/strong&gt;: image/video moderation labels. Screen user-uploaded images before they reach a multimodal FM.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-opensearch&quot;&gt;Amazon OpenSearch&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For large-scale deployments, &lt;strong&gt;sharding strategies&lt;/strong&gt; are key to performance and scalability. Sharding distributes the vector index across multiple nodes, enabling parallel similarity search and horizontal scaling. By partitioning embeddings into logical shards, OpenSearch can handle millions or billions of vectors while maintaining low-latency queries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;Neural plugin&lt;/strong&gt; allows OpenSearch to generate embeddings during ingestion and at query time by invoking an embedding model in Bedrock.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Topic-based segmentation&lt;/strong&gt; (separate indices per topic): separating domains into dedicated indexes enables domain-specific tuning, including embedding approaches and index settings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A &lt;strong&gt;hierarchical (summary-to-detail) index pattern&lt;/strong&gt; reduces the search space and improves routing, while fewer, larger shards reduce coordination overhead and improve vector search performance and cluster stability at scale.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For managed OpenSearch Service vector search, the retrieval architecture has two separate design concerns: how the corpus is partitioned, and how each vector index is configured and queried.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Shard planning&lt;/strong&gt;: AWS guidance is workload-dependent. 10-30 GiB shards are commonly recommended when search latency is the key objective, 30-50 GiB shards suit write-heavy workloads, and too many small shards create CPU, memory, and out-of-memory pressure.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Hybrid search&lt;/strong&gt; improves relevance by rewarding exact keyword matches (for identifiers) while still leveraging semantic similarity for natural-language queries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Search latency&lt;/strong&gt;: reindexing into fewer, larger shards reduces cross-shard fan-out and coordination work during vector and hybrid queries, improving latency.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;data-and-storage-services&quot;&gt;Data and storage services&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AWS Glue DataBrew&lt;/strong&gt;: a visual data preparation service to clean and normalize raw datasets at scale without complex coding or manual data wrangling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS Glue&lt;/strong&gt; enables lineage and systematic data source attribution through cataloging and metadata tagging.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS Glue Data Quality&lt;/strong&gt;: automated, rule-based validation that can be embedded directly into Glue jobs. Rulesets can enforce completeness and basic validity checks (required fields, non-empty strings).&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Detect PII transform&lt;/strong&gt; in Glue identifies PII within your data source. You specify which PII entities to detect, how the data is scanned, and the actions to take on identified entities.&lt;/li&gt;
&lt;li&gt;Glue ETL jobs can use S3, VPC data stores, or on-premises JDBC data sources as input.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S3 encryption&lt;/strong&gt;: SSE-KMS encrypts model artifacts at rest with a customer-managed KMS key, allowing fine-grained access control and auditability. SSE-S3 encrypts at rest but does not offer the same level of fine-grained access control and auditability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S3 Access Points&lt;/strong&gt; are primarily designed for managing access to shared datasets at scale, especially in multi-tenant environments.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;metadata framework&lt;/strong&gt; that separates content from metadata (timestamps, authorship, domain tags) improves precision and context awareness without changing the core RAG architecture → define a standardized metadata schema stored as S3 object metadata.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FSx for Lustre&lt;/strong&gt;: a high-performance file system for workloads that need fast, parallel access to large datasets (ML training, HPC, analytics). When linked to an S3 bucket, it presents S3 objects as files, so SageMaker training jobs read data at file system speeds while S3 remains the source of truth. Data written back to FSx can be automatically exported to S3, with no data duplication or complex migration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DynamoDB&lt;/strong&gt; works great for storing reviewer inputs. A DynamoDB-backed &lt;strong&gt;circuit breaker&lt;/strong&gt; persists across executions and can implement a cooldown period using TTL.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Amazon Data Firehose&lt;/strong&gt;: fully managed streaming of real-time data into storage services such as S3. Ideal for continuous data ingestion. Know the split: Kinesis Data Streams (custom real-time consumers) vs Firehose (managed delivery) vs MSK (Kafka-compatible).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AppFlow&lt;/strong&gt;: SaaS → S3 sync without custom code (e.g., Salesforce exports feeding a knowledge base pipeline).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DataSync / Transfer Family&lt;/strong&gt;: move on-prem file shares into S3 to feed knowledge bases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EventBridge Scheduler&lt;/strong&gt;: cron for scheduled knowledge base syncs and batch evaluation runs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Service Catalog&lt;/strong&gt;: publish vetted GenAI stack templates org-wide.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;QuickSight ML Insights&lt;/strong&gt;: built-in anomaly detection using ML to automatically identify data outliers or trends.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;application-integration-and-serverless-patterns&quot;&gt;Application integration and serverless patterns&lt;/h2&gt;
&lt;h3 id=&quot;api-gateway&quot;&gt;API Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;WebSocket API&lt;/strong&gt; provides a straightforward way to push incremental updates to the browser in near real time.&lt;/li&gt;
&lt;li&gt;API Gateway provides a simple, controlled interface for collecting human feedback and decisions. An API Gateway + Lambda + DynamoDB pattern captures explicit user ratings and annotations at scale.&lt;/li&gt;
&lt;li&gt;A centralized &lt;strong&gt;GenAI gateway&lt;/strong&gt; is best implemented with API Gateway in front of a Lambda layer that invokes Bedrock, so the organization can standardize request validation, throttling, and access patterns.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;REST API response streaming&lt;/strong&gt;: configured with response transfer mode STREAM. AWS documents server-sent events and generative AI chatbot time-to-first-byte reduction as use cases. With Lambda proxy integration, API Gateway uses the Lambda streaming invocation path ending in &lt;code&gt;/response-streaming-invocations&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;AWS positions REST APIs as more customizable and feature-rich, while HTTP APIs are the lower-latency, lightweight option.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration timeout&lt;/strong&gt;: 29 s default (raisable via quota for Regional REST APIs). The classic cause of “long generations fail behind API Gateway”. Fixes: response streaming, WebSockets, or go async (SQS + status polling / callback).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;step-functions&quot;&gt;Step Functions&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Provides a managed orchestration layer for review and approval workflows, including waiting for human actions. The &lt;code&gt;.waitForTaskToken&lt;/code&gt; callback pattern pauses the workflow until &lt;code&gt;SendTaskSuccess&lt;/code&gt; / &lt;code&gt;SendTaskFailure&lt;/code&gt; is called: THE managed human-approval / external-callback pattern.&lt;/li&gt;
&lt;li&gt;Can enforce explicit stopping conditions by tracking failure counts in state input and branching with a Choice state.&lt;/li&gt;
&lt;li&gt;Can implement &lt;strong&gt;ReAct-style patterns&lt;/strong&gt; by combining Bedrock model invocations with tool invocations, conditional branching, and termination logic.&lt;/li&gt;
&lt;li&gt;Use a &lt;strong&gt;Parallel state&lt;/strong&gt; to invoke two different Bedrock models at the same time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Express Workflows&lt;/strong&gt; are limited to 5 minutes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Map state&lt;/strong&gt; (inline vs distributed; distributed = massive parallel fan-out over S3 items) for parallel document/chunk processing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;lambda&quot;&gt;Lambda&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;A Lambda &lt;strong&gt;pre-processing layer&lt;/strong&gt; enables targeted detection and sanitization of adversarial prompt patterns (common prompt-injection and jailbreak patterns, e.g. with pattern matching and named entity recognition) before the request reaches the model or tools.&lt;/li&gt;
&lt;li&gt;A lightweight Lambda &lt;strong&gt;pre/post-processing layer&lt;/strong&gt; can enforce deterministic checks (such as ensuring a required disclaimer is present and blocking noncompliant outputs) before returning content to users.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reusing clients&lt;/strong&gt; keeps connections open across invocations, reducing repeated TLS handshakes and connection setup time.&lt;/li&gt;
&lt;li&gt;Invocation payload limits: 6 MB each for request and response (synchronous).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;other-integration-services&quot;&gt;Other integration services&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SQS&lt;/strong&gt; event source mappings process records at least once. Use the interaction ID as an idempotency key if needed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS AppConfig&lt;/strong&gt;: retrieve externalized configuration dynamically at runtime. For Lambda, use the AppConfig Agent Lambda extension to fetch configuration updates without custom polling logic. Designed for dynamic configuration changes independent of code deployments; supports validation and progressive deployments with rollback based on CloudWatch alarms.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Secrets Manager&lt;/strong&gt;: for API token rotation, it natively automates secret rotation through its integration with Lambda.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CloudWatch Synthetics&lt;/strong&gt;: continuous, automated checks that simulate end-to-end usage. Alarms on the resulting metrics create ongoing regression detection with minimal custom infrastructure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;X-Ray&lt;/strong&gt;: trace API Gateway → Lambda → Bedrock spans; find tail latency and per-dependency errors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS Outposts&lt;/strong&gt;: run AWS compute and storage on premises for local data integration and residency. De-identifying on Outposts ensures only approved data is sent to the FM.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;human-in-the-loop-flows&quot;&gt;Human-in-the-loop flows&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SageMaker Ground Truth Plus&lt;/strong&gt;: a managed data labeling service for human-in-the-loop workflows. Domain experts, such as healthcare professionals, can review and correct AI-generated summaries before they are used in production. Ideal for regulated industries. If your reviewers are new to generative AI, I wrote about &lt;a href=&quot;/blog/the-value-of-upskilling-your-smbs-employees-in-generative-ai&quot;&gt;the value of upskilling employees in generative AI&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Amazon Augmented AI (A2I)&lt;/strong&gt;: a managed framework for incorporating human review into ML workflows. Typically used for specific human review tasks during inference, such as document classification or moderation, rather than full-scale data labeling and retraining workflows.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Amazon Nova Canvas&lt;/strong&gt;: primarily intended for real-time, human-in-the-loop creative processes, such as brainstorming or refining visuals in a shared workspace.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step Functions&lt;/strong&gt; with &lt;code&gt;.waitForTaskToken&lt;/code&gt; for managed review and approval workflows (see above).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;caching&quot;&gt;Caching&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Prompt caching&lt;/strong&gt; is most effective for a stable, reusable prompt prefix (for example, instructions and few-shot examples). It reduces token cost and improves latency by reusing a cached prefix, but it still invokes the FM for every request. It does not avoid unnecessary FM invocations when users ask the exact same question repeatedly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Edge caching with CloudFront&lt;/strong&gt; can avoid unnecessary FM invocations entirely for repeated requests by serving cached responses at edge locations. This directly reduces Bedrock invocation volume and improves latency for global users.&lt;/li&gt;
&lt;li&gt;Caching decision ladder: identical repeated requests → CloudFront edge cache or exact-match cache (ElastiCache); similar but not identical questions → semantic cache (embed the query → similarity lookup over cached answers → serve above a threshold); long shared prompt prefix → prompt caching; expensive retrieval → cache retrieved contexts.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;deployments&quot;&gt;Deployments&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;canary deployment&lt;/strong&gt; provides controlled exposure of the new configuration to live traffic and a straightforward rollback mechanism. Use it to expose only a limited production cohort or for gradual rollout.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AppConfig&lt;/strong&gt; for gradual rollout and automatic rollbacks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CodePipeline&lt;/strong&gt;: for automatic rollback, the stage must already have had a successful execution after the rollback configuration exists. A successful baseline deployment matters before relying on automatic recovery.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The same release discipline applies to infrastructure changes; see my posts on &lt;a href=&quot;/blog/infrastructure-as-code-iac-testing&quot;&gt;IaC testing&lt;/a&gt; and &lt;a href=&quot;/topics/terraform&quot;&gt;Terraform&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;security-and-governance&quot;&gt;Security and governance&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data poisoning&lt;/strong&gt; happens during pre-training, domain adaptation, and fine-tuning, where poisoned data is introduced, intentionally or by mistake, into a model. It is considered successful if the model has learned from poisoned data. Protect models by isolating the training environment, infrastructure, and data. For voice data, consider Amazon Transcribe’s Toxicity Detection; for text data, consider the Bedrock Guardrails API to filter data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PrivateLink&lt;/strong&gt;: Bedrock interface endpoints are service-specific (&lt;code&gt;bedrock&lt;/code&gt;, &lt;code&gt;bedrock-runtime&lt;/code&gt;, &lt;code&gt;bedrock-agent&lt;/code&gt;, &lt;code&gt;bedrock-agent-runtime&lt;/code&gt;) for private access without the internet. Combine with endpoint policies and &lt;code&gt;aws:SourceVpce&lt;/code&gt;-style IAM conditions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data privacy commitments&lt;/strong&gt;: customer prompts and outputs are not used to train base models and are not shared with model providers; content stays in-Region.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;KMS customer-managed keys&lt;/strong&gt; encrypt custom models, knowledge bases, agents, and guardrails: fine-grained control plus CloudTrail auditability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SCPs / IAM conditions&lt;/strong&gt; pin usage org-wide: allow &lt;code&gt;bedrock:InvokeModel&lt;/code&gt; only on approved model or inference-profile ARNs, or only in approved Regions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Macie&lt;/strong&gt;: automated discovery of sensitive data at rest in S3. Scan corpora and log buckets before they feed RAG or fine-tuning; complements Comprehend (in-flight detection).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS WAF&lt;/strong&gt; in front of API Gateway / CloudFront: rate-based rules against token-flooding abuse and scraping of GenAI endpoints.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cognito&lt;/strong&gt; for end-user auth, plus API Gateway usage plans / API keys for per-tenant throttling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CloudTrail&lt;/strong&gt; = API activity (who called what, control plane).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VPC endpoints&lt;/strong&gt;: interface VPC endpoints are not used to connect to S3; S3 typically requires gateway VPC endpoints for private access. An endpoint policy is a resource-based policy attached to a VPC endpoint, controlling which AWS principals can access a service through the endpoint.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;errors-quotas-and-troubleshooting&quot;&gt;Errors, quotas, and troubleshooting&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ThrottlingException&lt;/code&gt; → RPM/TPM quota hit: backoff + jitter (SDK adaptive retry mode) → CRIS → SQS smoothing → Provisioned Throughput → quota increase.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ValidationException&lt;/code&gt; → malformed request or input exceeds the model’s context window → truncate / summarize (prompt compression) / re-chunk; also check the model-specific request schema.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ModelTimeoutException&lt;/code&gt; or a stream cut mid-response → reduce &lt;code&gt;maxTokens&lt;/code&gt;, stream output, retry idempotently.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AccessDeniedException&lt;/code&gt; → model access not enabled in that Region/account, or an IAM / VPC endpoint policy block. Check the Model access page first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retrieval-quality debugging order&lt;/strong&gt;: (1) ingestion/sync job status and statistics (skipped or failed files), (2) same embedding model and dimension for index and query, (3) chunk size vs question granularity, (4) top-K and score thresholds, (5) metadata filters too strict, (6) add a reranker.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hallucination mitigation ladder&lt;/strong&gt;: ground with a knowledge base → contextual grounding threshold → lower temperature/top_p → require citations (RetrieveAndGenerate) → human review for high-stakes outputs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Truncated output&lt;/strong&gt; → &lt;code&gt;maxTokens&lt;/code&gt; too low or a stop-sequence collision. &lt;strong&gt;Repetitive output&lt;/strong&gt; → temperature/top_p tuning.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JSON format drift&lt;/strong&gt; → forced tool use / stricter schema plus a validate-and-retry Lambda.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;evaluation-metrics-map&quot;&gt;Evaluation metrics map&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Classic NLP metrics by task: &lt;strong&gt;ROUGE&lt;/strong&gt; = summarization overlap, &lt;strong&gt;BLEU / METEOR&lt;/strong&gt; = translation, &lt;strong&gt;BERTScore&lt;/strong&gt; = semantic similarity, &lt;strong&gt;F1 / exact match&lt;/strong&gt; = extractive QA, &lt;strong&gt;perplexity&lt;/strong&gt; = language-model fit.&lt;/li&gt;
&lt;li&gt;Bedrock automatic model evaluation built-in metric dimensions: accuracy, robustness, toxicity (task types: text generation, summarization, QA, classification). Human-based jobs = custom metrics with your own workforce.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LLM-as-a-judge&lt;/strong&gt; job metrics: correctness, completeness, faithfulness, coherence, helpfulness, plus responsible-AI checks such as harmfulness and refusal.&lt;/li&gt;
&lt;li&gt;RAG evaluation splits in two: retrieve-only → context relevance / coverage; retrieve-and-generate → faithfulness/groundedness, correctness, citation precision and coverage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shadow testing&lt;/strong&gt; (SageMaker shadow variants): mirror live traffic to a new model/config and compare offline with zero user impact; precedes canary. Production variants with traffic weights = managed A/B testing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Golden-dataset regression&lt;/strong&gt;: run on every model/prompt change, score with semantic similarity or an LLM judge, alarm on score drops via CloudWatch. The deployment quality gate pattern.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;frequently-asked-questions&quot;&gt;Frequently asked questions&lt;/h2&gt;
&lt;section class=&quot;faq&quot;&gt;&lt;h3 id=&quot;which-services-matter-most-for-this-exam&quot;&gt;Which services matter most for this exam?&lt;/h3&gt;&lt;p&gt;Amazon Bedrock end to end (runtime APIs, guardrails, Knowledge Bases,
agents and AgentCore), SageMaker AI training and inference options, and
RAG architecture choices across OpenSearch and the other vector stores.
Around them, the integration layer comes up constantly: API Gateway, Step
Functions, Lambda, and SQS, plus the supporting AI services such as
Comprehend, Textract, Transcribe, and Lex.&lt;/p&gt;&lt;h3 id=&quot;when-should-i-pick-fine-tuning-over-rag-in-a-scenario-question&quot;&gt;When should I pick fine-tuning over RAG in a scenario question?&lt;/h3&gt;&lt;p&gt;Reach for fine-tuning or continued pre-training when the scenario mentions
labeled task data, domain-specific language, or accuracy targets for a
specific task. Reach for a knowledge base when answers must be grounded in
company documents, with citations connecting responses to sources. LoRA is
the cost-effective middle ground: adapt a base model with small adapter
layers instead of retraining it.&lt;/p&gt;&lt;h3 id=&quot;which-vector-store-should-i-answer-for-a-rag-scenario&quot;&gt;Which vector store should I answer for a RAG scenario?&lt;/h3&gt;&lt;p&gt;Match the constraint in the question. Managed end-to-end RAG with the
least operations is a Bedrock Knowledge Base on OpenSearch Serverless, the
default. Aurora pgvector fits relational data that wants SQL joins next to
vectors. Kendra covers enterprise search with connectors and per-user
document ACLs. Neptune GraphRAG handles multi-hop questions that connect
facts across documents. S3 Vectors is the low-cost option for infrequent
searches, and in-memory patterns answer ultra-low-latency lookups and
semantic caching.&lt;/p&gt;&lt;h3 id=&quot;what-do-i-need-to-know-about-bedrock-guardrails&quot;&gt;What do I need to know about Bedrock guardrails?&lt;/h3&gt;&lt;p&gt;The six policy types: content filters, denied topics, word filters,
sensitive information filters, contextual grounding checks, and automated
reasoning checks. Beyond those, know the ApplyGuardrail API for models
hosted anywhere, guardrail tracing and the InvocationsIntervened metric,
and the IAM condition key that enforces a specific guardrail. Expect
trade-off questions on the latency and per-text-unit cost they add.&lt;/p&gt;&lt;h3 id=&quot;how-do-the-throttling-questions-work&quot;&gt;How do the throttling questions work?&lt;/h3&gt;&lt;p&gt;Recognize ThrottlingException as a per-model, per-Region RPM or TPM quota
hit, and know the answer ladder in order: exponential backoff with jitter,
cross-Region inference, SQS buffering, Provisioned Throughput, then a
quota increase. Cross-Region inference also raises burst throughput by
spreading traffic across Regions, and custom models can only be invoked
through Provisioned Throughput.&lt;/p&gt;&lt;h3 id=&quot;what-is-the-difference-between-bedrock-agents-and-agentcore&quot;&gt;What is the difference between Bedrock agents and AgentCore?&lt;/h3&gt;&lt;p&gt;A Bedrock agent is the managed agent itself, and every response includes a
trace of its pre-processing, orchestration, and post-processing steps.
AgentCore is the production layer around agents: Runtime for hosting (with
MCP support), Identity for credentials, Gateway for turning existing APIs
into tools, Observability for traces, and Evaluations for scoring agent
sessions. For orchestration positioning, Step Functions is the
deterministic, auditable option while agents cover open-ended tasks.&lt;/p&gt;&lt;h3 id=&quot;is-this-cheat-sheet-enough-to-pass&quot;&gt;Is this cheat sheet enough to pass?&lt;/h3&gt;&lt;p&gt;No. Treat it as review material next to the official exam guide and
hands-on practice. AWS changes service details often, so cross-check
anything here against the official documentation and FAQs before your
exam. If you are new to AWS AI exams, the AI Practitioner cheat sheet is
the easier on-ramp.&lt;/p&gt;&lt;h3 id=&quot;how-long-is-the-exam-and-how-many-questions-does-it-have&quot;&gt;How long is the exam and how many questions does it have?&lt;/h3&gt;&lt;p&gt;180 minutes, 75 questions. It was quite challenging, I spent the
whole time. More details on the &lt;a href=&quot;https://aws.amazon.com/certification/certified-generative-ai-developer-professional/&quot;&gt;official exam guide&lt;/a&gt;&lt;/p&gt;&lt;/section&gt;
&lt;p&gt;Good luck with your exam.&lt;/p&gt;</content:encoded><category>aws</category><category>certifications</category></item><item><title>IaC Modernization &amp; How to Future-Proof Your Infrastructure</title><link>https://devopsmadness.com/blog/iac-modernization</link><guid isPermaLink="true">https://devopsmadness.com/blog/iac-modernization</guid><description>A nine-step roadmap for modernizing an aging Terraform estate: state surgery, guardrails, self-service, and why AI enters the workflow last.</description><pubDate>Tue, 21 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; “Modernize” usually arrives as a mandate with no
sequence attached, and this piece gives the sequence: nine steps from
inventory to agentic AI. AI-generated infrastructure code is multiplying
faster than most estates were built to absorb, so the order of operations
now matters more than any single tool choice. The article treats
modernization as a continuous practice, and that framing matches what I
keep seeing in real Terraform estates.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Import what exists and enforce code-first changes before any tooling
decision. The roadmap starts with an inventory of what actually runs,
brings unmanaged resources under version control, and only then
standardizes naming, tagging and modular components. The target state
is explicit in the article’s traits list: everything codified, modules
versioned in a registry, and remote state with locking, split by
lifecycle. Skipping the inventory is how modernization efforts stall
halfway.&lt;/li&gt;
&lt;li&gt;Break up monolithic state by lifecycle and ownership before automating
delivery. Smaller states plan faster and localize the blast radius of a
mistake. A common pattern is one stack per environment per logical
layer: networking, data, application. That split makes the later steps
workable: GitOps pipelines, policy gates with OPA,
&lt;a href=&quot;/blog/what-is-configuration-drift&quot;&gt;drift detection&lt;/a&gt; with a remediation
strategy, and self-service golden paths on top of the guardrails.
Policies can warn on minor issues and hard-fail on serious ones, with
approvals gating production changes and deletions.&lt;/li&gt;
&lt;li&gt;Bring AI in last, once those guardrails exist. Treat agent-written
changes like human ones: planned, policy checked and reviewed before
apply. Give agents least-privilege credentials, separate the systems
that propose changes from the ones that approve them, and keep a human
in the loop for production. Bet on open standards such as OpenTofu, OPA
and OCI registries, because no single tool covers every need.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Start planning and preparing your infrastructure
for onboarding AI workloads and agents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams with an aging Terraform estate, and platform
leads deciding where AI fits into infrastructure work. If the guardrails
already exist in your setup,
&lt;a href=&quot;/blog/infrastructure-as-code-iac-testing&quot;&gt;IaC testing&lt;/a&gt; is the natural
next layer before handing more of the workflow to agents.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/iac-modernization&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>iac</category><category>platform-engineering</category><category>ai-agents</category></item><item><title>Claude Code for Infrastructure as Code: A Practical Guide</title><link>https://devopsmadness.com/blog/claude-code-for-infrastructure-as-code</link><guid isPermaLink="true">https://devopsmadness.com/blog/claude-code-for-infrastructure-as-code</guid><description>How Claude Code fits IaC work in practice: a mental model, the use cases that pay off first, and the guardrails that keep an agent out of state.</description><pubDate>Tue, 30 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; This is the piece closest to what this site is
about. IaC is a good match for coding agents because plans give you a
review gate before anything applies, and this guide turns that
observation into a full working model for Claude Code against a
Terraform estate. It is specific where most agent content stays vague:
real CLAUDE.md examples, real permission rules, and an honest section on
where the tool breaks, from context limits on large codebases to
mishandled secrets.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The mental model is a strict split between drafting and deploying.
The agent’s job ends at the diff. Every change travels through a pull
request and CI before production, and the operator who merges stays
accountable for the result. Nothing the agent writes reaches
infrastructure without a human in the merge path.&lt;/li&gt;
&lt;li&gt;Start with the boring work: module generation, splitting monolithic
configs, updating deprecated syntax, writing tests and OPA policies.
Small scoped changes are easier to review and cheaper to roll back
when the agent hallucinates a provider argument, which it still does
on less common resources.&lt;/li&gt;
&lt;li&gt;Guardrails come in layers. CLAUDE.md carries repo conventions,
permission rules deny apply and destroy while allowing fmt and
validate, hooks run scanners and validators on every edit, and
OS-level sandboxing sits underneath. For reaching cloud APIs and
live context, the article leans on
&lt;a href=&quot;/blog/model-context-protocol-mcp&quot;&gt;MCP servers&lt;/a&gt; instead of handing
the agent raw credentials.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Figure out how to use AI coding assistants safely
within your IaC workflows. The tools are here to stay and will only get better.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform engineers who want to try an agent
against a Terraform estate without gambling production on it. Give the
agent plan-only permissions first and let it earn trust per repo, the
same way a new team member would. When the agent itself becomes the
workload,
&lt;a href=&quot;/blog/agentic-ai-deployment-with-infrastructure-as-code&quot;&gt;deploying it with IaC&lt;/a&gt;
is the follow-up read.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/claude-code-for-infrastructure-as-code&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>claude-code</category><category>iac</category><category>ai-agents</category></item><item><title>How to Build a Well-Architected AWS Landing Zone</title><link>https://devopsmadness.com/blog/how-to-build-a-well-architected-aws-landing-zone</link><guid isPermaLink="true">https://devopsmadness.com/blog/how-to-build-a-well-architected-aws-landing-zone</guid><description>Control Tower, LZA, account factories or custom: how the AWS landing zone build routes compare, and the account-structure decisions that age well.</description><pubDate>Fri, 26 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; The landing zone is the highest-leverage early
decision in AWS, since accounts, identity, networking and guardrails all
inherit it. Every workload you add on top makes that foundation more
expensive to change.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The guide compares the build routes honestly. Control Tower gives a
quick start with opinionated defaults and limited customization.
Landing Zone Accelerator suits regulated industries with its
config-file approach. Gruntwork’s own accelerator is Terraform and
OpenTofu native. Fully custom is named the most expensive option over
time. Pick based on how much maintenance you want to own.&lt;/li&gt;
&lt;li&gt;OU design and account vending hurt most to change later, so spend your
thinking there first. Structure OUs around the policies you apply,
start simple with Security, Infrastructure and Workloads OUs, and let
vending automate security services, networking, identity federation
and cost alerts. Manual steps cause drift. Identity follows the same
rule: IAM Identity Center federated to your corporate provider,
permission sets by job function, no long-lived credentials in workload
accounts, and a break-glass procedure with its own alerting.&lt;/li&gt;
&lt;li&gt;Guardrails work in layers. SCPs hold the non-negotiables, Config rules
detect drift, and proactive controls reject noncompliant resources
before they deploy. Manage the landing zone itself with IaC from day
one and push every change through a pipeline. Console edits become
ungoverned drift. The same discipline drives the case I make for
&lt;a href=&quot;/blog/strengthen-aws-security-posture-with-robust-infrastructure-as-code-strategy&quot;&gt;strengthening AWS security posture with IaC&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;**What I’d add today: A well-architected landing zone is and will be one
of the best places to put serious time and effort in getting it right
before you scale on AWS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; anyone standing up multi-account AWS from
scratch, or re-platforming an organisation that grew one account at a
time. The guide also warns against treating the landing zone as a
one-time implementation, which is the trap most of those organisations
fell into.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.gruntwork.io/blog/how-to-build-a-well-architected-aws-landing-zone&quot;&gt;Read the full article on Gruntwork →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>platform-engineering</category><category>iac</category></item><item><title>Cloud Migration Security Guide: Risks &amp; Checklist</title><link>https://devopsmadness.com/blog/cloud-migration-security</link><guid isPermaLink="true">https://devopsmadness.com/blog/cloud-migration-security</guid><description>Security for cloud migrations phase by phase: shared responsibility, the risks that appear mid-move, and a checklist covering before and after.</description><pubDate>Tue, 09 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; Migrations create a window where data lives in
two places, identities double, and temporary access hardens into
permanent access. The guide builds on the observation that most cloud
security failures trace back to human error and misconfiguration, and a
migration is the moment both peak. The environment keeps changing after
cutover, so the guide treats security as continuous work. It is the
security companion to the planning work in
&lt;a href=&quot;/blog/on-prem-to-aws-migration&quot;&gt;moving from on-prem to AWS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The guide maps the risks to each migration phase and ends in a
runnable checklist. Before the move: incomplete asset inventories and
compliance gaps. During: data exposure in transit, credential sprawl
and misconfiguration. After: drift and decaying baselines. A single
flat risk list hides which of these apply to you this week.&lt;/li&gt;
&lt;li&gt;Know who owns what during the move. The shared responsibility boundary
shifts with each service type, managed offerings hand more of it to
the provider, and mid-migration your data, identities and
configurations sit on both sides of it at once. Enable logging for
every cloud service from day one; retrofitting it later rarely
happens.&lt;/li&gt;
&lt;li&gt;Expire migration access by design. Grant scoped, time-bound
credentials for migration tasks and revoke them when the task ends.
Use private transfer paths like VPN or Direct Connect for the data
move, deploy the new estate through IaC with policy scanning, and
re-verify encryption, logging and identity once workloads land. The
guide also splits credentials across humans, machines and agents, a
distinction that matters more now that agents run parts of the
pipeline.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Security primitives will be even more important
now with the powerful AI models being able to perform cyber attacks at scale.
Focus on the basics and make sure you have a robust security baseline.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams planning a lift to the cloud, and security
folks handed a migration halfway through. If the destination spans more
than one provider, the &lt;a href=&quot;/blog/multi-cloud-security&quot;&gt;multi-cloud security&lt;/a&gt;
problems start before the migration ends, so read them together.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/cloud-migration-security&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>devops-tooling</category><category>security</category></item><item><title>AI Coding Assistants and Infrastructure as Code: Velocity Without Losing Control</title><link>https://devopsmadness.com/blog/ai-coding-assistants-and-infrastructure-as-code-velocity-without-losing-control</link><guid isPermaLink="true">https://devopsmadness.com/blog/ai-coding-assistants-and-infrastructure-as-code-velocity-without-losing-control</guid><description>Six defense layers for running coding agents against IaC: credential isolation, permission modes, allow and deny rules, CLAUDE.md, hooks, sandboxing.</description><pubDate>Fri, 08 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; This is the closest thing to a manifesto for
what this site covers: agents make IaC work fast, and speed against
production infrastructure is only welcome with brakes. Gruntwork builds
six layered controls for Claude Code and shows working configuration for
each one, which makes this the piece to hand to your security review.
The closing line carries the argument: AI amplifies your workflow, and
if that workflow has no guardrails, it amplifies that too.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ground rules come before layers. The agent never deploys directly, it
gets short-lived read-only credentials by default, and everything it
does gets logged. For day-to-day IaC work the recommendation is plan
mode: Claude analyzes and proposes, a human approves each execution.&lt;/li&gt;
&lt;li&gt;Allow, ask and deny rules block terraform apply and destroy while
permitting fmt and validate. The article is honest about their
limits and treats them as noise reduction, with credential isolation
below and sandboxing above as the real boundary. The sandbox keeps
~/.aws/credentials unreadable even when a command slips past the
rules.&lt;/li&gt;
&lt;li&gt;CLAUDE.md and hooks make the repo teach the agent. Conventions like
module references and tagging standards live in the context file,
and a PostToolUse hook runs terraform validate after every edit so broken
code never reaches review. One caveat the piece flags: the agent
reasons from repository code and cannot see live infrastructure, so
drift detection stays your job.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Not using AI coding assistants and agentic
solutions for migrations, coding, infrastructure management means that
you miss out on substantial speed gains. Figure out what’s the best way
you can adjust these tools to your workflow for safe usage.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform teams adopting coding agents against
Terraform estates, and anyone whose security review asked how the agent
is contained.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.gruntwork.io/blog/ai-coding-assistants-and-infrastructure-as-code-velocity-without-losing-control&quot;&gt;Read the full article on Gruntwork →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>claude-code</category><category>ai-agents</category><category>iac</category></item><item><title>DevOps Practices in Government and the Public Sector</title><link>https://devopsmadness.com/blog/government-devops</link><guid isPermaLink="true">https://devopsmadness.com/blog/government-devops</guid><description>What DevOps looks like under public-sector constraints: compliance, security-first delivery, and tooling requirements that differ from startups.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Most DevOps writing assumes a startup’s freedom, while
public-sector teams work under procurement rules, audit trails and
security baselines. Here the ordering is reversed: security and compliance
gates come first, and the pipeline is built to satisfy them by default,
with auditability and data residency as hard tooling requirements.
Modernization succeeds through small proofs inside the rules, rarely
through big-bang transformation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers and leads in government or regulated
industries, and vendors trying to understand their constraints.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/government-devops&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>platform-engineering</category></item><item><title>What is Multi-Cloud Security? Challenges &amp; Best Practices</title><link>https://devopsmadness.com/blog/multi-cloud-security</link><guid isPermaLink="true">https://devopsmadness.com/blog/multi-cloud-security</guid><description>Security across more than one cloud: why it gets harder, the aspects that differ per provider, and practices that hold the whole thing together.</description><pubDate>Fri, 17 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Multi-cloud usually arrives by acquisition or by accident,
and security inherits the mess of three IAM dialects and three logging
stories. Centralize identity first, then normalize logging and detection
into one place, since nobody triages three consoles during an incident.
Policy as code and IaC are the only realistic path to consistent baselines
across providers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; security and platform teams inheriting a second
cloud, and architects being asked to plan for one.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/multi-cloud-security&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>security</category><category>devops-tooling</category></item><item><title>Infrastructure as Code with Ansible: Tutorial</title><link>https://devopsmadness.com/blog/ansible-infrastructure-as-code</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-infrastructure-as-code</guid><description>Using Ansible as an IaC tool rather than only for config management: where it fits, its limits, and a worked example provisioning AWS resources.</description><pubDate>Thu, 05 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Ansible was built for configuration management and gets
regularly pressed into provisioning, and this tutorial takes that usage
seriously with real AWS resources. It can provision, but it tracks no
state, so idempotency comes from modules checking reality on every run.
The strongest pattern pairs it with Terraform: one provisions, the other
configures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; Ansible shops weighing whether they need Terraform,
and IaC users curious what the playbook side offers.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-infrastructure-as-code&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>iac</category><category>devops-tooling</category></item><item><title>Migrate Amazon EC2 to ECS Express Mode using Kiro CLI and MCP servers</title><link>https://devopsmadness.com/blog/migrate-amazon-ec2-to-ecs-express-mode-using-kiro-cli-and-mcp-servers</link><guid isPermaLink="true">https://devopsmadness.com/blog/migrate-amazon-ec2-to-ecs-express-mode-using-kiro-cli-and-mcp-servers</guid><description>An agent-driven migration walkthrough: Kiro CLI with MCP servers discovers an EC2 workload, generates the ECS Express Mode setup and cleans up after.</description><pubDate>Thu, 26 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; Migrations are exactly the toil agents should
absorb. This walkthrough uses Kiro CLI with MCP servers to move an EC2
workload onto ECS Express Mode, with the agent doing discovery and
generation while you review the steps. If the protocol part is still
fuzzy, start with &lt;a href=&quot;/blog/model-context-protocol-mcp&quot;&gt;the MCP explainer&lt;/a&gt;;
this post shows what the plumbing buys you in practice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ECS Express Mode shrinks the target. It simplifies the workload
definition and orchestrates the supporting services itself, load
balancer and auto scaling included. A smaller deployment surface is a
big part of why an agent can drive this migration end to end.&lt;/li&gt;
&lt;li&gt;The MCP servers give the agent real context about your environment,
which separates a guided migration from generated guesswork. The AWS
server provides authenticated access to the account and the ECS
server covers containerization, ECR and the ECS lifecycle. From one
prompt, Kiro inspects the app, writes the Dockerfile, tests the
container locally, pushes the image to ECR, creates the IAM roles,
deploys to Express Mode and validates service health. AWS pitches the
flow as near zero configuration with validation and rollback built
in; verify those claims against your own workload.&lt;/li&gt;
&lt;li&gt;The demo stack is realistic. The starting point is a CDK-deployed
Node.js application with a load balancer, Cognito, S3 and DynamoDB,
and the walkthrough ends with proper cleanup of the legacy stack. The
prerequisites are ordinary: Kiro CLI, the AWS CLI, Docker and CDK,
plus two MCP server entries in an mcp.json file. You
still approve each step along the way, the same trust model that
makes &lt;a href=&quot;/blog/claude-code-for-infrastructure-as-code&quot;&gt;Claude Code work on infrastructure
code&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Kiro has become one of the most powerfull AI
coding assistants out there. Look into &lt;a href=&quot;https://kiro.dev/crew/&quot;&gt;Kiro Crew&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams still running container-shaped workloads
on EC2, anyone planning &lt;a href=&quot;/blog/on-prem-to-aws-migration&quot;&gt;a bigger move into
AWS&lt;/a&gt;, and anyone curious what agentic
migration looks like in practice.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/containers/migrate-amazon-ec2-to-ecs-express-mode-using-kiro-cli-and-mcp-servers/&quot;&gt;Read the full article on AWS →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>ai-agents</category></item><item><title>From Terraform to OpenTofu: A Migration Guide</title><link>https://devopsmadness.com/blog/from-terraform-to-opentofu-a-migration-guide</link><guid isPermaLink="true">https://devopsmadness.com/blog/from-terraform-to-opentofu-a-migration-guide</guid><description>Why teams move off Terraform after the licence change, when staying put still makes sense, and a migration path with a tested rollback to 1.9.x.</description><pubDate>Mon, 19 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; The licence change forced a decision on every
platform team, and OpenTofu is close to a drop-in replacement from some
Terraform versions and a diverging fork from others. The fork keeps the
MPL 2.0 licence, and releases 1.7 through 1.9 added native state
encryption, variables in backend configuration and provider iteration
with for_each. Each release widens the gap, so the cost of waiting
grows. Weighing the switch belongs in any serious IaC modernization plan,
whichever way you decide.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Match the migration path to your starting version. Document the
Terraform and provider versions in every project first. Before
Terraform 1.6 the switch is close to a binary swap. From 1.9.x the
guide lays out a defined nine-step sequence with specific code changes
around backend configuration, and it is reversible: rollback reverts
the code, reinitializes with terraform init, and verifies a clean
plan.&lt;/li&gt;
&lt;li&gt;Check provider and module compatibility first. Most providers and
modules work unchanged, but configurations that reference
registry.terraform.io explicitly need updates, and search.opentofu.org
confirms what the OpenTofu registry actually mirrors. Update CI/CD to
run tofu in place of terraform commands.&lt;/li&gt;
&lt;li&gt;Decide the rollback plan before you migrate, then roll out in stages.
Back up state, test the recovery procedure before production, and
start with low-risk stacks. Verify the cutover with a small change
before trusting it with real work. Fidelity took two quarters to reach
70% of projects. Staying on Terraform remains sensible for teams
invested in
the wider HashiCorp stack alongside Vault or Consul.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; OpenTofu has been adding innovative features
pushing the boundaries such as Native, built-in state encryption, early variable evaluation,
provider iteration with for_each, exclude specific resources from operations,
OCI registry support&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform teams still on Terraform and weighing a
move, especially with a large multi-team estate where a botched cutover
is expensive. A migration is also a natural point to tighten the
workflow; the Terraform best practices you already follow carry over to
tofu unchanged.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.stackguardian.io/post/from-terraform-to-opentofu-a-migration-guide&quot;&gt;Read the full article on StackGuardian →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>terraform</category><category>iac</category></item><item><title>Deploying Agentic AI Solutions with Infrastructure as Code</title><link>https://devopsmadness.com/blog/agentic-ai-deployment-with-infrastructure-as-code</link><guid isPermaLink="true">https://devopsmadness.com/blog/agentic-ai-deployment-with-infrastructure-as-code</guid><description>Running AI agents as production workloads: core deployment principles, Amazon Bedrock AgentCore, and a Terraform walkthrough for shipping an agent.</description><pubDate>Fri, 09 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; Agents are usually shown as laptop demos; this
piece treats one as a production service and codifies the whole
deployment with Terraform on Bedrock AgentCore. Agent infrastructure
deserves the same IaC discipline as the rest of the estate, and this
walkthrough shows what that looks like end to end on AWS: identity,
isolation, memory and observability, all defined in code. The gap
between demo and service is where most agent projects stall.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AgentCore packages the operational parts nobody wants to build.
Runtime gives each session an isolated environment for workloads up
to eight hours, Memory handles short-term conversation state and
long-term persistence, Identity keeps OAuth tokens and API keys in a
vault, and Gateway turns REST APIs and Lambda functions into agent
tools, with &lt;a href=&quot;/blog/model-context-protocol-mcp&quot;&gt;MCP&lt;/a&gt; support built in.
Built-in tools like Code Interpreter and Browser run in isolated
sandboxes.&lt;/li&gt;
&lt;li&gt;The walkthrough deploys a working weather agent in Terraform: the
runtime, the Browser tool for fetching data, Code Interpreter for
Python analysis, Memory for user preferences, S3 with IAM controls
for results, and CodeBuild for the container image. Everything is
reviewable, reproducible and simple to tear down. The prerequisites
stay modest: Terraform 1.6, the AWS CLI and Python 3.11.&lt;/li&gt;
&lt;li&gt;Least privilege matters more for agents than for humans, since they
act faster and never get tired. Scope IAM narrowly, start with a
small deployment, and let the built-in observability (CloudWatch and
OpenTelemetry) prove the agent behaves before you scale it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; AgentCore has been maturing day by day and
positioned as one of the core and focus AWS services. Latest capabilities in August 2026
include persistent compute runtime instances, temporal guardrail policies powered by the open-source language Dogwood.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams moving a first agent from prototype to
production on AWS. If an agent is also writing the Terraform, the
&lt;a href=&quot;/blog/claude-code-for-infrastructure-as-code&quot;&gt;Claude Code guide&lt;/a&gt; covers
the authoring side of the same workflow, and the
&lt;a href=&quot;/blog/aws-generative-ai-developer-professional-cheat-sheet&quot;&gt;AWS generative AI cert cheat sheet&lt;/a&gt;
maps where AgentCore sits in the wider Bedrock stack.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/agentic-ai-deployment-with-infrastructure-as-code&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ai-agents</category><category>iac</category><category>aws</category></item><item><title>IaC Testing for DevOps: Types, Tools &amp; Examples</title><link>https://devopsmadness.com/blog/infrastructure-as-code-iac-testing</link><guid isPermaLink="true">https://devopsmadness.com/blog/infrastructure-as-code-iac-testing</guid><description>A working taxonomy of IaC testing: static checks, unit, integration and policy tests, with examples per tool and a pipeline to hang them on.</description><pubDate>Wed, 10 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Application code gets tests by default while infrastructure
code mostly gets a plan and a prayer. This guide lays out the IaC testing
layers and what each catches: static analysis is nearly free and catches a
surprising share, real confidence needs integration tests against real
resources, and policy as code scales better than review comments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams whose only IaC gate is a human reading a
plan, and anyone building out a platform pipeline.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/infrastructure-as-code-iac-testing&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>iac</category><category>devops-tooling</category></item><item><title>Strengthen AWS Security Posture with Robust Infrastructure as Code Strategy</title><link>https://devopsmadness.com/blog/strengthen-aws-security-posture-with-robust-infrastructure-as-code-strategy</link><guid isPermaLink="true">https://devopsmadness.com/blog/strengthen-aws-security-posture-with-robust-infrastructure-as-code-strategy</guid><description>Security posture as an IaC problem: Control Tower controls, baseline account vending, centralized monitoring, audit trails and drift prevention.</description><pubDate>Mon, 10 Nov 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; This APN piece frames security posture as an IaC problem:
when accounts, controls and baselines are code, security is enforced at
provision time instead of discovered at audit time. Control Tower controls
plus baseline-equipped account vending mean new accounts start compliant.
Drift detection doubles as a security control, since an unexplained change
to security infrastructure is a finding, whatever caused it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; security engineers who keep finding the same
misconfigurations, and platform teams codifying an AWS estate.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/apn/strengthen-aws-security-posture-with-robust-infrastructure-as-code-strategy/&quot;&gt;Read the full article on AWS →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>iac</category><category>security</category></item><item><title>Building Golden Paths: Standardizing Cloud Deployments</title><link>https://devopsmadness.com/blog/building-golden-paths-standardizing-cloud-deployments</link><guid isPermaLink="true">https://devopsmadness.com/blog/building-golden-paths-standardizing-cloud-deployments</guid><description>Golden paths done properly: why standardization keeps failing, how to build paved roads teams actually use, the usual pitfalls and success metrics.</description><pubDate>Wed, 22 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Most standardization attempts die as pdf guidelines nobody
opens; golden paths work because the standard way is also the easiest way.
A golden path is a product, and adoption is its only real metric, since
mandates create workarounds and good defaults create users. The
predictable pitfalls: paths too rigid for real needs, and paths built once
with no feedback loop.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform teams tired of writing standards
documents, and leads deciding between governance and enablement.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.stackguardian.io/post/building-golden-paths-standardizing-cloud-deployments&quot;&gt;Read the full article on StackGuardian →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>platform-engineering</category><category>iac</category></item><item><title>How to Migrate From On-premise to AWS Cloud</title><link>https://devopsmadness.com/blog/on-prem-to-aws-migration</link><guid isPermaLink="true">https://devopsmadness.com/blog/on-prem-to-aws-migration</guid><description>A structured path from datacenter to AWS: migration strategies, the three-phase framework, a step-by-step walkthrough and the common traps to avoid.</description><pubDate>Fri, 03 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Migrations fail on sequencing more than on technology. The
seven Rs are a triage tool, and most estates end up mixed: rehost the
bulk, refactor the few that earn it, retire more than expected. Assessment
is the phase teams shortchange, and the operating model change deserves
planning alongside the technical move.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams with a migration mandate and a datacenter
lease ending, and engineers translating strategy slides into a plan.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/on-prem-to-aws-migration&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>devops-tooling</category></item><item><title>AWS CloudFormation Drift Detection &amp; Remediation Guide</title><link>https://devopsmadness.com/blog/aws-cloudformation-drift-detection</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-cloudformation-drift-detection</guid><description>Drift in CloudFormation stacks: how detection works, its blind spots, the remediation options and the practices that stop drift from coming back.</description><pubDate>Tue, 23 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; CloudFormation ships drift detection, and this guide covers
using it honestly: detection is on demand and has documented blind spots
worth knowing before trusting a green result. Remediation is rarely just
re-apply, since import or careful template updates preserve the fix
someone made for a reason. Prevention is organizational: lock down console
writes and make the pipeline the only door.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; CloudFormation operators, and anyone auditing an
estate where the console has had visitors.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/aws-cloudformation-drift-detection&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>iac</category></item><item><title>Kubernetes right-sizing with metrics-driven GitOps automation</title><link>https://devopsmadness.com/blog/kubernetes-right-sizing-with-metrics-driven-gitops-automation</link><guid isPermaLink="true">https://devopsmadness.com/blog/kubernetes-right-sizing-with-metrics-driven-gitops-automation</guid><description>Closing the loop on EKS resource requests: real usage metrics drive recommendations that land as GitOps pull requests instead of manual tuning.</description><pubDate>Thu, 11 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Resource requests are guesses that never get revised, and
clusters pay for the padding forever. This walkthrough builds the loop
that fixes it: metrics feed recommendations, which arrive as reviewed
GitOps pull requests with a full audit trail. Mind the metrics window,
since recommendations from a quiet week will starve the busy one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; EKS operators with overprovisioned clusters, and
FinOps-minded platform folks who want savings with review gates.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/containers/kubernetes-right-sizing-with-metrics-driven-gitops-automation/&quot;&gt;Read the full article on AWS →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>kubernetes</category><category>aws</category><category>devops-tooling</category></item><item><title>Building a developer portal with Port on AWS to Boost Engineering Efficiency</title><link>https://devopsmadness.com/blog/building-a-developer-portal-with-port-on-aws-to-boost-engineering-efficiency</link><guid isPermaLink="true">https://devopsmadness.com/blog/building-a-developer-portal-with-port-on-aws-to-boost-engineering-efficiency</guid><description>Standing up an internal developer portal on AWS with Port: the productivity case, what a portal changes for teams and a fast path to a working one.</description><pubDate>Tue, 05 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Developer portals get discussed in the abstract far more
than they get built, and this APN piece takes the concrete route to a
working one on AWS with Port. The portal earns its keep as a single entry
point: service catalog, scorecards and self-service actions in one place.
Integration speed beats feature breadth at the start, and adoption is the
metric.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform teams evaluating the build-or-buy portal
question, and engineering leads chasing onboarding time.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/apn/building-a-developer-portal-with-port-on-aws-to-boost-engineering-efficiency/&quot;&gt;Read the full article on AWS →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>platform-engineering</category></item><item><title>What Is MCP? Model Context Protocol Explained Simply</title><link>https://devopsmadness.com/blog/model-context-protocol-mcp</link><guid isPermaLink="true">https://devopsmadness.com/blog/model-context-protocol-mcp</guid><description>MCP without the hype: the architecture, how servers and clients talk, a demo project, and where the protocol sits next to plain APIs and tools.</description><pubDate>Mon, 04 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; MCP became the default way to give agents
tools, and most of the agent work covered on this site sits on top of
it. Point &lt;a href=&quot;/blog/claude-code-for-infrastructure-as-code&quot;&gt;Claude Code at infrastructure
code&lt;/a&gt; or let an agent
&lt;a href=&quot;/blog/migrate-amazon-ec2-to-ecs-express-mode-using-kiro-cli-and-mcp-servers&quot;&gt;migrate an EC2 workload to
ECS&lt;/a&gt;
and the protocol underneath is the same. This piece is the plain
version: the architecture, a working demo, and where MCP sits next to
ordinary APIs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The mental model is small. Hosts are the applications a user talks to
(Claude Desktop, IDEs, custom agents) and they own permissions and
user interaction. Clients keep a one-to-one connection to each server
and speak JSON-RPC 2.0. Servers expose three capability types: tools
the model can call, resources it can pull into context, and prompt
templates that guide how both get used.&lt;/li&gt;
&lt;li&gt;MCP complements APIs by standardizing how a model discovers and calls
capabilities. A client can ask a server what it offers at runtime, so
agents pick up new tools without being rebuilt against fixed
endpoints. That discovery step is what makes agent tooling
composable, and it is why vendors from GitHub to AWS to Spacelift now
ship their own servers.&lt;/li&gt;
&lt;li&gt;Getting started is cheap and security is the catch. The demo is a
&lt;code&gt;.vscode/mcp.json&lt;/code&gt; file, a Perplexity server and VS Code agent mode,
with the API key prompted for at first use. A working server takes an
afternoon, so build one before forming an opinion about the protocol.
Then treat every server you install like a dependency with production
access, because prompt injection and tool abuse are the pressing
risks the article calls out.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;**What I’d add today: The &lt;a href=&quot;https://blog.modelcontextprotocol.io/posts/2026-07-28/&quot;&gt;2026-07-28 specification&lt;/a&gt;
brings a stateless protocol core, Multi Round-Trip Requests, header-based routing, cacheable list results,
authorization hardening, a formal extensions framework, and updated Tier 1 SDKs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers wiring agents to real systems, teams
&lt;a href=&quot;/blog/agentic-ai-deployment-with-infrastructure-as-code&quot;&gt;deploying agentic solutions with
IaC&lt;/a&gt;, and
anyone who keeps hearing MCP in meetings and wants the plain version.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/model-context-protocol-mcp&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ai-agents</category><category>devops-tooling</category></item><item><title>What is Observability? Metrics, Logs &amp; Traces Overview</title><link>https://devopsmadness.com/blog/observability-metrics-logs-traces</link><guid isPermaLink="true">https://devopsmadness.com/blog/observability-metrics-logs-traces</guid><description>The three pillars treated practically: what metrics, logs and traces each answer, an OpenTelemetry implementation path and guidelines that scale.</description><pubDate>Fri, 04 Jul 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Metrics tell you something is wrong, traces tell you where,
logs tell you why, so design collection around the questions. OpenTelemetry
is the sane default now: one instrumentation layer, vendor choice
deferred. Cardinality and retention are where observability bills explode,
so decide both deliberately.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams standing up observability from scratch, and
anyone consolidating three agents into one pipeline.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/observability-metrics-logs-traces&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>platform-engineering</category></item><item><title>DevOps Release Management: Stages &amp; Best Practices</title><link>https://devopsmadness.com/blog/devops-release-management</link><guid isPermaLink="true">https://devopsmadness.com/blog/devops-release-management</guid><description>Release management that fits DevOps: the stages from planning to rollback, the friction points teams hit and practices that keep releases boring.</description><pubDate>Thu, 26 Jun 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Release management survives in DevOps as automation plus
clear stages: plan, build, test, deploy, verify, roll back. Rollback
deserves as much rehearsal as deployment, since an untested rollback plan
is a hope, and hope pages you at night. Progressive delivery turns
releases into experiments with small blast radii.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams formalizing how software ships, and release
managers translating their role into a DevOps organization.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/devops-release-management&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>platform-engineering</category></item><item><title>How AI can Impact Platform Engineering Implementations</title><link>https://devopsmadness.com/blog/how-ai-can-impact-platform-engineering-implementations</link><guid isPermaLink="true">https://devopsmadness.com/blog/how-ai-can-impact-platform-engineering-implementations</guid><description>Where AI lands in platform work: infrastructure automation, smarter self-service, predictive reliability, security and cost, with adoption stages.</description><pubDate>Tue, 17 Jun 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; Platform teams are getting asked where AI
fits on the roadmap. This piece is a usable map of where AI concretely lands in platform
work: automation, self-service, reliability prediction, security and
cost. It reads best with a clear picture of what an internal developer
platform is in the first place, because AI extends a working platform.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The near-term wins: Code generation for Terraform
configs and Kubernetes manifests, natural language self-service interfaces, and
automated policy enforcement are available today and carry little
risk. The article’s advice is to start there, keep human
review on anything that touches production, and work toward the
harder capabilities gradually.&lt;/li&gt;
&lt;li&gt;The predictive work needs data your platform may not collect yet.
Failure prediction, anomaly detection beyond threshold alerts, and
rightsizing recommendations all depend on clean metrics and usage
history. Data quality and explainable outputs come before model
choice. Self-healing systems and automated incident response sit at
the far end of that curve, well after the basics are in place.&lt;/li&gt;
&lt;li&gt;The honest tension is determinism: Platform operations were built on
systems that behave the same way every time, and AI outputs vary. The
article treats that as an integration problem to manage with gradual
adoption and human oversight, and points at MCP as the emerging
standard for wiring agents into cloud resources, CI/CD tooling and
monitoring.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Agents in infrastructure workflows are here to stay.
We have to figure out how to make them more safe, controllable, and auditable
in order to make our lives easier with AI embedded in IaC.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform leads writing next year’s roadmap, and
engineers separating the plausible from the pitch deck. The adoption
stages give both groups a defensible order of operations.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.stackguardian.io/post/how-ai-can-impact-platform-engineering-implementations&quot;&gt;Read the full article on StackGuardian →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>platform-engineering</category><category>ai-agents</category></item><item><title>Top 19 AWS Monitoring Tools &amp; 8 Best Practices for 2026</title><link>https://devopsmadness.com/blog/aws-monitoring-tools</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-monitoring-tools</guid><description>The AWS monitoring landscape mapped: native services and third-party tools compared, with the practices that make any of them actually useful.</description><pubDate>Thu, 15 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; A map of the crowded AWS monitoring aisle, native stack on
one side and specialized tools on the other. Start with CloudWatch, X-Ray
and friends, which cover more than teams assume at predictable cost, and
let third-party tools earn their place on cross-cloud visibility or
correlation. The practices carry the weight: alert on symptoms, tag for
cost attribution, review dashboards someone actually opens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams choosing or consolidating monitoring on AWS,
especially anyone paying for three tools that overlap.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/aws-monitoring-tools&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>devops-tooling</category></item><item><title>Implementing Cloud Security Best Practices with StackGuardian</title><link>https://devopsmadness.com/blog/implementing-cloud-security-best-practices-with-stackguardian</link><guid isPermaLink="true">https://devopsmadness.com/blog/implementing-cloud-security-best-practices-with-stackguardian</guid><description>Cloud security practices made enforceable: the implementation challenges, the practices worth codifying and turning both into automated guardrails.</description><pubDate>Tue, 29 Apr 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Everyone can list cloud security best practices, and
implementation is where they go to die, usually as review comments and
wiki pages. Policy as code closes the gap, moving security review from
opinions in pull requests to rules that fail pipelines consistently. Start
with the practices that automate cleanly: encryption defaults, tagging,
identity boundaries and drift.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; security and platform folks who own cloud
baselines, and teams whose security process is still a checklist.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.stackguardian.io/post/implementing-cloud-security-best-practices-with-stackguardian&quot;&gt;Read the full article on StackGuardian →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>iac</category><category>devops-tooling</category><category>security</category></item><item><title>KubeCon + CloudNativeCon Europe 2025: Reflections on Cloud Native Evolution</title><link>https://devopsmadness.com/blog/kubecon-cloudnativecon-europe-2025-reflections</link><guid isPermaLink="true">https://devopsmadness.com/blog/kubecon-cloudnativecon-europe-2025-reflections</guid><description>Reflections from KubeCon + CloudNativeCon Europe 2025 in London: AI-enabled platform engineering, unified observability, and FinOps as Kubernetes turns ten.</description><pubDate>Tue, 15 Apr 2025 00:00:00 GMT</pubDate><content:encoded>&lt;aside class=&quot;tldr border-line rounded-lg border p-5&quot; aria-label=&quot;TL;DR&quot;&gt;&lt;p class=&quot;font-mono text-sm font-semibold&quot;&gt;TL;DR&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;AI agents are becoming standard parts of platform engineering, and
mature platforms are the foundation that makes them usable.&lt;/li&gt;
&lt;li&gt;OpenTelemetry is now the de facto observability standard; graduation
feels like a matter of time.&lt;/li&gt;
&lt;li&gt;Expect cost insights to become as standard as monitoring dashboards.&lt;/li&gt;
&lt;/ul&gt;&lt;/aside&gt;
&lt;p&gt;KubeCon + CloudNativeCon Europe 2025, held in London from April 1–4, was
truly a landmark event for the cloud native community.&lt;/p&gt;
&lt;p&gt;With around ~13K attendees, the conference showcased the remarkable
maturity and continued innovation within the Kubernetes ecosystem as it
celebrated its 10th anniversary.&lt;/p&gt;
&lt;p&gt;As someone deeply immersed in the cloud native space, I found the
experience both enlightening and energizing: a perfect blend of technical
depth, community connection, and forward-looking insights.&lt;/p&gt;
&lt;h2 id=&quot;key-themes-and-emerging-trends&quot;&gt;Key themes and emerging trends&lt;/h2&gt;
&lt;h3 id=&quot;ai-enabled-platform-engineering&quot;&gt;AI-enabled platform engineering&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;/topics/ai-agents&quot;&gt;AI agents&lt;/a&gt; are now considered essential components of
platform engineering efforts, even though the industry is still
determining exactly how they will be applied. AI workloads need robust
telemetry, runtime controls, and a well-defined operational model, meaning
that successful
&lt;a href=&quot;/blog/how-ai-can-impact-platform-engineering-implementations&quot;&gt;platform engineering implementations&lt;/a&gt;
can be the foundations for effective AI usage across an organization.&lt;/p&gt;
&lt;p&gt;Check out Kagent, a Kubernetes native framework for building AI agents
that was recently open-sourced and is being donated to CNCF as a sandbox
project. Organizations were discussing prioritization of AI agent use
cases around runtime security, reliability and incident remediation that
affect their whole engineering landscape.&lt;/p&gt;
&lt;h3 id=&quot;unified-observability-and-ai-driven-insights&quot;&gt;Unified observability and AI-driven insights&lt;/h3&gt;
&lt;p&gt;Breaking down silos between metrics, logs, and traces was a major focus,
with significant progress on creating standardized query languages for
observability data. OpenTelemetry has emerged as the de facto standard for
observability, with organizations adopting it to standardize
instrumentation across their applications. It’s only a matter of time
before OpenTelemetry achieves graduated status with the CNCF.&lt;/p&gt;
&lt;p&gt;eBay’s experiments with LLMs to summarize and explain observability data
was particularly fascinating, showing how they’re managing 15PB of logs
daily across 4,600 microservices. However, as one speaker noted, “If we
attempted to feed all this observability data into an LLM, we would exceed
its context window, leading to hallucinations and inaccurate summaries.”&lt;/p&gt;
&lt;h3 id=&quot;finops-and-cost-optimization&quot;&gt;FinOps and cost optimization&lt;/h3&gt;
&lt;p&gt;As Kubernetes deployments scale, cost management has become increasingly
important. The conference featured discussions on using Open Policy Agent
(OPA) beyond security for cost optimization, enforcing policies for
resource usage efficiency, integrating with tools like OpenCost for
real-time cost monitoring, and implementing “shift left” approaches to
cost management. In the future, expect to see cost insights become as
standard as monitoring dashboards.&lt;/p&gt;
&lt;h2 id=&quot;looking-forward&quot;&gt;Looking forward&lt;/h2&gt;
&lt;p&gt;The conference provided a clear vision of where the cloud native ecosystem
is heading: toward a world where previously separate concerns are
addressed holistically. Platforms have the potential to enable
unprecedented agility and control, where security is built in by default,
and where AI augments human capabilities rather than replacing them.&lt;/p&gt;</content:encoded><category>kubernetes</category><category>opinion</category></item><item><title>The Illusion of Infrastructure Automation Maturity</title><link>https://devopsmadness.com/blog/the-illusion-of-infrastructure-automation-maturity</link><guid isPermaLink="true">https://devopsmadness.com/blog/the-illusion-of-infrastructure-automation-maturity</guid><description>Why teams overestimate their automation maturity: the gap between having pipelines and trusting them, the usual pitfalls, and ways to close it.</description><pubDate>Tue, 15 Apr 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; Most teams rate their automation maturity by
what exists rather than by what they trust, and a pipeline nobody dares
run on Friday is not maturity. The survey behind this piece puts numbers
on the gap: 45% of organizations believe they operate at high automation
maturity, while only 14% show the behaviors that back it up. That
distance between self-image and evidence is the useful part, because
false confidence is exactly what stops teams from finding their gaps and
fixing them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The numbers undercut the confidence. Half of the surveyed organizations
need a week or more to ship an infrastructure change to production, and
43% admit they rerun deployments more than four times before getting
them right. Both figures come from teams that call themselves mature.
Scoring yourself against a defined
&lt;a href=&quot;/blog/devops-maturity-model&quot;&gt;maturity model&lt;/a&gt; with named levels beats
trusting the internal narrative.&lt;/li&gt;
&lt;li&gt;The pitfalls are quiet: vanity metrics tracked in isolation instead of
holistic DORA-style measurement, tools adopted without a coherent plan
that end up fragmenting workflows into silos, Day-2 operations like
patching and optimization neglected once provisioning works, and
&lt;a href=&quot;/blog/what-is-configuration-drift&quot;&gt;drift nobody measures&lt;/a&gt; because
security governance stayed weak. Weak guardrails then surface as
vulnerabilities and repeated redeployments.&lt;/li&gt;
&lt;li&gt;Closing the gap starts with measuring outcomes instead of counting
tools. The prescription is concrete: benchmark objectively with a
self-assessment, embed policy-as-code and vulnerability scanning early
in the development cycle, and use platform engineering to balance
developer self-service with centralized governance. True maturity shows
up in behaviors and results, wherever the tooling came from.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Infrastructure and platform engineering maturity
matters now more than every with AI workflows and agentic implemetantations
reaching the infrastructure layer. Focus on the basics first before you embed AI and agents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform leads who suspect their automation story
sounds better in slides than it feels on call. If an honest assessment
confirms the suspicion, a structured
&lt;a href=&quot;/blog/iac-modernization&quot;&gt;modernization roadmap&lt;/a&gt; covering state,
guardrails and self-service is the follow-up read.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/the-illusion-of-infrastructure-automation-maturity&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>opinion</category><category>iac</category><category>platform-engineering</category></item><item><title>EKS Auto Mode: Simplify Kubernetes Operations</title><link>https://devopsmadness.com/blog/eks-auto-mode</link><guid isPermaLink="true">https://devopsmadness.com/blog/eks-auto-mode</guid><description>EKS Auto Mode examined: what AWS now manages for you, how it compares with other EKS options, a deployment tutorial and where the limits sit.</description><pubDate>Wed, 09 Apr 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; This one pairs with my AWS Summit Amsterdam talk on the same
topic. Auto Mode moves node management, autoscaling and core add-ons onto
the AWS side of the line, with the Karpenter-based node story as the
substance behind the name. The trade is control for operations, and the
management premium on top of EC2 should be judged against the engineering
time it replaces.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams running EKS with a thin platform crew, and
anyone evaluating how much cluster operations they still want to own.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/eks-auto-mode&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>kubernetes</category><category>aws</category></item><item><title>Harnessing AI to Revolutionize Test Coverage Analysis</title><link>https://devopsmadness.com/blog/harnessing-ai-to-revolutionize-test-coverage-analysis</link><guid isPermaLink="true">https://devopsmadness.com/blog/harnessing-ai-to-revolutionize-test-coverage-analysis</guid><description>Test coverage beyond the percentage: what the metrics really measure, where AI improves gap analysis and generation, and the risks of trusting it.</description><pubDate>Sun, 30 Mar 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Coverage numbers are the most gamed metric in software: a
high percentage says lines ran, and nothing about whether anything was
verified. AI genuinely helps at gap analysis and drafting tests for
uncovered paths, which turns coverage reports into work items. The risk is
generated tests that assert the bug, so review remains the job.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; developers who inherited a coverage target, and
QA engineers evaluating AI tooling past the demo.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.qodo.ai/blog/harnessing-ai-to-revolutionize-test-coverage-analysis/&quot;&gt;Read the full article on Qodo →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ai-agents</category><category>devops-tooling</category></item><item><title>How AI Code Assistants Are Revolutionizing Test-Driven Development</title><link>https://devopsmadness.com/blog/ai-code-assistants-test-driven-development</link><guid isPermaLink="true">https://devopsmadness.com/blog/ai-code-assistants-test-driven-development</guid><description>TDD and code assistants combined: how tests written first constrain generation, a working AI-TDD loop, and the advantages with their caveats.</description><pubDate>Thu, 20 Mar 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Generative AI writes plausible code, and plausible is the
problem. TDD turns out to be a natural harness: tests written first give
the assistant a checkable target, and the red-green cycle catches
confident nonsense the same way it catches human mistakes. The tests
themselves still need review, and the loop rewards small steps over big
prompts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; developers using assistants daily who want more
than autocomplete, and TDD practitioners curious what changes.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.qodo.ai/blog/ai-code-assistants-test-driven-development/&quot;&gt;Read the full article on Qodo →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ai-agents</category><category>devops-tooling</category></item><item><title>10 Tips for Selecting the Perfect AI Code Assistant for Your Development Needs</title><link>https://devopsmadness.com/blog/tips-selecting-perfect-ai-code-assistant</link><guid isPermaLink="true">https://devopsmadness.com/blog/tips-selecting-perfect-ai-code-assistant</guid><description>A selection checklist for AI code assistants: language support, integration, context handling, output quality, security terms, cost and team fit.</description><pubDate>Mon, 17 Mar 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Teams pick AI assistants the way they pick lunch: whatever
is closest. Context handling separates the tools more than model choice
does, and integration fit beats raw capability, since the best suggestions
in the wrong place go unused. Read the security and privacy terms
properly; where code travels and what trains on it are contract questions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineering leads running a tool evaluation, and
developers making the case for a specific assistant.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.qodo.ai/blog/tips-selecting-perfect-ai-code-assistant/&quot;&gt;Read the full article on Qodo →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ai-agents</category><category>devops-tooling</category></item><item><title>Ansible vs. Jenkins - Key Differences and Comparison</title><link>https://devopsmadness.com/blog/ansible-vs-jenkins</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-vs-jenkins</guid><description>Two tools that keep getting compared for the wrong reasons: what each is for, where they genuinely overlap, and how they work well together.</description><pubDate>Thu, 06 Mar 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Jenkins orchestrates pipelines, Ansible changes host state,
and the overlap is limited to triggering tasks. The common pattern uses
Jenkins to decide when and Ansible to define what: pipeline stages calling
playbooks. If you are choosing one, you are probably asking the wrong
question, since most stacks that need one eventually need both.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers untangling CI/CD responsibilities, and
anyone whose team debates this in tooling meetings.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-vs-jenkins&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>devops-tooling</category></item><item><title>Observability vs Monitoring: Key Differences Explained</title><link>https://devopsmadness.com/blog/observability-vs-monitoring</link><guid isPermaLink="true">https://devopsmadness.com/blog/observability-vs-monitoring</guid><description>Monitoring and observability separated properly: what each does, how they relate, when each is enough and how to build toward both sensibly.</description><pubDate>Thu, 13 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Monitoring watches for known failure modes, observability
lets you interrogate unknown ones, and the distinction decides what you
build and what you buy. The two complement each other: dashboards and
alerts on top, rich telemetry underneath for the incidents that fit no
dashboard. Get monitoring right first, then invest in the
high-cardinality telemetry that makes systems explorable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; anyone writing an observability strategy, and
engineers who suspect their dashboards only cover the failures already
seen.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/observability-vs-monitoring&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>platform-engineering</category></item><item><title>Empower your Dev Teams: The Value of Self-Service Infrastructure</title><link>https://devopsmadness.com/blog/empower-your-dev-teams-the-value-of-self-service-infrastructure</link><guid isPermaLink="true">https://devopsmadness.com/blog/empower-your-dev-teams-the-value-of-self-service-infrastructure</guid><description>The case for self-service infrastructure: what it is, the value for teams and organizations, an implementation path and the honest challenges.</description><pubDate>Fri, 31 Jan 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Ticket queues are how infrastructure teams become
bottlenecks with good intentions, and self-service is the exit. Guardrails
are the enabler: it works when the safe path is predefined rather than
when everyone gets admin. Start with the most requested resources, since
one well-built template kills more tickets than a portal full of
half-built ones.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; infrastructure leads measuring their week in
tickets, and platform engineers designing their first vending flow.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.stackguardian.io/post/empower-your-dev-teams-the-value-of-self-service-infrastructure&quot;&gt;Read the full article on StackGuardian →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>platform-engineering</category><category>iac</category></item><item><title>16 DevOps Metrics You Should Be Tracking [DORA &amp; Other]</title><link>https://devopsmadness.com/blog/devops-metrics</link><guid isPermaLink="true">https://devopsmadness.com/blog/devops-metrics</guid><description>The DevOps numbers worth watching: DORA four plus the supporting metrics, how to implement the measurement and which tools track them honestly.</description><pubDate>Wed, 15 Jan 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; The DORA four (deployment frequency, lead time, change
failure rate, time to restore) tell most of the delivery story, with a
dozen supporting metrics around them. Every metric needs an owner and a
decision it informs, since orphan metrics rot into wallpaper. Watch trends
over absolutes, and never wire metrics to individual performance unless
you want them gamed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineering leads building a measurement practice,
and teams whose current metric is vibes.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/devops-metrics&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>platform-engineering</category></item><item><title>AWS AI Practitioner Certification Cheat Sheet</title><link>https://devopsmadness.com/blog/aws-ai-practitioner-certification-cheat-sheet</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-ai-practitioner-certification-cheat-sheet</guid><description>AWS AI Practitioner Certification exam study notes, exam pointers, and cheat sheet.</description><pubDate>Mon, 06 Jan 2025 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;AWS AI Practitioner Certification exam study notes, exam pointers, and cheat sheet.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_ai_practitioner_cheatsheet/1*oHaXw7Pm_OFGyrqra55R1A.jpeg&quot; alt=&quot;Abstract 3D render of a crystal polyhedron releasing streams of pink and mint particles&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Photo by &lt;a href=&quot;https://unsplash.com/@googledeepmind?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash&quot;&gt;Google DeepMind&lt;/a&gt; on &lt;a href=&quot;https://unsplash.com/photos/a-crystal-vase-with-pink-flowers-in-it-Oy2yXvl1WLg?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash&quot;&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This material was gathered during my preparation for the AWS AI Practitioner Certification Exam (here’s my &lt;a href=&quot;https://www.credly.com/badges/63e6a6f2-1422-44f8-b977-f90b2444a8f1&quot;&gt;badge&lt;/a&gt;). I created and curated this cheatsheet with useful information that will be handy to review before taking the exam.&lt;/p&gt;
&lt;p&gt;Note that to pass this exam is crucial to get a good overall understanding of the basic AI concepts and AWS AI-focused services. Use these notes as complementary material and not complete study material for the exam.&lt;/p&gt;
&lt;p&gt;AWS frequently changes information, configuration, and options of different services, so some of the content might become outdated at some point. Make sure to cross-check and validate the information you are getting from online sources with the official AWS Documentation and FAQs before your exam.&lt;/p&gt;
&lt;p&gt;OK, enough with the disclaimers, let’s get to it.&lt;/p&gt;
&lt;h2 id=&quot;sagemaker&quot;&gt;SageMaker&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Automatic model tuning can be performed using SageMaker Automatic Model Tuning (AMT). It can automatically choose hyper parameter ranges, search strategy, maximum runtime of a tuning job, early stopping type for training jobs, number of times to retry a training job, and model convergence flag to stop a tuning job, based on the objective metric you provide.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-inference&quot;&gt;SageMaker Inference&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Asynchronous —&lt;/strong&gt; process smaller payloads without requiring real-time responses by queuing the requests and handling them in the background. This method is cost-effective and efficient when some delay is acceptable, as it frees up resources and optimizes compute usage. Asynchronous inference is ideal for scenarios where the payload size is less than 1 GB and immediate results are not critical.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Batch&lt;/strong&gt; — generally used for processing large datasets all at once. it is typically more efficient for handling larger payloads (several gigabytes or more). For smaller payloads of less than 1 GB, batch inference might be overkill and less cost-efficient compared to asynchronous inference.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Real-time&lt;/strong&gt; — optimized for scenarios where low latency is essential, and responses are needed immediately&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Serverless&lt;/strong&gt; — good choice for workloads with unpredictable traffic or sporadic requests, as it scales automatically based on demand&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-clarify&quot;&gt;SageMaker Clarify&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Focused on detecting bias in data and explaining model predictions to ensure transparency and fairness.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-groundtruth&quot;&gt;SageMaker GroundTruth&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Labeling data with a human-in-the-loop&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;GroundTruth Plus provides a fully managed data labeling service that helps deliver high-quality annotations. Combination of human labelers and machine learning-assisted labeling to ensure accuracy and consistency in the labels.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-canvas&quot;&gt;SageMaker Canvas&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;No-code interface to create ML models&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-data-wrangler&quot;&gt;SageMaker Data Wrangler&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Reduces the time it takes to aggregate and prepare tabular and image data for ML from weeks to minutes from a single visual interface.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data Wrangler supports several balancing operators as part of the Balance data transform to f&lt;strong&gt;ix bias by balancing the dataset.&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-feature-store&quot;&gt;SageMaker Feature Store&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fully managed, purpose-built repository to store, share, and manage features for machine learning (ML) models. Features are inputs to ML models used during training and inference.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-jumpstart&quot;&gt;SageMaker JumpStart&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Amazon SageMaker JumpStart is a machine learning (ML) hub that can help you accelerate your ML journey. With SageMaker JumpStart, you can evaluate, compare, and select Foundation Models (FMs) quickly based on pre-defined quality and responsibility metrics to perform tasks like article summarization and image generation. &lt;strong&gt;Pretrained models are fully customizable&lt;/strong&gt; for your use case with your data, and you can easily deploy them into production with the user interface or SDK.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-model-dashboard&quot;&gt;SageMaker Model Dashboard&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Aggregates and displays data from Amazon SageMaker Model Cards, SageMaker Model Monitor and SageMaker Endpoint services. It’s a centralized repository of all models created in your account. The models are generally the outputs of SageMaker training jobs, but you can also import models trained elsewhere and host them on SageMaker.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-model-cards&quot;&gt;SageMaker Model Cards&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Document critical details about your machine learning (ML) models in a single place for streamlined governance and reporting. Model cards can help you to capture key information about your models throughout their lifecycle and implement responsible AI practices.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Catalog details such as the intended use and risk rating of a model, training details and metrics, evaluation results and observations, and additional call-outs such as considerations, recommendations, and custom information&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Describes how a model should be used in production, the scenarios in which is appropriate to use a model, and additional considerations such as the type of data to use with the model or any assumptions made during development.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sagemaker-model-monitor&quot;&gt;SageMaker Model Monitor&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Designed to &lt;strong&gt;track the performance of machine learning models in production by monitoring data drift, bias, and other deviations&lt;/strong&gt;. primarily focused on post-deployment model monitoring&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;governance-in-sagemaker&quot;&gt;Governance in SageMaker&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;SageMaker provides purpose-built ML governance tools across the ML lifecycle. With Amazon SageMaker Role Manager, administrators can define minimum permissions in minutes. Amazon SageMaker Model Cards make it easier to capture, retrieve, and share essential model information from conception to deployment, and Amazon SageMaker Model Dashboard keeps you informed on production model behavior, all in one place.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-augmented-ai&quot;&gt;Amazon Augmented AI&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Get human review of low-confidence predictions or random prediction samples. Brings human review of ML predictions to all developers by removing the heavy lifting associated with building human review systems or managing large numbers of human reviewers.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;bedrock&quot;&gt;Bedrock&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;For testing and deploy customized models&lt;/strong&gt; for Amazon Bedrock (via fine-tuning or continued pre-training), it is &lt;strong&gt;mandatory to use Provisioned Throughput&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;knowledge-bases&quot;&gt;Knowledge bases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Managed opensearch serverless vector store&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Retrieval-Augmented Generation&lt;/strong&gt; (RAG) use cases. When a customer query comes in, the RAG framework first retrieves the most relevant pieces of information from this knowledge base and then uses an LLM to generate a coherent response based on the retrieved context.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;agents&quot;&gt;Agents&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Agents are software components or entities designed to autonomously or semi-autonomously perform specific actions or tasks based on predefined rules or algorithms.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;guardrails&quot;&gt;Guardrails&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Detects sensitive information such as personally identifiable information (PIIs) in input prompts or model responses. You can also configure sensitive information specific to your use case or organization by defining it with regular expressions (regex).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-rekognition&quot;&gt;Amazon Rekognition&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;image and video analysis service that makes it easy to add advanced computer vision capabilities to your applications.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deep learning, image recognition service, detect objects within an image.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Offers pre-trained and customizable computer vision (CV) capabilities to extract information and insights from your images and videos&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;detect text within images. Rekognition specializes in identifying text located spatially within an image, for instance, words displayed on street signs, t-shirts, or license plates.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-comprehend&quot;&gt;Amazon Comprehend&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Get &lt;strong&gt;insights about the content of docs&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Detect key phrases, language, sentiment, entities in text, intelligent document processing use cases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Search social feeds for mentions&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-textract&quot;&gt;Amazon Textract&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;(ML) service that automatically extracts text, handwriting, and data from scanned documents&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It goes beyond simple optical character recognition (OCR) to identify, understand, and extract data from forms and tables.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-transcribe&quot;&gt;Amazon Transcribe&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Convert audio input (speech) to text. Using Automatic Speech Recognition (ASR) technology, customers can choose to use Amazon Transcribe for a variety of business applications, including transcription of voice-based customer service calls, generation of subtitles on audio/video content, and conduct (text-based) content analysis on audio/video content.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Amazon Transcribe Medica&lt;/strong&gt;l is an automatic speech recognition (ASR) service that makes it easy for you to add medical speech-to-text capabilities to your voice-enabled applications.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-translate&quot;&gt;Amazon Translate&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Text translation service that uses advanced machine learning technologies to provide high-quality translation on demand&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-polly&quot;&gt;Amazon Polly&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Uses deep learning technologies to synthesize natural-sounding human speech, so you can convert articles to speech.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-personalize&quot;&gt;Amazon Personalize&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fully managed machine learning (ML) service that uses your data to generate product and content recommendations for your users. You provide data about your end-users (e.g., age, location, device type), items in your catalog (e.g., genre, price), and interactions between users and items (e.g., clicks, purchases). Personalize uses this data to train custom, private models that generate recommendations that can be surfaced via an API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-forecast&quot;&gt;Amazon Forecast&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fully managed service that uses statistical and machine learning algorithms to deliver highly accurate time-series forecasts.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-kendra&quot;&gt;Amazon Kendra&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A highly accurate and easy-to-use enterprise search service that’s powered by machine learning (ML).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;aws-artifact&quot;&gt;AWS Artifact&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Provide access to a wide range of AWS compliance reports. AWS Artifact allows users to configure settings to receive notifications when new compliance documents or reports are available.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amazon-lex--ai-chat-builder&quot;&gt;Amazon Lex — AI Chat Builder&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Allows users to interact with any application using natural language voice or chat. Use Amazon Lex to build and deploy conversational AI interfaces for any application. Offers pre-built bots to offer personalized experiences for mobile subscriber activities.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;aws-deepracer&quot;&gt;AWS DeepRacer&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The AWS DeepRacer vehicle is a Wi-Fi-enabled, physical vehicle that can drive itself on a physical track by using a reinforcement learning model. Uses Reinforcement Learning&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;trainium-instance-types&quot;&gt;Trainium Instance types&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Designed with energy efficiency in mind, providing optimal performance per watt for machine learning workloads. They offer the best performance at the lowest power consumption, reducing the carbon footprint of training large-scale models.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;security-compliance-and-governance-for-ai-solutions&quot;&gt;Security, Compliance, and Governance for AI Solutions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Each AZ one or more data centers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Each AWS Region consists of minimum 3 AZs&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For controlling risks &lt;strong&gt;instruct the model to stick to the prompt by adding explicit instructions to ignore any unrelated or potentially malicious content&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;metrics-scores-parameters-inputs-tools&quot;&gt;Metrics, Scores, Parameters, Inputs, Tools&lt;/h2&gt;
&lt;h3 id=&quot;model-pameters&quot;&gt;Model Pameters&lt;/h3&gt;
&lt;p&gt;Values that define a model and its behavior in interpreting input and generating responses. Model parameters are controlled and updated by providers. You can also update model parameters to create a new model through the process of model customization. In other words, Model parameters are the internal variables of the model that are learned and adjusted during the training process. These parameters directly influence the output of the model for a given input. Examples include the weights and biases in a neural network.&lt;/p&gt;
&lt;h3 id=&quot;hyperparameters&quot;&gt;Hyperparameters&lt;/h3&gt;
&lt;p&gt;Values that can be adjusted for model customization to control the training process and, consequently, the output custom model. They are external configurations set before the training process begins. They control the training process and the structure of the model but are not adjusted by the training algorithm itself. Examples include the learning rate, the number of layers in a neural network, etc.&lt;/p&gt;
&lt;h3 id=&quot;temperature&quot;&gt;Temperature&lt;/h3&gt;
&lt;p&gt;Temperature is a value between 0 and 1, and it regulates the creativity of the model’s responses. Higher &lt;code&gt;Temperature&lt;/code&gt; to get more creative responses**.** Use a lower temperature if you want more deterministic responses.&lt;/p&gt;
&lt;h3 id=&quot;top-p&quot;&gt;Top-P&lt;/h3&gt;
&lt;p&gt;Represents the &lt;strong&gt;percentage of most likely candidates&lt;/strong&gt; that the model considers for the next token. Choose a lower value to decrease the size of the pool and limit the options to more likely outputs. Choose a higher value to increase the size of the pool and allow the model to consider less likely outputs.&lt;/p&gt;
&lt;h3 id=&quot;top-k&quot;&gt;Top-K&lt;/h3&gt;
&lt;p&gt;Top K represents the &lt;strong&gt;number of most likely candidates&lt;/strong&gt; that the model considers for the next token. Choose a lower value to decrease the size of the pool and limit the options to more likely outputs. Choose a higher value to increase the size of the pool and allow the model to consider less likely outputs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;BLEU (Bilingual Evaluation Understudy) score,&lt;/strong&gt; a metric specifically designed to evaluate the quality of text that has been machine-translated by comparing it with one or more reference translations. Most widely used metrics for evaluating machine translation quality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ROUGE (Recall-Oriented Understudy for Gisting Evaluation&lt;/strong&gt; is a metric used mainly for evaluating the quality of automatic text summarization&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Accuracy&lt;/strong&gt; is a broad metric typically used to evaluate classification tasks where the model’s output is compared against the correct label.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Precision, Recall, and F1-Score&lt;/strong&gt;&lt;/em&gt; are standard performance metrics used to evaluate the effectiveness of a classification system&lt;br/&gt;
&lt;strong&gt;Precision&lt;/strong&gt;: Measures the accuracy of the positive predictions, calculated as the ratio of true positives to the sum of true positives and false positives.&lt;br/&gt;
&lt;strong&gt;Recall&lt;/strong&gt; (Sensitivity): Measures the ability of the classifier to identify all positive instances, calculated as the ratio of true positives to the sum of true positives and false negatives.&lt;br/&gt;
&lt;strong&gt;F1-Score&lt;/strong&gt;: The harmonic mean of Precision and Recall, providing a single metric that balances both concerns. When dealing with imbalanced datasets in binary classification&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;BERT&lt;/strong&gt; score is a more advanced metric that uses contextual embeddings to assess the semantic similarity between translated and reference texts. It’s designed to capture the contextual meaning of words by looking at both the words that come before and after them&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Shapley values&lt;/strong&gt; are a local interpretability method that explains individual predictions by assigning each feature a contribution score based on its marginal effect on the prediction. This method is &lt;strong&gt;useful for understanding the impact of each feature on a specific instance’s prediction&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Partial Dependence Plots (PDP)&lt;/strong&gt;, on the other hand, provide a global view of the model’s behavior by illustrating how the predicted outcome changes as a single feature is varied across its range, holding all other features constant. PDPs help &lt;strong&gt;understand the overall relationship between a feature and the model output&lt;/strong&gt; across the entire dataset.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Confusion matrix&lt;/strong&gt; is a tool specifically designed to evaluate the performance of classification models by displaying the number of true positives, true negatives, false positives, and false negatives. This matrix provides a detailed breakdown of the model’s performance across all classes, making it the most suitable choice for evaluating a classification model’s accuracy and identifying potential areas for improvement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bias&lt;/strong&gt; is an error introduced by approximating a real-world problem (which may be complex) by a simpler model. High bias can cause the model to miss relevant relations between features and target outputs (underfitting)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Variance&lt;/strong&gt; is an error introduced by the model’s sensitivity to small fluctuations in the training data. High variance can cause the model to mimic the random noise in the training data rather than the intended outputs (overfitting).&lt;/p&gt;
&lt;h2 id=&quot;fundamentals-of-ai-and-ml&quot;&gt;Fundamentals of AI and ML&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Generative models&lt;/strong&gt; learn the underlying patterns of data to create new, similar data, while discriminative models learn to distinguish between different classes of data. Generative models, such as GPT-3, can generate new content, whereas discriminative models are used for classification tasks.&lt;/p&gt;
&lt;p&gt;Maintaining &lt;strong&gt;data lineage&lt;/strong&gt; involves tracking the flow, transformations, and origins of data throughout its lifecycle. This is crucial for ensuring data privacy, security, and compliance with regulatory standards.&lt;/p&gt;
&lt;p&gt;When the number of samples in the majority class (bigger) is considerably larger than the number of samples in the minority (smaller) class, &lt;strong&gt;the dataset is considered imbalanced&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Labeled data&lt;/strong&gt; is data that comes with predefined labels or annotations. E.g. images labeled with the objects they contain. This type of data is crucial for &lt;strong&gt;supervised learning&lt;/strong&gt;, where the model learns to predict the output from the input data.&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;supervised learning&lt;/strong&gt;, you define both the input and the expected associated output. Supervised learning algorithms learn patterns and relationships between the input and output pairs. Then, they predict outcomes based on new input data. Examples: Linear regression, logistic regression, decision tree, neural network, classification&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unlabeled data&lt;/strong&gt; is data that does not come with any labels, annotations, or explicit instructions about what it represents. This type of data is often used in unsupervised learning, where the model attempts to find patterns or structures in the data without predefined labels. Examples: Clustering: Grouping similar data points&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unsupervised learning&lt;/strong&gt; algorithms receive inputs with no specified outputs during the training process. They find hidden patterns and relationships within the data using statistical means. For instance, you could provide a set of documents, and the algorithm may group them into categories it identifies based on the words in the text. You do not get any specific outcomes; they fall within a range. Examples: clustering (K-Means), association rule learning, dimensionality reduction, probability density&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Semi-supervised&lt;/strong&gt; learning is when you apply both supervised and unsupervised learning techniques to a common problem. This technique relies on using a small amount of labeled data and a large amount of unlabeled data to train systems. First, the labeled data is used to partially train the machine learning algorithm. After that, the partially trained algorithm labels the unlabeled data. This process is called pseudo-labeling. The model is then re-trained on the resulting data mix without being explicitly programmed. Examples, fraud detection, sentiment analysis, document classification.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reinforcement learning&lt;/strong&gt; mimics the trial-and-error learning process that humans use to achieve their goals. Software actions that work towards your goal are reinforced, while actions that detract from the goal are ignored. Excels in complex environments and requires less human interaction. RL has a predetermined end goal. While it takes an exploratory approach, the explorations are continuously validated and improved to increase the probability of reaching the end goal. It can teach itself to reach very specific outcomes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overfitting&lt;/strong&gt; occurs when the model is overly complex and captures noise or random fluctuations in the training data rather than the underlying patterns.&lt;/p&gt;
&lt;p&gt;By &lt;strong&gt;fine-tuning hyperparameters,&lt;/strong&gt; such as increasing regularization or early stopping or adjusting dropout rates, the model can &lt;strong&gt;avoid overfitting&lt;/strong&gt; to the training data and &lt;strong&gt;better generalize to new, unseen data in production&lt;/strong&gt;. This approach helps improve the model’s performance across various data distributions.&lt;/p&gt;
&lt;p&gt;To prevent &lt;strong&gt;over-fitting,&lt;/strong&gt; techniques such as &lt;strong&gt;cross-validation, regularization, and pruning&lt;/strong&gt; are employed. Cross-validation helps ensure the model generalizes well to unseen data by dividing the data into multiple training and validation sets. Regularization techniques, such as L1 and L2 regularization, penalize complex models to reduce overfitting. Pruning simplifies decision trees by removing branches that have little importance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Increasing the number of epochs&lt;/strong&gt; allows the model to &lt;strong&gt;learn from the training data for a longer period&lt;/strong&gt;, potentially &lt;strong&gt;capturing more complex patterns and relationships&lt;/strong&gt;, which can improve accuracy. Multiple epochs are run until the accuracy of the model reaches an acceptable level, or when the error rate drops below an acceptable level.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Transfer learning&lt;/strong&gt; allows a model to utilize the knowledge learned from one task or dataset to improve its performance&lt;strong&gt;on a new, but related task.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Incremental training&lt;/strong&gt; is useful for updating a model with new data continuously. it focuses on enhancing a single model’s performance with its own data. It’s designed to help models adapt to new data over time without forgetting previously learned knowledge&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Deep Learning&lt;/strong&gt;, model training involves feeding large datasets into the neural network and adjusting the weights and biases through multiple iterations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Computer vision&lt;/strong&gt; focuses on interpreting and understanding the content of images to make decisions, such as object detection, facial recognition, and scene understanding&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Generative Adversarial Networks (GANs)&lt;/strong&gt; work by &lt;strong&gt;training two neural networks in a competitive manner.&lt;/strong&gt; The first network, known as the generator, generates fake data samples by adding random noise. The second network, called the discriminator, tries to distinguish between real data and the fake data produced by the generator. They are specifically designed for &lt;strong&gt;generating synthetic data that is statistically similar to real data&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Convolutional Neural Network (CNN)&lt;/strong&gt; are designed for tasks such as image and video recognition, object detection, and similar applications involving grid-like data (such as pixels in an image)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Recurrent Neural Networks (RNNs)&lt;/strong&gt; are typically used for sequence data, such as time series or natural language processing tasks (video analysis)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;WaveNet&lt;/strong&gt; is tailored for &lt;strong&gt;audio data generation&lt;/strong&gt;, specifically for tasks such as speech synthesis and audio signal processing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Support Vector Machines (SVMs)&lt;/strong&gt; are used for classification and regression&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exploratory Data Analysis (EDA&lt;/strong&gt;) phase, which involves examining the data through statistical summaries and visualizations to identify patterns, detect anomalies, and form hypotheses.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Foundation Models&lt;/strong&gt; provide a broad base with generalized capabilities that can be applied to various tasks such as natural language processing (NLP), question answering, and image classification.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Large Language Models&lt;/strong&gt; are specifically designed for tasks involving the understanding and generation of human language, making them more specialized&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bias versus variance trade-off&lt;/strong&gt; is about finding a balance between bias (error due to overly simplistic assumptions in the model, leading to underfitting) and variance (error due to the model being too sensitive to small fluctuations in the training data, leading to overfitting)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Interpretability&lt;/strong&gt; is about understand the internal mechanisms of machine learning model&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Explainability&lt;/strong&gt; focuses on providing understandable reasons for model predictions and behaviors to stakeholders&lt;/p&gt;
&lt;p&gt;Data used for ML is split into datasets: 1) training set to train the model, 2) validation set to periodically measure model performance as training is happening and also tune any hyperparameters of the model. However, &lt;strong&gt;validation datasets are optional.&lt;/strong&gt; 3) test set is used on the final trained model to assess its performance on unseen data. This helps determine how well the model generalizes.&lt;/p&gt;
&lt;h2 id=&quot;fundamentals-of-generative-ai&quot;&gt;Fundamentals of Generative AI&lt;/h2&gt;
&lt;p&gt;Models for generating images: Stable Diffusion&lt;br/&gt;
&lt;strong&gt;Diffusion models&lt;/strong&gt; create new data by iteratively making controlled random changes to an initial data sample.&lt;/p&gt;
&lt;p&gt;ChatGPT or Chat Generative Pretrained Transformer is an example of a &lt;strong&gt;Transformer&lt;/strong&gt; model. Transformer-based models use a &lt;strong&gt;self-attention mechanism&lt;/strong&gt;. They weigh the importance of different parts of an input sequence when processing each element in the sequence.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tokens&lt;/strong&gt; are fundamental units of text that the AI model processes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;context window&lt;/strong&gt; defines how much text (measured in tokens) the AI model can process at one time to generate a coherent output.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Embeddings&lt;/strong&gt; are a way of representing tokens (words, sub-words, or phrases) as numerical vectors to capture their semantic relationships in a high-dimensional space&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Transformer models&lt;/strong&gt; are a type of neural network architecture designed to handle sequential data, such as language, in an efficient and scalable way. They rely on a mechanism called &lt;strong&gt;self-attention&lt;/strong&gt; to process input data, allowing them to understand and generate language effectively&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Negative prompting&lt;/strong&gt; refers to guiding a generative AI model to avoid certain outputs or behaviors when generating content.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Foundation models use self-supervised learning to create labels from input data&lt;/strong&gt;. This means no one has instructed or trained the model with labeled training data sets. Self-supervised learning is a machine learning approach that applies unsupervised learning methods to tasks usually requiring supervised learning. Instead of using labeled datasets for guidance, self-supervised models create implicit labels from unstructured data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Few-shots prompting&lt;/strong&gt; involves providing the model with examples that include both the user-input and the correct user intent.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Chain-of-thought prompting&lt;/strong&gt; is a technique that breaks down a complex question into smaller, logical parts that mimic a train of thought.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Zero-shot prompting&lt;/strong&gt; is a technique used in generative AI where the model is asked to perform a task or generate content without having seen any examples of that specific task during training.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dynamic prompt engineering&lt;/strong&gt; involves modifying the input prompts to the Large Language Model (LLM) to customize the chatbot’s responses based on a user characteristic or answer&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;multimodal model&lt;/strong&gt; can accept a mix of input types such as audio/text and create a mix of output types such as video/image&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;multi-modal embedding model&lt;/strong&gt; enables the integration of multiple types of data, such as text and images, into a unified representation. This allows for effective processing and understanding queries containing both text and visual content by aligning them in a shared embedding space, facilitating more accurate and context-aware responses.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Small Language Model (SLM)&lt;/strong&gt; optimized for deployment on edge devices is specifically designed to be lightweight, efficient, and capable of running on devices with limited computational resources.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prompt Injection&lt;/strong&gt; refers to influencing the outputs by embedding specific instructions within the prompts themselves.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exposure&lt;/strong&gt; refers to the risk of exposing sensitive or confidential information to a model during training or inference. The model can then reveal this sensitive data from their training corpus, leading to potential data leaks or privacy violations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hijacking&lt;/strong&gt; involves manipulating an AI system to serve malicious purposes or to misbehave in unintended ways.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jailbreaking&lt;/strong&gt; refers to bypassing the built-in restrictions and safety measures of AI systems to unlock restricted functionalities or generate prohibited content.&lt;/p&gt;
&lt;h2 id=&quot;model-customization&quot;&gt;Model Customization&lt;/h2&gt;
&lt;p&gt;You can use &lt;code&gt;continued pre-training&lt;/code&gt; or &lt;code&gt;fine-tuning&lt;/code&gt; for model customization in Amazon Bedrock.&lt;/p&gt;
&lt;h3 id=&quot;continued-pre-training&quot;&gt;Continued pre-training&lt;/h3&gt;
&lt;p&gt;Uses unlabeled data to pre-train a model. The Continued Pre-training process will tweak the model parameters to accommodate the input data and improve its domain knowledge. It’s another appropriate strategy for making a Foundation Model an expert in a specific domain.&lt;/p&gt;
&lt;h3 id=&quot;fine-tuning&quot;&gt;Fine-tuning&lt;/h3&gt;
&lt;p&gt;You provide &lt;code&gt;labeled&lt;/code&gt; data to train a model to improve performance on specific tasks. By providing a training dataset of labeled examples, the model learns to associate what types of outputs should be generated for certain types of inputs. The model parameters are adjusted in the process and the model’s performance is improved for the tasks represented by the training dataset. &lt;strong&gt;Fine-tuning is a FM is a supervised learning process.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_ai_practitioner_cheatsheet/0*UMeLzn-FY4_PcSvM.png&quot; alt/&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>certifications</category></item><item><title>Using ControlMonkey&apos;s Terraform Platform to Govern Large-scale AWS Environments</title><link>https://devopsmadness.com/blog/using-controlmonkeys-terraform-platform-to-govern-large-scale-aws-environments</link><guid isPermaLink="true">https://devopsmadness.com/blog/using-controlmonkeys-terraform-platform-to-govern-large-scale-aws-environments</guid><description>Governance for big AWS estates: why reactive cleanup fails at scale, a proactive Terraform platform strategy and a real customer case applying it.</description><pubDate>Fri, 03 Jan 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Reactive governance loses by arithmetic: new resources
appear faster than audits close findings. This APN piece argues for the
proactive version, a Terraform platform where policy, drift and coverage
are managed centrally, grounded in a real customer case. Coverage is the
leading metric, since the share of the estate under IaC decides how much
governance is even possible.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform owners of estates measured in hundreds
of accounts, and anyone writing a governance strategy for one.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/apn/using-controlmonkeys-terraform-platform-to-govern-large-scale-aws-environments/&quot;&gt;Read the full article on AWS →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>terraform</category><category>iac</category></item><item><title>Karpenter vs. Cluster Autoscaler - Kubernetes Scaling Tools</title><link>https://devopsmadness.com/blog/karpenter-vs-cluster-autoscaler</link><guid isPermaLink="true">https://devopsmadness.com/blog/karpenter-vs-cluster-autoscaler</guid><description>The two Kubernetes node scaling approaches compared: how each provisions capacity, where they differ in practice and which fits which cluster.</description><pubDate>Wed, 11 Dec 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Node scaling decides both your bill and your pending pod
queue. Cluster Autoscaler scales node groups you defined in advance and
stays the portable, battle-tested option; Karpenter provisions instances
directly from pod requirements, which improves packing and spot usage.
Test consolidation behavior before production traffic meets it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; EKS operators tired of tuning node groups, and
platform teams doing cost work on Kubernetes compute.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/karpenter-vs-cluster-autoscaler&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>kubernetes</category><category>aws</category></item><item><title>What is Configuration Drift? Tools, Causes &amp; Risks</title><link>https://devopsmadness.com/blog/what-is-configuration-drift</link><guid isPermaLink="true">https://devopsmadness.com/blog/what-is-configuration-drift</guid><description>Configuration drift explained properly: how it creeps in, what it breaks, examples from real setups, and the tools that detect and prevent it.</description><pubDate>Thu, 31 Oct 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; Drift is the gap between what your code says
and what actually runs, accumulating through actions like
hotfixes and console edits. Nobody notices it happening; you find it when
the next apply behaves in ways you did not expect. This article is naming
the causes, the risks and the tooling in one place.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The causes: manual changes and human error, inconsistent
deployment processes across environments, external dependencies that
shift underneath you, and changes made without version control.
Differences between dev, staging and production, plus thin
documentation, round out the list. None of them look like mistakes at
the time they happen.&lt;/li&gt;
&lt;li&gt;The risk compounds: the next apply either reverts someone’s
fix or fails on state it does not expect. The named risks go further:
security gaps from weakened rules and missed patches, compliance
violations under GDPR or HIPAA, downtime, and slower troubleshooting
when environments quietly differ. The examples will feel familiar:
security group edits straight in production, IAM roles that differ
between environments, replica counts changed directly on the cluster.&lt;/li&gt;
&lt;li&gt;Detection is cheap now, and continuous drift checks belong next to your
other scheduled jobs. The tool list spans IaC (Terraform, OpenTofu,
Spacelift), configuration management (Ansible, Puppet), GitOps delivery
(ArgoCD, Flux) and cloud-native monitors (AWS Config, Azure Policy).
Prevention is still the better spend: keep every configuration in
version control, standardize the pipelines, and pair disciplined
&lt;a href=&quot;/blog/terraform-best-practices&quot;&gt;Terraform practices&lt;/a&gt; with
&lt;a href=&quot;/blog/infrastructure-as-code-iac-testing&quot;&gt;tests around your IaC&lt;/a&gt; so
most drift never appears in the first place.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Configuration drift is difficult to address in
existing and brownfield setups. Automation is the only real way to address
it effecttively.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; anyone operating IaC alongside humans with console
access, which is everyone. If drift keeps coming back in the same places,
the fix is structural, and a wider
&lt;a href=&quot;/blog/iac-modernization&quot;&gt;modernization plan&lt;/a&gt; covering state, pipelines
and guardrails is the better follow-up than another round of detection.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/what-is-configuration-drift&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>iac</category><category>devops-tooling</category></item><item><title>How to Use Blocks in Ansible Playbooks</title><link>https://devopsmadness.com/blog/ansible-block</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-block</guid><description>Ansible blocks explained with use cases: grouping tasks, shared conditionals and privilege, plus rescue and always for real error handling paths.</description><pubDate>Fri, 25 Oct 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Blocks are the structure feature people discover late. A
when on a block beats copying the same when across ten tasks, and the same
goes for become and tags. Rescue turns a failed task into a handled path,
and always runs regardless of outcome, which is where cleanup belongs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; playbook authors whose error strategy is currently
ignore_errors, and anyone tidying repetitive task lists.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-block&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>devops-tooling</category></item><item><title>What is an AWS CloudFormation Template? [Examples]</title><link>https://devopsmadness.com/blog/aws-cloudformation-templates</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-cloudformation-templates</guid><description>CloudFormation templates explained: the key sections, how they turn into stacks, a worked example and the practices that keep templates readable.</description><pubDate>Wed, 16 Oct 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; CloudFormation is still the native IaC path on AWS, and
templates are its whole interface. A few sections do the work (parameters,
resources, outputs), with intrinsic functions keeping templates portable
across accounts and regions. Change sets are the plan step; never update a
production stack without reading one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; AWS engineers starting with CloudFormation, and
Terraform users who need to read the native format when they meet it.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/aws-cloudformation-templates&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>iac</category></item><item><title>Enterprise DevOps - Adoption Strategies &amp; Best Practices</title><link>https://devopsmadness.com/blog/enterprise-devops</link><guid isPermaLink="true">https://devopsmadness.com/blog/enterprise-devops</guid><description>DevOps at enterprise scale: what changes with size, adoption strategies that survive the org chart, and the usual failure modes with their fixes.</description><pubDate>Wed, 02 Oct 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; DevOps advice written for startups meets a different reality
at ten thousand employees: compliance, legacy estates, and change that
must survive politics. Start with pilot teams and real workloads, then
scale patterns rather than mandates, with platform teams as the delivery
mechanism. Expect the legacy estate to set your pace more than the
greenfield does.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineering leadership in large organizations, and
practitioners translating startup patterns into enterprise reality.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/enterprise-devops&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>platform-engineering</category></item><item><title>DevOps Maturity Model: Levels, Metrics &amp; Benefits</title><link>https://devopsmadness.com/blog/devops-maturity-model</link><guid isPermaLink="true">https://devopsmadness.com/blog/devops-maturity-model</guid><description>DevOps maturity models used well: the five levels, how to assess where you are, the metrics that verify progress and the traps of cargo-culting.</description><pubDate>Wed, 25 Sep 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Maturity models get abused as vendor scorecards, but used
honestly they answer where you are and what should improve next. Locate
yourself per area, since teams are rarely one level everywhere, and anchor
the assessment in metrics like the DORA set. Skipping levels through tool
purchases is the classic failure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; leads planning a DevOps investment case, and
anyone handed a maturity assessment by a consultancy.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/devops-maturity-model&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>platform-engineering</category></item><item><title>What is an Internal Developer Platform (IDP)?</title><link>https://devopsmadness.com/blog/what-is-an-internal-developer-platform</link><guid isPermaLink="true">https://devopsmadness.com/blog/what-is-an-internal-developer-platform</guid><description>Internal developer platforms explained: the components, who actually uses them, what they change for teams and examples of working implementations.</description><pubDate>Mon, 26 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; IDPs are platform engineering made concrete: golden paths,
self-service and paved infrastructure behind one interface. The IDP is a
product with users, and it lives or dies on developer experience rather
than feature count. Most working ones compose existing tools behind a
thin, opinionated layer that balances self-service with guardrails.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform teams defining their scope, and
engineering leaders deciding whether the investment fits their size.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/what-is-an-internal-developer-platform&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>platform-engineering</category><category>devops-tooling</category></item><item><title>Ansible with GitHub Actions: Automating Playbook Runs</title><link>https://devopsmadness.com/blog/github-actions-ansible</link><guid isPermaLink="true">https://devopsmadness.com/blog/github-actions-ansible</guid><description>Wiring Ansible into GitHub Actions: why automating playbook runs pays off, a step-by-step pipeline, and the secrets handling that makes it safe.</description><pubDate>Tue, 13 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Playbooks run from laptops have the same problems as
Terraform applied from laptops: no history, no review, no consistency.
Trigger playbooks from pull requests and merges and the git history
becomes your change log. Put SSH keys and vault passwords in encrypted
secrets, plan runner network reach early, and gate with syntax checks and
dry runs before the pipeline touches production hosts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; Ansible users on GitHub who still run playbooks by
hand, and platform folks standardizing how config changes ship.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/github-actions-ansible&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>devops-tooling</category></item><item><title>Configuration Management with Ansible</title><link>https://devopsmadness.com/blog/ansible-configuration-management</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-configuration-management</guid><description>Ansible as a configuration management tool: the architecture, how it compares with the alternatives, core concepts and where it fits best today.</description><pubDate>Fri, 12 Jul 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Configuration management is the job Ansible was built for,
and the comparison with Chef, Puppet and Salt still decides tool choices.
Agentless over SSH means nothing to install on targets, and push-based
execution gives you control of when changes land at the cost of continuous
enforcement. The readable YAML surface matters more than expressiveness.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams picking a configuration management tool, and
Ansible users who want the architectural context behind the commands.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-configuration-management&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>iac</category><category>devops-tooling</category></item><item><title>Using Ansible to Automate AWS [Tutorial]</title><link>https://devopsmadness.com/blog/ansible-aws</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-aws</guid><description>Ansible against AWS in practice: the collection setup, dynamic inventory for changing hosts, a worked tutorial and the habits that keep it sane.</description><pubDate>Wed, 19 Jun 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; A static inventory file dies the first time an autoscaling
group scales, and dynamic inventory is what makes Ansible viable against
AWS. Tag your instances well and the inventory writes
itself. The amazon.aws collection covers provisioning glue too, and
credentials belong in roles and profiles, never in playbooks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams running Ansible against EC2 fleets, and
anyone whose inventory file has ever listed a terminated instance.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-aws&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>aws</category><category>devops-tooling</category></item><item><title>The Value of Upskilling Your SMB&apos;s Employees in Generative AI</title><link>https://devopsmadness.com/blog/the-value-of-upskilling-your-smbs-employees-in-generative-ai</link><guid isPermaLink="true">https://devopsmadness.com/blog/the-value-of-upskilling-your-smbs-employees-in-generative-ai</guid><description>The business case for training existing staff on generative AI: timing, a customer example of scaling with a small team and the AWS learning paths.</description><pubDate>Fri, 31 May 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; This one is for the business side: small and mid-size
companies cannot hire their way into AI capability, and mostly do not need
to. Existing employees with domain knowledge plus AI skills beat new hires
with AI skills and no context. A real customer example shows the pattern,
and the AWS learning paths make it practical.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; SMB leaders deciding where AI budget goes, and
engineers building the internal case for learning time.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/smb/the-value-of-upskilling-your-smbs-employees-in-generative-ai/&quot;&gt;Read the full article on AWS →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>ai-agents</category></item><item><title>7 Ansible Use Cases - Management &amp; Automation Examples</title><link>https://devopsmadness.com/blog/ansible-use-cases</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-use-cases</guid><description>Where Ansible actually earns its keep: seven use cases from provisioning and config management to security baselines and orchestrated updates.</description><pubDate>Wed, 01 May 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Seven jobs Ansible does well, with examples, so teams can
match the tool to actual work instead of adopting it on reputation.
Configuration management and repetitive operational tasks remain the core,
with security baselines and patching as the underrated uses. The weak
spots matter as much: no state, limited orchestration logic, and speed at
very large fleets.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers deciding whether Ansible belongs in
their stack, and teams using it for one job unaware of the other six.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-use-cases&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>iac</category><category>devops-tooling</category></item><item><title>How to Import and Manage AWS Networking with Terraform and ControlMonkey</title><link>https://devopsmadness.com/blog/how-to-import-and-manage-aws-networking-with-terraform-and-controlmonkey</link><guid isPermaLink="true">https://devopsmadness.com/blog/how-to-import-and-manage-aws-networking-with-terraform-and-controlmonkey</guid><description>Bringing existing AWS networking under Terraform: why brownfield import hurts, a worked use case with ControlMonkey and life after the import.</description><pubDate>Thu, 18 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Hand-built VPCs, routes and peering are the scariest part of
any estate to codify, because mistakes cut connectivity. This APN piece
walks a real import with ControlMonkey generating code and state together,
which removes the tedious half of the job. The import is the start; the
value arrives when every later networking change goes through a plan.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams with hand-built AWS networking they are
afraid to touch, which is a large club.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/apn/how-to-import-and-manage-aws-networking-with-terraform-and-controlmonkey/&quot;&gt;Read the full article on AWS →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>terraform</category><category>iac</category></item><item><title>What is Amazon Bedrock? AWS Generative AI Tool Overview</title><link>https://devopsmadness.com/blog/what-is-amazon-bedrock</link><guid isPermaLink="true">https://devopsmadness.com/blog/what-is-amazon-bedrock</guid><description>A practical look at Amazon Bedrock: model access, key features, pricing logic, use cases and a tutorial for getting a first application running.</description><pubDate>Mon, 25 Mar 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Bedrock is the AWS answer for teams that want foundation
models behind an AWS API with AWS billing and IAM. The value is
operational: one API across model providers, IAM for access, no
infrastructure to run. Know whether you need on-demand tokens or
provisioned throughput before the bill teaches you, and start in the
playground before moving to the API.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; AWS teams evaluating a managed route into
generative AI before committing to any one model vendor.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/what-is-amazon-bedrock&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>ai-agents</category></item><item><title>AWS Certified DevOps Engineer - Professional [Cheat Sheet]</title><link>https://devopsmadness.com/blog/aws-certified-devops-engineer-professional</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-certified-devops-engineer-professional</guid><description>Study notes for the AWS DevOps Engineer Professional exam: the key topics, a per-service cheat sheet and pointers for the tricky question areas.</description><pubDate>Tue, 13 Feb 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Per-service study notes for the DOP exam, continuing the
cheat sheet series from the Solutions Architect exams. CodePipeline,
CodeDeploy and their rollback behaviors carry a large share of questions,
with Config, CloudTrail and Systems Manager close behind in
compliance-flavored scenarios. The notes collect the service limits and
integration edges the exam actually probes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers preparing for the DOP exam, alongside
the SAA and SAP cheat sheets already on this site.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/aws-certified-devops-engineer-professional&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>certifications</category></item><item><title>How to Use Amazon CodeWhisperer (AI Code Generator)</title><link>https://devopsmadness.com/blog/amazon-codewhisperer</link><guid isPermaLink="true">https://devopsmadness.com/blog/amazon-codewhisperer</guid><description>Amazon CodeWhisperer in practice: setup with a Builder ID, day-to-day usage, and a demo writing Terraform to see where the suggestions help.</description><pubDate>Fri, 12 Jan 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Written when AI pair programmers were new, with a Terraform
demo as the useful part: infrastructure code is repetitive enough that
completion tools show their value quickly, and their limits just as
quickly. Suggestions are strongest on boilerplate, architecture still
belongs to you, and the bundled security scanning catches real issues.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers curious how AWS’s completion tool handles
IaC, and anyone comparing the first generation of coding assistants.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/amazon-codewhisperer&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>ai-agents</category></item><item><title>How to Build an AWS Multi-Account Strategy</title><link>https://devopsmadness.com/blog/aws-multi-account-strategy</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-multi-account-strategy</guid><description>Why one AWS account stops being enough, the core concepts of a multi-account setup, and the services that build one: Organizations to Control Tower.</description><pubDate>Wed, 22 Nov 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Accounts are the strongest isolation boundary AWS gives you,
partitioning blast radius, billing and quotas at once. Organizations, OUs
and SCPs form the skeleton, with Control Tower and vending automation on
top. Design the OU structure for policy inheritance rather than for the
org chart.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams feeling the walls of one account, and
architects planning a landing zone who want the reasoning behind it.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/aws-multi-account-strategy&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>platform-engineering</category></item><item><title>Getting Started With Amazon EKS Blueprints for Terraform</title><link>https://devopsmadness.com/blog/bootstrap-complete-amazon-eks-clusters-with-eks-blueprints-for-terraform</link><guid isPermaLink="true">https://devopsmadness.com/blog/bootstrap-complete-amazon-eks-clusters-with-eks-blueprints-for-terraform</guid><description>EKS Blueprints in practice: what the Terraform framework wraps, its core concepts, and a walkthrough standing up a complete cluster with add-ons.</description><pubDate>Fri, 20 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; A bare EKS cluster is nowhere near production ready, and EKS
Blueprints packages the missing layer of add-ons, IAM wiring and team
access as Terraform. The add-on model is the real value, since
bootstrapping controllers by hand is where DIY clusters rot. Treat it as a
starting point you own afterwards, and understand what it generates before
you depend on it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; platform teams standing up EKS with Terraform who
would rather compose than reinvent.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/bootstrap-complete-amazon-eks-clusters-with-eks-blueprints-for-terraform&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>kubernetes</category><category>terraform</category><category>aws</category></item><item><title>Using Ansible Shell Module to Execute Remote Commands</title><link>https://devopsmadness.com/blog/ansible-shell-module</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-shell-module</guid><description>The shell module used responsibly: examples, the differences from command, when raw scripts are justified and how to keep such tasks idempotent.</description><pubDate>Tue, 08 Aug 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Shell is the escape hatch everyone uses and few use
carefully. Prefer command over shell unless you need shell features, and
prefer a dedicated module over both whenever one exists, since shell tasks
are where idempotency goes to die. When shell is unavoidable, pair it with
creates, removes or changed_when so reruns stay honest.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; Ansible users with playbooks full of shell tasks,
and reviewers deciding which of them deserve to stay.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-shell-module&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>devops-tooling</category></item><item><title>What is a Service Mesh? Key Features, Benefits &amp; Examples</title><link>https://devopsmadness.com/blog/what-is-a-service-mesh</link><guid isPermaLink="true">https://devopsmadness.com/blog/what-is-a-service-mesh</guid><description>Service meshes explained without the vendor fog: how sidecars work, what you gain, the main mesh options and an example workflow on Kubernetes.</description><pubDate>Mon, 26 Jun 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Service meshes deliver mTLS, traffic control and telemetry
without touching application code, at the price of running a mesh. The
sidecar model is the core idea: proxies own the network so services do not
have to. Below a certain service count the mesh costs more than it gives,
and ingress plus libraries covers more cases than vendors admit.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams at the microservices scale where network
concerns repeat per service, and anyone evaluating Istio and friends.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/what-is-a-service-mesh&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>kubernetes</category><category>devops-tooling</category></item><item><title>AWS Solutions Architect Professional Cheat Sheet</title><link>https://devopsmadness.com/blog/aws-solutions-architect-professional-cheat-sheet</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-solutions-architect-professional-cheat-sheet</guid><description>AWS Solutions Architect Professional study notes, exam pointers, and cheat sheet.</description><pubDate>Sun, 11 Jun 2023 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;This material was gathered during my preparation for the &lt;code&gt;AWS Solutions Architect Professional Exam&lt;/code&gt;. I created and curated this cheatsheet with useful information that will be handy to review before taking the exam.&lt;/p&gt;
&lt;p&gt;This article’s objective is to gather different notes, topics and details that I struggled with, and hopefully will help more people get their own &lt;a href=&quot;https://www.credly.com/earner/earned/badge/96b6a7b8-3e0c-40df-b235-c325fe815c56&quot;&gt;badge&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/badge.png&quot; alt=&quot;Credly verification page for the AWS Certified Solutions Architect Professional badge issued to Ioannis Moustakis in April 2023&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Use these notes as &lt;code&gt;complementary material and not complete study&lt;/code&gt; material for the exam. Check out the &lt;a href=&quot;https://aws.amazon.com/certification/certified-solutions-architect-professional/&quot;&gt;official AWS SA Pro study guide&lt;/a&gt; for comprehensive information.&lt;/p&gt;
&lt;p&gt;AWS frequently changes information, configuration, and options of different services so &lt;code&gt;some of the content might become outdated at some point&lt;/code&gt;. Make sure to cross-check and validate the information you are getting from online sources with the &lt;code&gt;official AWS Documentation and FAQs&lt;/code&gt; before your exam.&lt;/p&gt;
&lt;p&gt;OK enough with the disclaimers, let’s get to it.&lt;/p&gt;
&lt;h2 id=&quot;multi-account-strategy&quot;&gt;Multi Account Strategy&lt;/h2&gt;
&lt;h3 id=&quot;control-tower&quot;&gt;Control Tower&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Setup and govern a secure multi-account AWS environment by orchestrating multiple AWS services(Organizations, Service Catalog, IAM) on your behalf while maintaining the security and compliance needs of your applications.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deploy data residency controls and deny data usage outside of specific regions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a landing zone, a well-architected, multi-account AWS environment based on security and compliance best practices.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After the landing zone setup, you can configure IAM Identity Center with a supported directory such as AWS Managed Microsoft AD.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The account factory automates provisioning of new accounts in your organization, preconfigured to meet your needs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Guardrails are pre-packaged governance rules for security, operations, and compliance that you can select and apply enterprise-wide or to specific groups of accounts. (SCP, CloudFormation, Config, Dashboard) Mandatory, Preventive, Detective, or Optional.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dashboard gives you continuous visibility into your AWS environment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Integrates with 3rd party tools to enhance capabilties.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To migrate accounts to an organization, from the management account, create invitations to other accounts and wait them to accept invitations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There is no additional charge to use AWS Control Tower. However, when you set up AWS Control Tower, you will begin to incur costs for AWS services configured to set up your landing zone and mandatory guardrails.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-organizations&quot;&gt;AWS Organizations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Group accounts into OUs and control access to multiple accounts with IAM Identity Center(previously SSO) and permissions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/Organizations.png&quot; alt=&quot;AWS Organizations diagram: a root account with Core, Infrastructure and Security OUs holding Datalake, Network, Shared, Audit and Log Archive accounts across multiple regions&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html&quot;&gt;Service control policies&lt;/a&gt;(SCPs) to impose maximum permissions across OUs or accounts(even the root user of the account is restricted).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Share resources across accounts with RAM.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Activate Cloudtrail across accounts for audit/compliance purposes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS Control Tower offers an abstracted, automated, and prescriptive experience on top of AWS Organizations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All features mode: prefered way, includes consolidated billing, enabling all features is the default for new orgs, allows advanced account management capabilities.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Consolidated Billing features: basic management tools, cannot leverage SCPs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If a user or role has an IAM permission policy that grants access to an action that is either not allowed or explicitly denied by the applicable SCPs, the user or role can’t perform that action.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SCPs do not affect any service-linked role.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS strongly recommends that you don’t attach SCPs to the root of your organization without thoroughly testing the impact that the policy has on accounts. Instead, create an OU that you can move your accounts into one at a time, or at least in small numbers, to ensure that you don’t inadvertently lock users out of key services.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It can work with CloudWatch Events to raise events when administrator-specified actions occur in an organization. For example, because of the sensitivity of such actions, raise a notification for new accounts creation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When an invited account joins your organization, you do not automatically have full administrator controlover the account, unlike created accounts. If you want the master account to have full administrative control over an invited member account, you must create the &lt;code&gt;OrganizationAccountAccessRole&lt;/code&gt; IAM role in the member account and grant permission to the master account to assume the role.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;resource-access-manageraws-ram&quot;&gt;Resource Access Manager(AWS RAM)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Enables you to share specified AWS resources that you own with other AWS accounts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To enable trusted access with AWS Organizations: From the AWS RAM CLI, use the &lt;code&gt;enable-sharing-with-aws-organizations&lt;/code&gt; command.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;cross-account-access&quot;&gt;Cross Account Access&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/cross_account_access.png&quot; alt=&quot;Cross-account access diagram: an IAM user in the dev account calls STS AssumeRole, receives temporary credentials and uses them against resources in the prod account&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To access S3 bucket in another account: a) Define an IAM role that allows cross account access with account number of the other account. b) Assign the user on the other account with a policy to be able to assume the role. c) Then the user assumes role. d) The bucket policy must allow this role access.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To assume role in another account, you can’t switch to a role if you are connected as the root user.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For some AWS services, you can grant cross-account access to your resources. To do this, you attach a policy directly to the resource that you want to share, instead of using a role as a proxy. The resource that you want to share must support resource-based policies. Unlike a user-based policy, a resource-based policy specifies who (in the form of a list of AWS account ID numbers) can access that resource.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With a resource that is accessed through a resource-based policy, the user still works in the trusted account and does not have to give up his or her user permissions in place of the role permissions. In other words, the user continues to have access to resources in the trusted account at the same time as he or she has access to the resource in the trusting account. This is useful for tasks such as copying information to or from the shared resource in the other account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;At times, you need to give a third-party access to your AWS resources (delegate access). One important aspect of this scenario is the External ID, optional information that you can use in an IAM role trust policy to designate who can assume the role.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;tagging&quot;&gt;Tagging&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use to organize resources. Helps with billing to break down costs, automation, and acces control.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tag Categories (technical tags, business tags, tags for automation, security tags).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Best practices: standardized, case-sensitive, consistent across resources, leverage tools(resource groups).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;disaster-recovery&quot;&gt;Disaster Recovery&lt;/h2&gt;
&lt;h3 id=&quot;disaster-recovery-strategies&quot;&gt;Disaster Recovery Strategies&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Pilot Light → DBs ready and data replication, create other resources when it’s time(VMs).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Warm Standby → DBs ready and data replication, other resources operational but scaled down.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The difference between Pilot Light and Warm Standby can sometimes be difficult to understand. Both include an environment in your DR Region with copies of your primary region assets. The distinction is that Pilot Light cannot process requests without additional action taken first, while Warm Standby can handle traffic (at reduced capacity levels) immediately.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;elastic-disaster-recovery&quot;&gt;Elastic Disaster Recovery&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Minimizes downtime and data loss with fast, reliable recovery of on-premises and cloud-based applications using affordable storage, minimal compute, and point-in-time recovery.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use cases: a) On-premises to AWS b) Cloud to AWS c) AWS Region to AWS Region&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;identity-and-access-management&quot;&gt;Identity and Access Management&lt;/h2&gt;
&lt;h3 id=&quot;aws-iam-identity-center&quot;&gt;AWS IAM Identity Center&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Supports only SAML 2.0–based applications so an OpenID Connect-compatible solution will not work.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;simple-ad&quot;&gt;Simple AD&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Subset of Microsoft AD.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;managed-microsoft-ad&quot;&gt;Managed Microsoft AD&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Configure a trust relationship between AWS Managed Microsoft AD in the AWS Cloud and your existing on-premises Microsoft Active Directory, providing users and groups with access to resources in either domain, using single sign-on (SSO).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;microsoft-ad-connector&quot;&gt;Microsoft AD connector&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;In case you want to connect to on premises AD.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;identity-federation&quot;&gt;Identity Federation&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Identity federation with SAML 2.0 enables federated single sign-on (SSO). You can use a third-party SAML IdP to establish SSO access to the console or you can create a custom IdP to enable console access for your external users.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/saml_based_federation.png&quot; alt=&quot;SAML federation flow: the client app authenticates with the corporate identity provider, gets a SAML assertion, calls AssumeRoleWithSAML on STS and uses the temporary credentials to reach an S3 bucket&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Before you can use SAML 2.0-based federation, you must configure your organization’s IdP and your AWS account to trust each other. Inside your organization, you must have an IdP that supports SAML 2.0, like Microsoft Active Directory Federation Service (AD FS, part of Windows Server). In your organization’s IdP, you define assertions that map users or groups in your organization to the IAM roles.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When you create the trust policy for the role, you specify the SAML provider that you created earlier as the Principal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Flow: LDAP → STS → AWS access.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Web Identity Federation with &lt;code&gt;AssumeRoleWithWebIdentity&lt;/code&gt; API → STS → AWS resources.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;create-saml-identity-provider-in-iam&quot;&gt;Create SAML Identity provider in IAM&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Get the SAML metadata document from IdP.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create SAML IAM identity provider.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure SAML IdP with relying party trust.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In IdP, configure SAML Assertions for the authentication response.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;cognito&quot;&gt;Cognito&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Authorization, authentication sign-up and sign-in features, user management for mobile and web.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Scales to millions of users.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User pools: sign in, sign up, can use other providers(Google, FB, Amazon), MFA&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Login via social identity providers, such as Apple, Facebook, Google, and Amazon and enterprise identity providers via SAML and OIDC.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Identity pools: Create unique identities and assign permissions for users, obtain temporary AWS credentials with permissions you define to directly access other AWS services or to access resources through Amazon API Gateway.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For unauthenticated users, enable unauthenticated access in Cognito Identity Pool. Guest users can request an identity ID via the GetId API.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In Cognito User Pool, you can configure users in groups to manage the permissions better. Each group can be linked with an IAM Role.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you don’t use Amazon Cognito, then you choose to write a custom code or app that interacts with a web IdP (Login with Amazon, Facebook, Google, or any other OIDC-compatible IdP) and then call the &lt;code&gt;AssumeRoleWithWebIdentity&lt;/code&gt; API to trade the authentication token you get from those IdPs for AWS temporary security credentials.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pricing based on your monthly active users.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;iam-roles&quot;&gt;IAM Roles&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Trust relationship: Defines which service/user can assume the role.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;AssumeRole&lt;/code&gt; action via STS, configurable min 15mins, max 12hours.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;IAM roles can have a policy attached to define services that can be accessed by the role’s temporary creds.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When you assume a role, you give up your original permissions and take the permissions of the assigned role.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;service-role&quot;&gt;Service role&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;A service role is an AWS Identity and Access Management (IAM) that grants permissions to an AWS service so that the service can access AWS resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;networking&quot;&gt;Networking&lt;/h2&gt;
&lt;h3 id=&quot;vpc&quot;&gt;VPC&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;transit VPC&lt;/code&gt; is a common strategy for connecting multiple, geographically disperse VPCs and remote networks in order to create a global network transit center. Transit VPC uses customer-managed Amazon Elastic Compute Cloud (Amazon EC2) VPN instances in a dedicated transit VPC with an Internet gateway. This design requires the customer to deploy, configure, and manage EC2-based VPN appliances, which will result in additional EC2 instances, and potentially third-party product and licensing charges. Enables more complex routing rules, such as network address translation between overlapping network ranges, or to add additional network- level packet filtering or inspection.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/transit_vpc.png&quot; alt=&quot;Transit VPC diagram: three spoke VPCs connect over IPsec VPN from their virtual private gateways to EC2 routers in a central transit VPC, which also links the corporate data center and other provider networks&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When deploying distributed architectures, a popular approach is to build a &lt;code&gt;shared services VPC&lt;/code&gt;, which provides access to services required by workloads in each of the VPCs. This might include directory services or VPC endpoints. Sharing resources from a central location instead of building them in each VPC may reduce administrative overhead and cost.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VPC sharing (part of Resource Access Manager) allows multiple AWS accounts to create their application resources in the same VPC(shared by the VPC owner). The account that owns the VPC (owner) shares one or more subnets with other accounts (participants) that belong to the same organization.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/share_vpc.png&quot; alt=&quot;Shared VPC diagram: account A owns the VPC and shares subnets where accounts B and C run EC2 and RDS in the private subnet and account D runs EC2 and Redshift in the public subnet behind NAT and internet gateways&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You can’t have a VPC with only a public subnet and AWS Site-to-Site VPN.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS reserves 5 Ip addresses in each subnet. The first 4 and the last one&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To add IPv6 to VPC: a) Associate IPv6 CIDR block. b) Create Egress-only Internet Gateway for private subnets. c) Assign IPv6 addresses to EC2 instances from the IPv6 address range&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Possible to expand existing VPC by adding a secondary IPv4 range.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fixed MAC address for EC2 → use case for ENI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you create DHCP options, you cant modify them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use Traffic Mirroring to copy network traffic from an elastic network interface of type &lt;code&gt;interface&lt;/code&gt;. You can then send the traffic to out-of-band security and monitoring appliances for content inspection, threat monitoring, network tourbleshooting.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/traffic_mirroring.png&quot; alt=&quot;VPC traffic mirroring diagram: traffic from sources A and B passes filter A, is VXLAN-encapsulated and delivered to mirroring target D&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;AWS uses the longest prefix matching to determine where traffic should be routed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Access to interface endpoint: configured through AWS VPN connections or Direct Connect connections, through intra-region VPC peering connections and through inter-region VPC peering connections from any type of instance. You can add endpoint policies to interface endpoints that define which principal can perform which actions on which resources. An endpoint policy does not override or replace IAM user policies or service-specific policies. It is a separate policy for controlling access from the endpoint to the specified service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An interface endpoint, except for an Amazon S3 interface endpoint, has a corresponding private Domain Name System (DNS) hostname.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can limit outbound web connections from your VPC to the internet, using a web proxy (such as a squid server) with custom domain whitelists or DNS content filtering services.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;nacl&quot;&gt;NACL&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;A common use-case is to allow ephemeral ports in NACLs to handle response traffic.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;transit-gateway&quot;&gt;Transit Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Acts as a Regional virtual router for traffic flowing between your virtual private clouds (VPCs) and on-premises networks.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/transit_gateway.png&quot; alt=&quot;Transit gateway diagram: a central transit gateway interconnecting VPC A, VPC B and VPC C&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TGW supports multicast.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;nat-instance&quot;&gt;NAT Instance&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;When there is a connection time out, a NAT instance sends a FIN packet to resources behind the NAT instance to close the connection. It does not attempt to continue the connection which is why some connections might be failing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-direct-connect&quot;&gt;AWS Direct Connect&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Combine Direct Connect &amp;amp; VPN for an IPsec-encrypted private connection.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/dx_vpn.png&quot; alt=&quot;Diagram of a site-to-site VPN running over Direct Connect: virtual private gateways in two regions carry IPsec VPN across a public VIF at the Direct Connect location to the customer gateway&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Establish an AWS VPN over an AWS Direct Connect connection: a) Create your Direct Connect connection. b) Create a public virtual interface for your Direct Connect connection. For &lt;code&gt;Prefixes&lt;/code&gt; you want to advertise, enter your customer gateway device’s public IP address and any network prefixes that you want to advertise. Note: Your public virtual interface receives all AWS public IP address prefixes from each AWS Region (except the AWS China Region). These include the public IP addresses of AWS managed VPN endpoints. c) Create a new VPN connection. Be sure to use the same customer gateway’s public IP address that you used in the previous step.Note: You can configure the customer gateway in Border Gateway Protocol (BGP) with an Autonomous System Number (ASN). d) Configure your VPN to connect to your VPC. For example configurations, see tutorials for creating VPCs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For hybrid network architecture that is highly available and supports high bandwidth, configure the Direct Connect based hybrid network to achieve maximum resiliency for critical workloads by using separate connections from different service providers that terminate on separate devices in more than one location.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For a cheap backup alternative of DX, configure backup hardware VPN connection as a failover option.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To connect to services such as EC2 using just Direct Connect, you need to create a private virtual interface.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you want to encrypt the traffic flowing through Direct Connect, you will need to use the public virtual interface of DX to create a VPN connection.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure a public virtual interface from the Direct Connect connection to connect to AWS resources that are reachable by a public IP address (such as an S3 bucket).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With a public virtual interface, you can: a) Connect to all AWS public IP addresses globally. b) Create public virtual interfaces in any DX location to receive Amazon’s global IP routes c) Access publicly routable Amazon services in any AWS Region (except for the AWS China Region).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With a private virtual interface, you can: a) Connect VPC resources (such as Amazon Elastic Compute Cloud (Amazon EC2) instances or load balancers) on your private IP address or endpoint. b) Connect a private virtual interface to a DX gateway. Then, associate the DX gateway with one or more virtual private gateways in any AWS Region (except the AWS China Region). c) Connect to multiple VPCs in any AWS Region (except the AWS China Region), because a virtual private gateway is associated with a single VPC.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-site-to-site-vpn&quot;&gt;AWS Site-to-Site VPN&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;To create the customer gateway resource in AWS: a) The internet-routable IP address for the devic’s external interface. b) The type of routing: static or dynamic. c) For dynamic routing, the Border Gateway Protocol (BGP) Autonomous System Number (ASN).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;migrations&quot;&gt;Migrations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Use the AWS Cloud Adoption Readiness Tool (CART) to generate a migration assessment report to identify gaps in organizational skills and processes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;migration-hub&quot;&gt;Migration Hub&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Central place to visualize migration process including the discovery phase.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Provides key metrics and progress for individual applications, regardless of which tools are being used to migrate them.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-application-migrations-service&quot;&gt;AWS Application Migrations Service&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Highly automated lift-and-shift (rehost) solution that simplifies, expedites, and reduces the cost of migrating applications to AWS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The first setup step for Application Migration Service is creating the Replication Settings template. Add source servers to Application Migration Service by installing the AWS Replication Agent (also referred to as the Agent) on them. The Agent can be installed on both Linux and Windows servers.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-application-discovery-service&quot;&gt;AWS Application Discovery Service&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Helps you plan your migration to the AWS cloud by collecting usage and configuration data about your on-premises servers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Integrates with Migration Hub.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Agenteless Discovery with the Application Discovery Service Agentless Collector through your VMware vCenter. Collects IPs, hostnames, MAC addresses, disk resource allocation, utilization data, and computes average and peak for CPU, RAM, disk I/O.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Agent-based discovery by deploying the Application Discovery Agent(windows and linux) on each of your VMs. Collects static configuration data, system performance, I/O network connections, and running processes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data exploration in Amazon Athena allows you to analyze the data collected from all the discovered on-premises servers by Discovery Agents in one place.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-server-migration-servicesms&quot;&gt;AWS Server Migration Service(SMS)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;An agentless service for migrating thousands of on-premises workloads to AWS&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Each server volume replicated is saved as a new Amazon Machine Image (AMI).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS SMS creates a new EBS snapshot with every replication. It replicates server volumes from your on-premises environment to S3 temporarily and purges them from S3 right after creating EBS snapshots.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-datasync&quot;&gt;AWS DataSync&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Simplifies and accelerates data migrations to AWS as well as moving data between on-premises storage, edge locations, other clouds, and AWS Storage.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can move data directly to Glacier or Glacier Deep Archive.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Uses an agent to read and write data from your storage systems. A single DataSync agent is capable of saturating a 10 Gbps network link.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connects with standard protocols: Network File System (NFS), SMB, or the Amazon S3 API.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It comes with retry and network resiliency mechanisms, network optimizations, built-in task scheduling, monitoring.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Natively integrated with Amazon S3, Amazon EFS, Amazon FSx for Windows File Server, Amazon CloudWatch, and AWS CloudTrail.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use DataSync to migrate existing data to S3 &amp;amp; storage gw(e.g. file gw) to retain access to migrated data &amp;amp; ongoing updates from on-premises.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A 1Gbps connection at full utilization can transfer approximately 10 TB of data in a day.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;storage-gateway&quot;&gt;Storage Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Hybrid cloud storage service that provides on premises access and cloud storage with Amazon S3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Storage Gateway doesn’t automatically update the cache when you upload a file directly to Amazon S3. Perform a RefreshCache operation to see the changes on the file share.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Storage Gateway uses an appliance that is installed and hosted on premises as a VM appliance, as a hardware appliance, or in AWS as an Amazon Elastic Compute Cloud (Amazon EC2) instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connects using standard protocols Internet Small Computer System Interface (iSCI),SMB, and NFS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Low RTO and RPO for offline backups.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Storage Gateway uses Challenge-Handshake Authentication Protocol (CHAP) to authenticate iSCSI and initiator connections.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;file-gateway&quot;&gt;File Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;SMB or NFS access to data in S3 with local caching.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;volume-gateway&quot;&gt;Volume Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Present cloud-based iSCSI block storage volumes to your on-premises applications.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With cached volumes, the AWS Volume Gateway stores the full volume in its Amazon S3 service bucket, and just the recently accessed data is retained in the gateway’s local cache for low-latency access.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can create point in time snapshots on EBS of gateway volumes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Gateway-Cached volumes can support volumes of 1,024TB in size&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Gateway-stored volume supports volumes of 512 TB size.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;tape-gateway&quot;&gt;Tape Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Supports archiving directly to Glacier and Glacier Deep Archive.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-appsync&quot;&gt;AWS AppSync&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Store and sync data across mobile and web apps in real-time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-appflow&quot;&gt;AWS AppFlow&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Automate data flows between software as a service (SaaS) and AWS services.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;dms&quot;&gt;DMS&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;DMS data validation to ensure that your data has migrated accurately from the sourceto the target.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;KMS encrypts data in the replication instance. The master key is aws/dms by default or a customer managed key(CMK).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For unsupported DB sources, export data to CSV, load to S3, configure table definition JSON doc.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DMS Fleet Advisor will help to discover our data infrastructure.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DMS Schema Conversion or the AWS Schema Conversion Tool (AWS SCT) to automatically assess and convert schemas.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For heterogeneous database migrations, two-step process. Use AWS Schema Conversion Tool to convert the source schema and code to match the target DB, then use DMS to migrate data from the source to the target DB.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;snowball&quot;&gt;Snowball&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Up to 80TB, good choice if you have limited bandwidth.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Good choice for up to single digit PB with multiple devices.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you have less than 10TB probably not the best/cheapest choice.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data encrypted on device.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The AWS Snowball has a typical 5-7 days turnaround time.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;snowball-edge&quot;&gt;Snowball edge&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Onboard compute power for edge-computing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;~100TB&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can’t directly copy data from Snowball Edge devices into AWS Glacier.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To speed up data transfer: Perform multiple write operations at one time, transfer small files in batches, write from multiple sources, dont perform other operations on files during transfer(rename, metadata changes etc), reduce the local network use, eliminate unnecessary hops.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Typically, files that are 1 MB or smaller should be included in batches. There’s no hard limit on the number of files you can have in a batch, though AWS recommends that you limit your batches to about 10,000 files. Having more than 100,000 files in a batch can affect how quickly those files import into Amazon S3 after you return the device. AWS recommends that the total size of each batch be no larger than 100 GB. Batching files is a manual process, which you have to manage.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;snowmobile&quot;&gt;Snowmobile&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;~100 PB&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For large datasets of 10PB or more in a single location.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports loading to S3 or Glacier.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;s3-transfer-acceleration&quot;&gt;S3 Transfer acceleration&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;First files transfered to the closest edge location and then routed inside the AWS network.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With S3TA, you pay only for transfers that are accelerated.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Upload to a centralized bucket from all over the world.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Transfer gigabytes to terabytes of data on a regular basis across continents.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After Transfer Acceleration is enabled, it can take up to 20 minutes for you to realize the performance benefit.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;transfer-family&quot;&gt;Transfer Family&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Transfer Family provides fully managed(serverless) support for file transfers directly into and out of Amazon S3 or Amazon EFS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Support for Secure File Transfer Protocol (SFTP), File Transfer Protocol over SSL (FTPS), and File Transfer Protocol (FTP).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;vm-importexport&quot;&gt;VM Import/Export&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;CLI command → &lt;code&gt;aws ec2 create-instance-export-task&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;data-transfer&quot;&gt;Data Transfer&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;No charge for inbound data transfer across all services in all Regions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data transfer from AWS to the internet is charged per service, with rates specific to the originating Region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There is a charge for data transfer across Regions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data transfer within the same Availability Zone is free.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data transfer over a VPC peering connection that stays within an Availability Zone is free. Data transfer over a VPC peering connection that crosses Availability Zones will incur a data transfer charge for ingress/egress traffic. If the VPCs are peered across Regions, standard inter-Region data transfer charges will apply.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data processing charges apply for each GB sent from a VPC, Direct Connect, or VPN to Transit Gateway.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Direct Connect and VPN also incur charges for data flowing out of AWS.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For choosing between data transfer options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The AWS Snow Family is a better choice for moving large batches of data at once.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Direct Connect is a better choice for a private networking requirement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS VPN is a better choice if you want to add encryption in transit.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;encryption&quot;&gt;Encryption&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Encryption in transit → VPN with IPSec, TLS for network level traffic, SSL certs for web apps and CloudFront, HTTPS listeners for LBs, SSL to encrypt connection to DB instance, VPC endpoints to keep data transit inside AWS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Encryption at rest → AES256 AWS standard option, client side option, KMS.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;kms&quot;&gt;KMS&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Highly available, durable, fully managed service that lets you create, manage, and control cryptographic keys across your applications and more than 100 AWS services.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Centralized control over the lifecycle and permissions of your keys.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can import keys from your own key management infrastructure(256-bit symmetric keys.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create and use asymmetric KMS keys and data key pairs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Customer Master Keys(CMKs) includes metadata(key id, creation date, etc), encrypt and decrypt up to 4KB of data. Generate, encrypt, decrypt the data keys used outside of KMS to encrypt data(envelope encryption). Normally used to generate data keys that are then used to encrypt/decrypt data (KEY→ view:yes, manage:yes, used only for my account:yes)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS managed CMK &lt;code&gt;(KEY→ view:yes, manage:no, used only for my account:yes)&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS owned CMK &lt;code&gt;(KEY→ view:no, manage:no, used only for my account:no)&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data keys: encryption keys used to encrypt data, encrypted with CMK, KMS doesn’t track data keys, data keys need to be managed by customer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Key policies and grants to manage access.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;GenerateDataKey&lt;/code&gt; → returns plaintext and encrypted data key under the CMK. Remove the plaintext data key after data has been ecnrypted. You can store the encrypted data key along with the encrypted data to later decrypt the data.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/generate_data_key.png&quot; alt=&quot;KMS envelope encryption diagram: GenerateDataKey uses the KMS key to produce both a plaintext data key and an encrypted copy of it&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If you choose to have AWS KMS automatically rotate keys, you don’t have to re- encrypt your data. AWS KMS automatically keeps previous versions of keys to use for decryption of data encrypted under an old version of a key. All new encryption requests against a key in AWS KMS are encrypted under the newest version of the key.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Schedule key deletion with configurable waiting period from 7 to 30 days.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Up to 100,000 KMS keys per account per Region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Key policies don’t automatically give permission to the account or any of its users. For example, suppose you create a key policy that gives only one user access to the KMS key. If you then delete that user, the key becomes unmanageable and you must contact AWS Support to regain access to the KMS key.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SSE-S3 requires that Amazon S3 manage the data and the encryption keys.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SSE-C requires that you manage the encryption key.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SSE-KMS requires that AWS manage the data key but you manage the customer master key (CMK) in AWS KMS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pricing per key and per api request above the free tier.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;security&quot;&gt;Security&lt;/h2&gt;
&lt;h3 id=&quot;acm&quot;&gt;ACM&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Can import your own certificates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ACM certificates must be in the same Region as the resource where they are being used. The only exception is Amazon CloudFront, a global service that requires certificates in the US East (N. Virginia) region. ACM certificates in this region that are associated with a CloudFront distribution are distributed to all the geographic locations configured for that distribution.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Default 13 months validity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Each cert should have at least one fully qualified domain.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Helps you comply with regulatory requirements by making it easy to facilitate secure connections, a common requirement across many compliance programs such as PCI, FedRAMP, and HIPAA.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Server Name Indication (SNI) custom SSL → for multiple domains to serve SSL traffic over the same IP address.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;guardduty&quot;&gt;GuardDuty&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;One-click deployment with no additional software or infrastructure to deploy and manage. By default regional resource.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Continuous intelligent threat detection and security monitoring, VPC flow logs, DNS Logs, CloudTrail event logs, EKS, RDS. Uses existing threat intelligence feeds and lists that contain malicious IPs, domains. ML, behavioral modeling to catch anomalous behaviors, AuroraDB and S3.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/guardduty.png&quot; alt=&quot;GuardDuty overview: CloudTrail events, VPC flow logs, DNS logs, S3 data events, EKS audit logs and Aurora login events feed machine-learning security analytics that produce findings integrated with Detective, Security Hub and EventBridge&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Can detect: escalation privileges, exposed credentials, communication with malicious external systems, detect compromised ec2 with malware, detect unauthorized infra deployments, reconnaissance, account compromise.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Invite other accounts to use and become master account → Then you can get findings of member accounts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Integrates with Security Hub, Detective.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automated remediation possible with API, cli, EventBridge + Lambda.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Aggregate security findings produced by GuardDuty across Regions using Amazon CloudWatch Events or pushing findings to your data store (like S3) and then aggregating findings as you see fit. You can also send GuardDuty findings to AWS Security Hub and use its cross-Region aggregation capability.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Associate and manage multiple AWS accounts from a single administrator account. GuardDuty is integrated with AWS Organizations, allowing you to delegate an administrator account for GuardDuty for your organization.This delegated administrator (DA) account is a centralized account that consolidates all findings and can configure all member accounts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pricing per log events and GB processed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;shield&quot;&gt;Shield&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Protect against DDo,S, SYN floods, UDP floods, or other reflection attacks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Shield standard automatically available without extra charge.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Shield advanced → higher lvl protection against larger attacks, 24/7 access to DDoS response team, advanced real time metrics and reports and threat intelligence dashboard.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Shield standard is free. Shield advanced ~3k + data transfer out.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DDoS mitigation without Shield Advanced: a) Use CloudFront b) Add CloudWatch alerts for CPU, NetworkIn c) Set up autoscaling behind ELB d) Integrate WAF with ALB&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;web-application-firewallwaf&quot;&gt;Web Application Firewall(WAF)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Protect against common web based attacks and exploits.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Security rules that control bot traffic and block common attack patterns such as SQL injection or cross-site scripting (XSS).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tightly integrates with CloudFront and ALB, API Gateway, and AWS AppSync. AWS WAF rules cannot protect a Network Load Balancer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can create rules that can block or rate-limit traffic from specific user-agents, from specific IP addresses, or that contain particular request headers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can leverage rate-based rules to limit access to certain parts of a webpage(e.g. login page).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pricing is per ACL, per rule, per request.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;firewall-manager&quot;&gt;Firewall Manager&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Centrally configure and manage firewall rules across your accounts and applications in AWS Organizations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can centrally configure AWS WAF rules, AWS Shield Advanced protection, Amazon Virtual Private Cloud (VPC) security groups, AWS Network Firewalls, and Amazon Route 53 Resolver DNS Firewall rules across accounts and resources in your organization. It does not support Network ACLs as of today.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-network-firewall&quot;&gt;AWS Network Firewall&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;With Network Firewall, you can filter traffic at the perimeter of your VPC. This includes filtering traffic going to and coming from an internet gateway, NAT gateway, or over VPN or AWS Direct Connect&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-config&quot;&gt;AWS Config&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Configuration history and changes on AWS resources or software(OS and system- level configuration changes with Systems manager integration).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Discovers, maps, and tracks AWS resource relationships in your account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pre-built or custom rules (on AWS Lambda) evaluating the configurations of your cloud resources.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Conformance packs are collection of rules + remediation actions into a single entity and deploy it across an Organization. Common baseline for resource configuration policies and best practices across multiple accounts. Conformance packs also provide compliance scores.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multi-account, multi-Region data aggregation for centralized auditing and governance using an aggregator resource. Associate your AWS Organization to quickly add your accounts. The aggregated dashboard on AWS Config will display the total count of non-compliant rules across your Organization.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports extensibility → publish the configuration of third-party resources into AWS Config using our public API operations(e.g. GitHub, Microsoft AD, on premises server).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Visual dashboard to help you quickly spot non-compliant resources and take appropriate action.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Partners who provide solutions that integrate with AWS Config for resource discovery, change management, compliance, or security.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connect with ITSM / ITOM Software(Jira Service Desk, ServiceNow).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS Config applies remediation using AWS Systems Manager Automation documents.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pricing is per config item, per rule, per conformance pack&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;security-hub&quot;&gt;Security Hub&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Gives you an overview of security and compliance status of your AWS account(s) that performs security best practice checks, aggregates alerts, and enables automated remediation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Collects and consolidates GuardDuty, Config, Inspector, Macie, WAF, partner solutions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Integrate security findings from AWS services and third-party products.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With finding aggregation you can use a single region to view and update findings from multiple linked regions and accounts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS Security Hub creates a score to show you how you are doing against security standards and displays it on the main AWS Security Hub dashboard.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Custom actions for remediation with EventBridge, Lambda or Systems Manager.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/security_hub_remediation.png&quot; alt=&quot;Automated remediation flow: findings arrive in Security Hub, custom actions emit CloudWatch events, and a rule triggers a Lambda function to remediate&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If a compliance standard, such as PCI-DSS, is already present in AWS Security Hub, then the fully managed AWS Security Hub service is the easiest way to operationalize it.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-secrets-manager&quot;&gt;AWS Secrets Manager&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Centrally manage lifecycle of secrets.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatic secrets rotation without disrupting applications.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatic replication of secrets to multiple AWS Regions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Config Rules to help you verify that your secrets are configured in accordance with your organization’s security and compliance requirements.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS Secrets Manager uses envelope encryption (AES-256 encryption algorithm) to encrypt your secrets in AWS Key Management Service (KMS).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To rotate the keys successfully you need to configure an Amazon VPC interface endpoint to access AWS services running in Amazon VPC private subnets because these subnets don’t have internet access. Pricing is per secret stored and per api call.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;inspector&quot;&gt;Inspector&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Automated vulnerability management service. Automatically discovers all Amazon EC2 instances, Lambda functions, and container images residing in Amazon ECR that are identified for scanning, and then immediately starts scanning them for software vulnerabilities and unintended network exposure.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Scans EC2, ECR registry for vulnerabilities and unintended network exposure.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Simplified one-click onboarding and integration with AWS Organizations by setting a Delegated Administrator (DA) account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All findings are aggregated in the Amazon Inspector console, routed to AWS Security Hub, and pushed through Amazon EventBridge to automate workflows such as ticketing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vulnerabilities detected in software dependencies used in AWS Lambda functions are automatically mapped to the underlying Lambda layers, making remediation efforts easier.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can generate reports in multiple formats (CSV or JSON) with a few clicks in the Amazon Inspector console or through the Amazon Inspector APIs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Integrates with partners for extensibility. Pricing is per ec2 scanned, per container image scanned, per lambda scanned.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;licence-manager&quot;&gt;Licence Manager&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Allows to define rules for licences and Integrates with EC2 to enforce licensing rules and track usage.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;cloudtrail&quot;&gt;CloudTrail&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Auditing, security monitoring, operational troubleshooting → records all API calls.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Management events and Data events(S3 operations).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Event history(90 days of control plane actions at no additional cost).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudTrail Lake → managed data lake for capturing, storing, accessing, analyzing user and API activity for audit and security purposes for up to seven years and query logs within seconds for search and analysis. run SQL-based queries on activity logs for auditing within the lake.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can deliver your ongoing management and data events to S3 and optionally to CloudWatch Logs or EventBridge by creating trails. Trails capture a record of AWS account activities. Up to 5 trails per region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enable CloudTrail Insights in your trails to identify unusual operational activity in your AWS accounts. e.g. misbehaving scripts or apps → bursts in IAM calls.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Log file integrity validation feature to see if logs have been tampered.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Possible to capture and store events from muliple regions and multiple accounts in a single location.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Turning on CloudTrail has no impact on performance for your AWS resources or API call latency.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To detect the presence of public S3 objects → CloudTrail, s3 object-logging, EventBridge.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For global services such as AWS Identity and Access Management (IAM), AWS STS, Amazon CloudFront, and Route 53, events are delivered to any trail that includes global services (IncludeGlobalServiceEvents flag).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For multi-region trails enables the flag —is-multi-region-trail&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To create an organization trail for all AWS accounts, ensure that the &lt;code&gt;Enable for all accounts in my organization&lt;/code&gt; option is checked when you create a new CloudTrail trail. Pricing is per lake (ingestion and storage per GB), per trail( data &amp;amp; management events), and per insight (events analyzed).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;dns&quot;&gt;DNS&lt;/h2&gt;
&lt;h3 id=&quot;route53&quot;&gt;Route53&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Highly available and scalable DNS web service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Your DNS records are organized into “hosted zones” that you configure with Route 53’s API.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can transfer an external domain to Route53 so that you can conveniently manage your domain names and DNS configuration in a single location.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To keep your domain name with the current registrar, inform the registrar to update the name servers for your domain to the ones associated with your hosted zone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With query logging, Amazon Route 53 sends logs to CloudWatch Logs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Route53 uses anycast to help end users’ DNS queries get answered from the optimal Route 53 location.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maximum of 500 hosted zones and 10,000 resource record sets per hosted zone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Possible to create multiple hosted zones for the same domain name for testing purposes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Alias records, which are an Amazon Route 53-specific extension to DNS and let you route traffic to AWS resources, are free. To route domain traffic to an ELB load balancer, use Amazon Route 53 to create an alias record that points to your load balancer. It’s similar to a CNAME record, but you can create an alias record both for the root domain, such as example.com, and for subdomains, such as &lt;a href=&quot;http://www.example.com&quot;&gt;www.example.com&lt;/a&gt;. (You can create CNAME records only for subdomains). a) For EC2 instances, → Type A Record without an Alias b) For ELB, Cloudfront, and S3 → Type A Record with an Alias, c) For RDS → CNAME Record with no Alias.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports both forward (AAAA) and reverse (PTR) IPv6 records.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Geo DNS lets you balance load by directing requests to specific endpoints based on the geographic location from which the request originates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Traffic Flow is an easy-to-use and cost-effective global traffic management service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports health checks over HTTPS, HTTP or TCP.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Each health check’s results are published as Amazon CloudWatch metrics showing the endpoint’s health and, optionally, the latency of the endpoint’s response.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Metric based health checks let you perform DNS failover based on any metric that is available within Amazon CloudWatch, including AWS-provided metrics and custom metrics.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Resolver is integrated with AWS Resource Access Manager (RAM) which provides customers with a simple way to share their resources across AWS accounts or within their AWS Organization.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/resolver.png&quot; alt=&quot;Route 53 Resolver hybrid DNS diagram: on-premises DNS servers forward queries through inbound endpoints, and outbound endpoints forward VPC queries to on-premises resolvers over the VPN connection&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To resolve any DNS queries for resources in the AWS VPC from the on-premises network, you can create an inbound endpoint on Route 53 Resolver&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To resolve DNS queries for any resources in the on-premises network from the AWS VPC, you can create an outbound endpoint on Route 53 Resolver.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can associate a VPC from one account with a private hosted zone in a different account. You first must authorize the association. In addition, you can’t use the AWS console(use AWS CLI) either to authorize the association or associate the VPCs with the hosted zone. Optional but recommended – Delete the authorization to associate the VPC with the hosted zone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Allows you to enable Domain Name System Security Extensions (DNSSEC) signing for all existing and new public hosted zones, and enable DNSSEC validation for Amazon Route 53 Resolver. Amazon Route 53 DNSSEC provides data origin authentication and data integrity verification for DNS and can help customers meet compliance mandates, such as FedRAMP. Route 53 cryptographically signs each record in that hosted zone. When you enable DNSSEC validation on the Route 53 Resolver in your VPC, it ensures that DNS responses have not been tampered with in transit. This can prevent DNS Spoofing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can specify multiple values for almost any record, but multivalue answer routing also lets you check the health of each resource, so Route 53 returns only value for healthy resources. It’s not a substitute for a load balancer, but the ability to return multiple health-checkable IP addresses is a way to use DNS to improve availability and load balancing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pricing: monthly charge for each hosted zone managed with Route 53, incur charges for every DNS query answered by the Amazon Route 53, annual charge for each domain name registered via or transferred into Route 53.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;storage&quot;&gt;Storage&lt;/h2&gt;
&lt;h3 id=&quot;s3&quot;&gt;S3&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;S3 Replication enables automatic, asynchronous copying of objects across Amazon S3 buckets. There are two types of Replications: a) Cross-Region replication (CRR) is used to copy objects across Amazon S3 buckets in different AWS Regions. b) Same-Region replication (SRR) is used to copy objects across Amazon S3 buckets in the same AWS Region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For cross region replication, versioning must be enabled in both sources and destination buckets.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, an S3 object is owned by the AWS account that uploaded it. This is true even when the bucket is owned by another account. To get full access to the object, the object owner must explicitly grant the bucket owner access. You can create a bucket policy to require external users to grant &lt;code&gt;bucket-owner-full-control&lt;/code&gt; when uploading objects so the bucket owner can have full access to the objects.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can change the storage class of the replicated items.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you version-enable a bucket, it can never return to an unversioned state. Versioning can only be suspended once it has been enabled.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Metadata, which can be included with the object, is not encrypted while being stored on Amazon S3. Therefore, AWS recommends that customers not place sensitive information in Amazon S3 metadata.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Object lock: store objects as locked(only on versioned buckets).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Objects stored in a bucket before enabling versioning have a version ID null.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can place a retention period on an object version. Different versions of a single object can have different retention modes and periods.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To host a static website, you configure an Amazon S3 bucket for website hosting, and then upload your website content to the bucket. This bucket must have public read access. You must give the bucket the same name as the record that you want to use to route traffic to the bucket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 static website: a) To allow public read access to objects, the account that owns the bucket must own the objects b) on S3 bucket that allows anonymous or public access will not apply to objects that are encrypted with AWS KMS. You must remove KMS encryption from the objects that you want to serve using the Amazon S3 static website endpoint.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Up to 24 hours can pass before the bucket name propagates across all AWS Regions. During this time, you might receive the 307 Temporary Redirect response for requests to Regional endpoints that aren’t in the same Region as your bucket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon S3 server access logging captures all bucket-level and object-level events.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using the Range HTTP header in a GET Object request, you can fetch a byte-range from an object, transferring only the specified portion. A byte-range request is a perfect way to get the beginning/end of a file and ensuring we remain efficient during our scan of our S3 bucket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With Amazon S3 Select, you can scan a subset of an object by specifying a range of bytes to query using the ScanRange parameter.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Max object upload 5GB. When your object size reaches 100 MB, you should consider using multipart uploads. Upload a single object as a set of parts. You can upload these object parts independently and in any order. If transmission of any part fails, you can retransmit that part without affecting other parts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Max object size 5TB.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use S3 Access Points to manage access to shared datasets on Amazon S3. VPC Gateway endpoint + S3 access endpoint + bucket policy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 standard IA, one-zone IA, intelligent tier has a minimum storage duration charge of 30 days.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 Glacier has a minimum storage duration charge of 90 days.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 Glacier deep archive has a minimum storage duration charge of 180 days.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 Standard no minimum storage duration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The AWS S3 sync command uses the &lt;code&gt;CopyObject&lt;/code&gt; APIs to copy objects between S3 buckets.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can increase your read or write performance by parallelizing reads with prefixes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To encrypt an object at the time of upload, you need to add a header called &lt;code&gt;x-amz-server-side-encryption&lt;/code&gt;. To enforce object encryption, create an S3 bucket policy that denies any S3 Put request that does not include the &lt;code&gt;x-amz-server-side-encryption&lt;/code&gt; header.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When you use server-side encryption with Amazon S3 managed keys (SSE-S3), each object is encrypted with a unique key. As an additional safeguard, it encrypts the key itself with a root key that it regularly rotates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon S3 now applies server-side encryption with Amazon S3 managed keys (SSE- S3) as the base level of encryption for every bucket in Amazon S3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bucket owners pay for all Amazon S3 storage and data transfer costs associated with their bucket. A bucket owner, however, can configure a bucket to be a Requester Pays bucket. &lt;code&gt;With Requester Pays&lt;/code&gt; buckets, the requester instead of the bucket owner pays the cost of the request and the data download from the bucket. The bucket owner always pays the cost of storing data. You must authenticate all requests involving Requester Pays buckets. Requesters must include &lt;code&gt;x-amz-request-payer&lt;/code&gt; in their requests either in the header, for POST, GET and HEAD requests, or as a parameter in a REST request to show that they understand that they will be charged for the request and the data download.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 notifications events: New object created, object removal, restore object, reduced redundandcy storage object lost, replication,S3 Lifecycle expiration events, S3 Lifecycle transition events, S3 Intelligent-Tiering automatic archival events, Object tagging events, Object ACL PUT events. Enabling notifications is a bucket-level operation; that is, you store notification configuration information in the notification subresource associated with a bucket. Destinations: SNS, SQS, Lambda, Amazon EventBridge&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;glacier&quot;&gt;Glacier&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Vault Lock allows you to easily deploy and enforce compliance controls for individual S3 Glacier vaults with a vault lock policy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;ebs&quot;&gt;EBS&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Copy snapshots don’t inherit the retention schedule and can be kept indefinitely.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For an encrypted EBS volume data stored at rest on the volume, data moving between the volume and the instance, snapshots created from the volume, and volumes created from those snapshots are all encrypted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon EBS Multi-Attach enables you to attach a single Provisioned IOPS SSD (io1 or io2) volume to multiple instances with Nitro system that are in the same Availability Zone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EBS volume are locked to AZ, to attach to other AZ you have to snapshot it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copying an unencrypted snapshot allows encryption.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;instance-store&quot;&gt;Instance store&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;SSD-based instance store volumes support more than a million IOPS for random reads.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cant create snapshots for instance store volumes.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;efs&quot;&gt;EFS&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;POSIX compliant.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;1000s on concurrent NFS clients, 10Gbs throughput.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With Amazon EFS, you pay only for the resources that you use.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use EFS Access Points to manage application access.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Higher price point than EBS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maximum days for the EFS lifecycle policy is 90.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Encryption at rest must be enabled at creation time, Encryption in transit can be enabled during mount time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For encryption in transit, there is no need to add custom security group rules for port 443.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Access controls with endpoints in your Amazon VPC (mount targets) and POSIX- compliant user and group-level permissions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;fsx-for-windows&quot;&gt;FSx for Windows&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Multi-az possible, automatically provisions and maintains a standby file server in a different Availability Zone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test the failover of your Multi-AZ file system by modifying its throughput capacity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Monitor storage capacity and file system activity using Amazon CloudWatch.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Destination for publishing user access events by logging these events to CloudWatch Logs or streaming to Kinesis Data Firehose.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Accessible over the Server Message Block (SMB) protocol.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;fsx-for-lustre&quot;&gt;FSx for Lustre&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;High-performance file system.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;FSx for Lustre can only be used with Linux instances.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;databases&quot;&gt;Databases&lt;/h2&gt;
&lt;h3 id=&quot;dynamodb&quot;&gt;DynamoDB&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Global tables are available across regions with low latency. Must first enable streams.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can only query on primary key, sort key, or indexes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All DynamoDB tables are encrypted. There is no option to enable or disable encryption for new or existing tables. By default, all DynamoDB tables are encrypted under an AWS owned customer master key (CMK), which do not write to CloudTrail logs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can purchase reserved capacity in advance to lower the costs of running your DynamoDB instance. With reserved capacity, you pay a one-time upfront fee and commit to a minimum usage level over a period of time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Partition key and sort key – Referred to as a composite primary key, this type of key is composed of two attributes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With provisioned capacity, you pay for the provision of read and write capacity units for your DynamoDB tables. With provisioned capacity, you can also use auto- scaling to automatically adjust your table’s capacity based on the specified utilization rate to ensure application performance, and also potentially reduce costs. Probably best for you if you have relatively predictable application traffic, run applications whose traffic is consistent, and ramps up or down gradually&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DynamoDB on-demand you pay per request for the data reads and writes that your application performs on your tables. DynamoDB instantly accommodates your workloads as they ramp up or down. on-demand capacity mode is probably best when you have new tables with unknown workloads, unpredictable application traffic, and also if you only want to pay exactly for what you use&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;rds&quot;&gt;RDS&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use RDS performance insights to analyze DB load and DB performance. Also can get performance of SQL queries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports Cross-Region Automated Backups. Manual snapshots and Read Replicas are also supported across multiple Regions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multi-AZ DB → synchronously replicate the data to a standby instance for failover.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With Read replicas → asynchronously replicate the data uses the engines native replication to update the read replica whenever there is a change to the source DB instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multi region → asynchronously replicate the data to other regions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multi-AZ → primary and standby upgraded at the same time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To leverage reserved instances from another account in the same organization, you have to use instances with the same DB attributes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use weighted record sets to distribute requests across your read replicas. Within a Route 53 hosted zone, create individual record sets for each DNS endpoint associated with your read replicas. Then, give them the same weight, and direct requests to the endpoint of the record set.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon RDS does not support certain features in Oracle such as Multitenant Database, Real Application Clusters (RAC), Unified Auditing, Database Vault, and many more.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;auroradb&quot;&gt;AuroraDB&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fully managed postgresql, mysql designed for high performance, availability and global scale.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatic backups and point-in-time restore, storage autoscaling (of 10 GB up to a maximum of 128 TB), multi region replication.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Up to 15 replicas, automatic failover in case of issues. If no replicas, will attempt to create a new Amazon Aurora DB instance for you automatically.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/aurora_cluster.png&quot; alt=&quot;Amazon Aurora DB cluster diagram: a primary instance and Aurora replicas across three availability zones sharing one cluster volume with data copies in each zone&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Global tables for globally distributed applications. storage-based replication to replicate a database across multiple AWS Regions, with typical latency of less than one second. You can use a secondary region as a backup option in case you need to recover quickly from a regional degradation or outage. An Aurora cluster can recover in less than 1 minute even in the event of a complete regional outage This provides your application with an effective Recovery Point Objective (RPO) of 1 second and a Recovery Time Objective (RTO) of less than 1 minute&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Serverless option → where the database automatically starts up, shuts down, and scales capacity up or down based on your application’s needs. Good option if there isn’t consistent load on the DB.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Aurora parallel query provides faster analytical queries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Diagnose and Resolve Performance Bottlenecks with Amazon DevOps Guru for RDS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Backtrack for Aurora MySQL without needing to restore data from a backup.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Aurora is integrated with Amazon GuardDuty to help you identify potential threats to data stored in Aurora databases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon RDS Blue/Green Deployments allow you to make safer, simpler, and faster database updates with zero data loss.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish general, slow, audit, and error log data to a log group in Amazon CloudWatch Logs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Instrument your SQL database queries by adding the X-Ray SDK.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Aurora Auto Scaling dynamically adjusts the number of Aurora Replicas.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can specify the failover priority for Aurora Replicas, each Read Replica is associated with a priority tier (0-15). Aurora will promote the Read Replica that has the highest priority (the lowest numbered tier). If two or more Aurora Replicas share the same priority, then Amazon RDS promotes the replica that is the largest in size.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;documentdb&quot;&gt;DocumentDB&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Interface or gateway endpoints not supported currently.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DocumentDB Global Clusters: one primary region and up to five read-only secondary regions. You issue write operations directly to the primary cluster in the primary region and Amazon DocumentDB automatically replicates the data to the secondary regions using dedicated infrastructure. Latency is typically under a second.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;elasticache&quot;&gt;Elasticache&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For caching, which accelerates application and database performance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Simple object caching → Memcached.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Complex data types(e.g. lists, hashes, bit arrays) → Redis.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sorting and ranking of datasets(leaderboards) → Redis.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For HA, multi-az, failover → Redis.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Encryption, compliance(e.g. PCI) → Redis.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Global Datastore in Amazon ElastiCache for Redis provides fully managed, fast, reliable and secure cross-region replication.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon ElastiCache for Redis provides fully managed, automatic scaling to maintain steady performance for your application demands.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Redis authentication tokens enable Redis to require a token (password) before allowing clients to run commands.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can use both in-transit as well as at-rest encryption to guard against unauthorized access of your data on the server.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-backup&quot;&gt;AWS Backup&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;With continuous backups, you can restore your AWS Backup-supported resource by rewinding it back to a specific time that you choose within 1 second of precision (going back a maximum of 35 days). Continuous backup works by first creating a full backup of your resource and then constantly backing up your resource’s transaction logs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;data-analytics&quot;&gt;Data Analytics&lt;/h2&gt;
&lt;h3 id=&quot;redshift&quot;&gt;Redshift&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Using Amazon Redshift Spectrum, you can efficiently query and retrieve structured and semistructured data from files in Amazon S3 without having to load the data into Amazon Redshift tables.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For DR purposes, you can configure Amazon Redshift to automatically copy snapshots for the cluster to another AWS Region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To copy snapshots for AWS KMS–encrypted clusters to another AWS Region, you need to create a grant for Redshift to use a KMS customer master key (CMK) in the destination AWS Region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pattern: Kinesis Data Firehose → S3 → RedShift COPY cmd → Redshift.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For backups, no extra backup storage costs for up to 100% of your provisioned storage. Therefore, if we have a backup policy with 1-day retention we dont have any extra costs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Suitable for OLAP scenarios.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can migrate data to Amazon Redshift databases using AWS Database Migration Service.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;emr&quot;&gt;EMR&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Managed platform for big data frameworks(hadoop, spark).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vast amount of data, business intelligence workloads.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EMR cluster: Master node: A node that manages the cluster by running software components to coordinate the distribution of data and tasks among other nodes for processing. Core node: A node with software components that run tasks and store data in the Hadoop Distributed File System (HDFS) on your cluster. Task node: A node with software components that only runs tasks and does not store data in HDFS. Task nodes are optional.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;glue&quot;&gt;Glue&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Build ETL, fully managed service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Glue Data Catalog → central metadata repository.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ETL engine to generate python or scala code.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;kinesis-data-analytics-kda&quot;&gt;Kinesis Data Analytics (KDA)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Transform and analyze streaming service in real time used with Apache Flink.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cannot directly write the output of the records from a Lambda function to KDA.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Used to build SQL queries on streaming data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sources: Kinesis Data Streams, Amazon Managed Streaming for Apache Kafka (Amazon MSK), servers, IoT, and more.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Consumers: Kinesis Data Firehose and Lambda.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;kinesis-data-firehose&quot;&gt;Kinesis Data Firehose&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Automatically scales to match the throughput of your data and requires no ongoing administration. Auto-scaling solution, as there is no need to provision any shards like Kinesis Data Streams.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can configure Amazon Kinesis Data Firehose to aggregate and collate CloudWatch Logs from different AWS accounts and receive their log events in a centralized logging AWS Account by using a CloudWatch Logs destination and then creating a Subscription Filter.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When a Kinesis data stream is configured as the source of a Firehose delivery stream, Firehose’s PutRecord and PutRecordBatch operations are disabled and Kinesis Agent cannot write to Firehose delivery stream directly. Data needs to be added to the Kinesis data stream through the Kinesis Data Streams PutRecord and PutRecords operations instead.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sources: Servers, IoT, and any data source that can call the Kinesis API to send the data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Consumers: Amazon Redshift, Amazon OpenSearch Service, Amazon S3, HTTP endpoints, and more.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;kinesis-data-streams&quot;&gt;Kinesis Data Streams&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Facilitate multiple applications consume the same streaming data concurrently and independently. Enables real-time processing of streaming big data, as well as the ability to read and/or replay records in the same order to multiple Amazon Kinesis Applications.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, the 2MB/second/shard output is shared between all of the applications consuming data from the stream. use enhanced fan-out if you have multiple consumers retrieving data from a stream in parallel. Consumers receive their own 2MB/second pipe of read throughput per shard.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Default data retention 1 day, can go up to 7.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sources: Servers, IoT, and any data source that can call the Kinesis API to send the data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Consumers: Kinesis Data Analytics, Amazon EC2, Amazon EMR, and AWS Lambda.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;kinesis-video-streams&quot;&gt;Kinesis Video Streams&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use to stream live video from devices to the AWS Cloud, or build applications for real-time video processing or batch-oriented video analytics.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use HLS for live playback. Use the &lt;code&gt;GetHLSStreamingSessionURL&lt;/code&gt; API to retrieve the session URL and provide it to your player.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;appstream&quot;&gt;AppStream&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fully managed service which can be configured for application streaming or for delivery of virtual desktops with selective persistence.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Empower remote workers to react quickly to changing conditions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Monthly fee per streaming user.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;aiml&quot;&gt;AI/ML&lt;/h2&gt;
&lt;h3 id=&quot;amazon-rekognition&quot;&gt;Amazon Rekognition&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Deep learning, image recognition service, detect objects within an image.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pattern: Recognize something in videos: a) Kinesis video stream for sending streaming video to Rekognition Video using kinesis &lt;code&gt;PutMedia&lt;/code&gt; API b) Amazon Recognition Video Steam processor to manage the analysis c) Kinesis data streams consumer to read the analysis results(e.g. ec2 on asg).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports the &lt;code&gt;IndexFaces&lt;/code&gt; operation. You can use this operation to detect faces in an image and persist information about facial features that are detected in a collection. This is an example of a storage-based API operation because the service persists information on the server.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;amazon-comprehend&quot;&gt;Amazon Comprehend&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Get insights about the content of docs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Detect key phrases, language, sentiment, entities in text, intelligent document processing use cases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Search social feeds for mentions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;amazon-machine-learning-service&quot;&gt;Amazon Machine Learning Service&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Cloud-based used by devs to leverage ML.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Devs can use visualization tools and wizards to create ML models without deep ML knowledge.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;amazon-textract&quot;&gt;Amazon Textract&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ML service that automatically extracts text, handwriting, and data from scanned documents.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It goes beyond simple optical character recognition (OCR) to identify, understand, and extract data from forms and tables.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Process invoices and receipts with the &lt;code&gt;AnalyzeExpense&lt;/code&gt; API.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Process ID documents such as driver’s licenses and passports issued by the U.S Government using the &lt;code&gt;AnalyzeID&lt;/code&gt; API.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;amazon-transcribe&quot;&gt;Amazon Transcribe&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Convert speech to text. Using Automatic Speech Recognition (ASR) technology, customers can choose to use Amazon Transcribe for a variety of business applications, including transcription of voice-based customer service calls, generation of subtitles on audio/video content, and conduct (text-based) content analysis on audio/video content.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;content-delivery--global-network&quot;&gt;Content Delivery &amp;amp; Global Network&lt;/h2&gt;
&lt;h3 id=&quot;cloudfront&quot;&gt;CloudFront&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Price Classes let you reduce your delivery prices by excluding Amazon CloudFront’s more expensive edge locations from your Amazon CloudFront distribution.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reduce latency by delivering data through our globally dispersed points of presence.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Offers traffic encryption and access controls.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Accepts well-formed connections to prevent many common DDoS attacks like SYN floods and UDP reflection attacks from reaching your origin.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With Signed URLs and Signed Cookies, Token Authentication is supported to restrict access to only authenticated viewers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports Server Name Indication (SNI) for custom SSL certificates, along with the ability to take incoming HTTP requests and redirect them to secure HTTPS requests to ensure that clients are always directed to the secure version of your website. If you configure CloudFront to serve HTTPS requests using SNI, CloudFront associates your alternate domain name with an IP address for each edge location. The IP address to your domain name is determined during the SSL/TLS handshake negotiation and isn’t dedicated to your distribution.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Origin Shield enables a centralized caching layer and optimizes cache hit ratios and collapses requests across regions leading to as few as one origin request per object.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudFront supports multiple origins for backend architecture redundancy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon CloudFront is integrated with Amazon CloudWatch, and automatically publishes six operational metrics per distribution.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon CloudFront uses standard cache control headers you set on your files to identify static and dynamic content.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Geo Restriction feature lets you specify a list of countries in which your users can access your content. Alternatively, you can specify the countries in which your users cannot access your content.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can turn on HTTP/3 for new and existing Amazon CloudFront distributions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Field-Level Encryption is a feature of CloudFront that allows you to securely upload user-submitted data such as credit card numbers to your origin servers. The sensitive information provided by your clients is encrypted at the edge closer to the user and remains encrypted throughout your entire application stack, ensuring that only applications that need the data—and have the credentials to decrypt it—are able to do so. To use field-level encryption, you configure your CloudFront distribution to specify the set of fields in POST requests that you want to be encrypted, and the public key to use to encrypt them. You can encrypt up to 10 data fields in a request.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudFront by default do not forward query strings, cookies, and many of request headers. You can configure CloudFront to forward selected headers, cookies, and query strings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Possibility to add or modify request headers forwarded to the origin and then accept only these requests from the origin.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudFront Functions is a serverless edge compute feature allowing you to run JavaScript code at CloudFront edge locations for lightweight HTTP(s) transformations and manipulations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudFront signed cookies → provide access to multiple restricted files.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudFront signed URLs → access to one file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To increase your cache hit ratio, you can configure your origin to add a Cache- Control max-age directive to your objects, and specify the longest practical value for max-age. The shorter the cache duration, the more frequently CloudFront forwards another request to your origin to determine whether the object has changed and, if so, to get the latest version.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To improve the cache hit ratio when CloudFront is configured to cache based on request headers, forward and cache based on only specified headers. Remove Authorization HTTP header from the whitelist headers section for cache behavior configured for static content. In addition, AWS recommends not to configure caching based on values in the Date and User-Agent headers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Lambda@Edge is an extension of AWS Lambda allowing you to run code at global edge locations without provisioning or managing servers. Lambda@Edge offers powerful and flexible serverless computing for complex functions and full application logic closer to your viewers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cannot directly integrate Cognito User Pools with CloudFront distribution as you have to create aseparate Lambda@Edge function to accomplish the authentication via Cognito User Pools.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;lambda@edge lets you execute functions that customize the content that CloudFront delivers. A Lambda function can inspect cookies and rewrite URLs so that users see different versions of a site for A/B testing. Return different objects to viewers based on the device they are using by checking the User-Agent header. Make network calls to external resources to confirm user credentials, or fetch additional content to customize a response.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;global-acceleratorga&quot;&gt;Global Accelerator(GA)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Directs traffic to optimal endpoints over the AWS global network.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Two static anycast IP addresses that act as a fixed entry point to your application endpoints&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Good fit for non-HTTP use cases, such as gaming (UDP), IoT (MQTT), or Voice over IP.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS Global Accelerator has the following types of endpoints only - Network Load Balancers, Application Load Balancers, Amazon EC2 instances, or Elastic IP addresses (not possible to front CloudFront distribution)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Shift traffic gradually or all at once between the blue and the green environment and vice-versa without being subject to DNS caching on client devices and internet resolvers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With a custom routing accelerator, you can map one or more users to a specific destination among many destinations. Custom routing accelerators only support virtual private cloud (VPC) subnet endpoint types and route traffic to private IP addresses in that subnet.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;cloudfront-vs-ga&quot;&gt;CloudFront vs GA&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;CloudFront uses multiple sets of dynamically changing IP addresses, pricing is mainly based on data transfer out and HTTP requests, uses edge locations to cache content, and is designed to handle HTTP protocol.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Global Accelerator provides a set of static IP addresses as a fixed entry point to your applications, charges a fixed hourly fee and an incremental charge over your standard data transfer rates, uses edge locations to find an optimal pathway to the nearest regional endpoint, and is best with both HTTP and non-HTTP protocols, such as TCP and UDP.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;compute&quot;&gt;Compute&lt;/h2&gt;
&lt;h3 id=&quot;ec2&quot;&gt;EC2&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Dedicated (Instances) → no other customers share the hardware, May share hardware with instances in YOUR account only.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;(Dedicated) Hosts → book an entire physical server and have full control of EC2 instance placement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When you create a launch configuration, the default value for the instance placement tenancy is null and the instance tenancy is controlled by the tenancy attribute of the VPC.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Good EC2 combo → reserved instances for baseline + on-demand &amp;amp; spot for peaks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can only change the tenancy of an instance from dedicated to host, or from host to dedicated after you’ve launched it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EC2 Fleet lets you provision compute capacity across different instance types, Availability Zones and across On-Demand, Reserved Instances (RI) and Spot Instances.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On-Demand Capacity Reservation → create and manage reserved capacity on Amazon EC2. Define Availability Zone and quantity (number of instances) along with other instance specifications such as instance type and tenancy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Userdata executed as root by default.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;hibernate&quot;&gt;Hibernate&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Save contents from RAM to EBS root volume. When instance starts, EBS root volume is restored to its previous state and RAM contents are reloaded.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To use hibernation, the root volume must be an encrypted EBS volume.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When the instance state is stopping, you will not be billed if it is preparing to stop however, you will still be billed if it is just preparing to hibernate.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;spot&quot;&gt;Spot&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;EC2 fleet won’t automatically failover to on-demand if ec2 spot capacity is not fully fullfilled.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You pay the Spot price that’s in effect at the beginning of each instance-hour for your running instance. If Spot price changes after you launch the instance, the new price is charged against the instance usage for the subsequent hour.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Recommend using multiple Spot capacity pools to maximize the amount of Spot capacity available to you.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Spot blocks are designed not to be interrupted and will run continuously for the duration you select, independent of Spot market price. In rare situations, Spot blocks may be interrupted due to AWS capacity needs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do not support multi-region Fleet requests.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;placement-groups&quot;&gt;Placement Groups&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It is recommended that you launch the number of instances that you need in the placement group in a single launch request and that you use the same instance type for all instances in the placement group. If you try to add more instances to the placement group later, or if you try to launch more than one instance type in the placement group, you increase your chances of getting an insufficient capacity error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you receive a capacity error when launching an instance in a placement group that already has running instances, stop and start all of the instances in the placement group, and try the launch again. Restarting the instances may migrate them to hardware that has the capacity for all the requested instances.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Before you move or remove the instance from a placement group, the instance must be in the stopped state. You can move or remove an instance using the AWS CLI or an AWS SDK.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;spread&quot;&gt;Spread&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Maximum of 7 running instances per Availability Zone per group.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Recommended for applications that have a small number of critical instances that should be kept separate from each other.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Spread placement groups provide access to distinct racks, and are therefore suitable for mixing instance types or launching instances over time.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;cluster&quot;&gt;Cluster&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Higher per-flow throughput limit of up to 10 Gbps for TCP/IP traffic and are placed in the same high-bisection bandwidth segment of the network.&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;partition&quot;&gt;Partition&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Spreads your instances across logical partitions such that groups of instances in one partition do not share the underlying hardware with groups of instances in different partitions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Used by large distributed and replicated workloads.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;ec2-on-demand-instance-limits&quot;&gt;EC2 On-demand instance limits&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Amazon EC2 is transitioning On-Demand Instance limits from the current instance count-based limits to the new vCPU-based limits to simplify the limit management experience for AWS customers.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;ec2-image-builder&quot;&gt;EC2 Image Builder&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use RAM to share EC2 Image Builder resources, add the shared components, images, recipes in resource shares and configure principals which are allowed to access the shared resources.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Possible to distribute the AMI to multiple regions or shared with other accounts.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;graviton2&quot;&gt;Graviton2&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;40% better price/performance at 20% lower cost over comparable Intel x86.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;graviton3&quot;&gt;Graviton3&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;25% better price/performance compared to graviton2.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-batch&quot;&gt;AWS Batch&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Dynamically provisions the optimal quantity and type of compute resources (e.g., CPU or memory optimized instances) based on the volume and specific resource requirements of the batch jobs submitted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No additional charge, only pay for AWS underlying resources you create to store and run your batch jobs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use AWS Batch to accelerate content creation, dynamically scale media packaging, and automate asynchronous media supply chain workflows.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;containers&quot;&gt;Containers&lt;/h2&gt;
&lt;h3 id=&quot;ecs&quot;&gt;ECS&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fully-managed container orchestration service, with AWS configuration and operational best practices built-in, and no control plane, nodes, or add-ons for you to manage.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ECS Service Connect simplifies building and operating resilient distributed applications and provides rich traffic telemetry in the ECS console and in Amazon CloudWatch. Supports automatic connection draining that helps your client applications switch to a new version of the service endpoint without encountering traffic errors.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Serverless by default with built in Fargate.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Natively integrates with the Security, Identity, and Management and Governance tools.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Blue/green deployments with AWS CodeDeploy help you minimize downtime during application updates. New version of ECS service alongside the old one and test before rerouting traffic with rapid rollback if necessary.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Capacity Providers → running a service in a predefined split percentage across Fargate and Fargate Spot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Task scheduling for batch jobs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Service → specified number of tasks are constantly running and restarts tasks if failure occurs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Customize how tasks are placed onto a cluster of Amazon EC2 instances based on built-in attributes such as instance type, Availability Zone, or user-defined custom attributes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Autoscaling by integrating Amazon ECS on Fargate with Amazon CloudWatch alarms and Application Auto Scaling.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ECS on ec2 cluster autoscaling → ASG, capacity provider, CloudWatch, scaling policy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ECS on ec2 service autoscaling → Cloudwatch alarms, Application Auto Scaling, scaling policy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The scaling policies support a cooldown period. This is the number of seconds to wait for a previous scaling activity to take effect.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Possiblle to scale to zero when there’s no work to be done, set a minimum capacity of 0.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;fargate&quot;&gt;Fargate&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Choose for isolation model and security, and avoid managing ec2. If you need more control of compute, or customization options, or GPU for ec2 then dont use it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports graviton2.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Offers a serverless approach for running your Windows containers.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;elastic-container-registry-ecr&quot;&gt;Elastic Container Registry (ECR)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fully managed and highly available container registry.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon ECR is a Regional service. You can build pipelines to push them to Amazon ECR in one Region, and Amazon ECR can automatically replicate them to other Regions and accounts for deployment to multi-Region clusters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OCI and Docker support.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tight integration with inspector for vulnerability management.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pull through cache repositories help you keep container images sourced from public registries up to date.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS PrivateLink endpoints to allow your instances to pull images from your private repositories without traversing through the public internet.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can request a custom alias for images.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatically encrypts images at rest using Amazon S3 server-side encryption or AWS KMS encryption and transfers your container images over HTTPS.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;autoscaling&quot;&gt;Autoscaling&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Lifecycle hooks enable you to perform custom actions as the Auto Scaling group launches or terminates instances.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/ec2_autoscaling_lifecycle_hooks.png&quot; alt=&quot;EC2 Auto Scaling lifecycle diagram: instances pass through the Pending:Wait and Pending:Proceed lifecycle hook states before InService, and Terminating:Wait and Terminating:Proceed before Terminated&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;With launch templates, you can provision capacity across multiple instance types using both On-Demand Instances and Spot Instances.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Auto Scaling doesn’t terminate an instance that came into service based on EC2 status checks and ELB health checks until the health check grace period expires&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cooldown period: It ensures that the Auto Scaling group does not launch or terminate additional EC2 instances before the previous scaling activity takes effect(default 300s).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When there are multiple policies in force at the same time, Auto Scaling chooses the policy that provides the largest capacity for both scale-out and scale-in.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you have an EC2 Auto Scaling group (ASG) with running instances and you choose to delete the ASG, the instances will be terminated and the ASG will be deleted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Rebalancing AZs launches new instances before terminating the old ones.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Auto Scaling creates a new scaling activity for terminating the unhealthy instance and then terminates it. Later, another scaling activity launches a new instance to replace the terminated instance.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;loadbalancers&quot;&gt;Loadbalancers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When cross-zone load balancing is enabled, each load balancer node distributes traffic across the registered targets in all enabled Availability Zones.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, cross-zone load balancing is enabled for Application Load Balancer and disabled for Network Load Balancer.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;classic-load-balancer&quot;&gt;Classic Load Balancer&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;If your application is built within the Amazon Elastic Compute Cloud (Amazon EC2) Classic network.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;gateway-load-balancer&quot;&gt;Gateway Load Balancer&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Deploy and run third-party virtual appliances.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;application-load-balancer&quot;&gt;Application Load Balancer&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Operates at the application layer(7) routes to ec2, containers, IP, lambda.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Advanced loadbalancing http/https based on url, path, method, header, request attributes, source IP, TLS termination.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports sticky sessions(route request to the same target).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Injects a new custom identifier “X-Amzn-Trace-Id” HTTP header on all requests coming into the load balancer for easier tracking.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multiple certificates with SNI. Bind multiple certificates to the same secure listener on your load balancer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Seamlessly integrated with Amazon Cognito for user auth and has native support for OpenID Connect (IODC) identity providers (IdPs).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ALB targets with instance ID route to primary private IP in primary NIC, targets using IP addresses route to any private IP from one or more NICs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cannot directly upload a self-signed certificate in your ALB&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pricing: per Application Load Balancer-hour, Load Balancer Capacity Units (LCU)(active/new connections, processed bytes, rule evaluations) used per hour.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;network-loadbalancer&quot;&gt;Network Loadbalancer&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Flow hash routing algorithm can only be used with Network Load Balancers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Network LB has no security groups, lets traffic passing by.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DDos protection: Implement CloudFront and use your Network Load Balancer as the origin. You can also use AWS Shield Advanced.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NLB is a good choice if you expect millions of requests per second.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;serverless-events-queues-notifications&quot;&gt;Serverless, Events, Queues, Notifications&lt;/h2&gt;
&lt;h3 id=&quot;lambda&quot;&gt;Lambda&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Serverless Application Model (SAM) is an open source framework for building serverless applications. traffic shifting feature of SAM to easily test the new version of the Lambda function without having to manually move 100% of the traffic to the new version in one shot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS Lambda currently supports 1000 concurrent executions per AWS account per region. More requests will be throttled.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Lambda extentions through lambda layers to integrate with other tools.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Get the max memory used for a function call from CW logs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reserved concurrency – Reserved concurrency creates a pool of requests that can only be used by its function, and also prevents its function from using unreserved concurrency.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Provisioned concurrency – Provisioned concurrency initializes a requested number of execution environments so that they are prepared to respond to your function’s invocations.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;api-gateway&quot;&gt;API Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Per-client throttling limits are applied to clients that use API keys associated with your usage plan as a client identifier. Note that these limits can’t be higher than the per-account limits.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An API call through API Gateway cannot exceed 29 seconds due to the limits and not possible to increase.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;API caching in Amazon API Gateway to cache your endpoint’s responses. With caching, you can reduce the number of calls made to your endpoint and also improve the latency of requests to your API.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For websocket APIs, use @connections in your backend service to send a callback message to a connected client, get connection information, or disconnect the client.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With API Gateway, you can send the stream to an Amazon Kinesis data stream on which you can group requests in batches so there will be a decrease in requests in Lambda.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;step-functions&quot;&gt;Step Functions&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Can’t trigger an AWS Step Function directly from an S3 event, need a lambda first. Amazon Mechanical Turk (MTurk) is a crowdsourcing marketplace that makes it easier for individuals and businesses to outsource their processes and jobs to a distributed workforce who can perform these tasks virtually. You can integrate A Amazon Mechanical Turk and SWF to implement a set of workflows for batch processing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;eventbridge&quot;&gt;EventBridge&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;All state changes events from AWS services are free&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pay only per custom event, per 3rd part events, and for cross-account events.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sqs&quot;&gt;SQS&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use group ID with FIFO queues to help with FIFO delivery.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;FIFO supports 300 transactions (API calls) per second (300 send, receive, or delete operations per second). When you batch 10 transactions per operation (maximum), FIFO queues can support up to 3,000 (30010) transactions per second.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Message retention 4 days default, 14 days max.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Message timers to set an initial invisibility period for a message added to a queue. The default (minimum) delay for a message is 0 seconds. The maximum is 15 minutes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use when you need a) messaging semantics(message-level ack/fail), visibility timeout, b) dynamically increasing concurrency/throughput at read time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SQS + lambda: For standard queues, Lambda uses long polling to poll a queue until it becomes active. When messages are available, Lambda reads up to five batches and sends them to your function.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To scale to same number of consumers as producers, send data with a Group ID attribute.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A single SQS message queue can contain an unlimited number of messages. However, there is a 120,000 quota for the number of inflight messages for a standard queue and 20,000 for a FIFO queue. Messages are inflight after they have been received from the queue by a consuming component, but have not yet been deletedfrom the queue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, ReceiveMessageWaitTimeSeconds is zero which means it is using Short polling. If it is set to a value greater than zero, then it is Long polling.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cant change an existing standard queue to FIFO → delete and recreate.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Original and dead letter queue types must match.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can configure visibility timeout only for specific messages(e.g. with specific headers).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The maxReceiveCount is the number of times a consumer tries receiving a message from a queue without deleting it before being moved to the dead-letter queue. Setting the maxReceiveCount to a low value, such as 1 would result in any failure to receive a message to cause the message to be moved to the dead-letter queue. Such failures include network errors and client dependency errors.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sns&quot;&gt;SNS&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use SNS message filtering to assign a filter policy to the topic subscription, and the subscriber will only receive a message that they are interested in.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SNS FIFO for strict message ordering and deduplicated message delivery to one or more subscribers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon SNS Mobile Push Notifications, you have the ability to send push notification messages directly to apps on mobile devices. Push notification messages sent to a mobile endpoint can appear in the mobile app as message alerts, badge updates, or even sound alerts.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;amazon-pinpoint&quot;&gt;Amazon PinPoint&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To send push notifications&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;offers marketers and developers one customizable tool to deliver customer communications across channels, segments, and campaigns at scale.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;cicd&quot;&gt;CI/CD&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_professional_cheatsheet/cicd.png&quot; alt=&quot;AWS CI/CD toolchain mapped to pipeline stages: Cloud9 for authoring, CodeCommit for source, CodeBuild for build and test, CodeDeploy for deploy and CloudWatch for monitoring, orchestrated by CodePipeline with CDK and SAM underneath&quot;/&gt;&lt;/p&gt;
&lt;h3 id=&quot;codecommit&quot;&gt;CodeCommit&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Highly scalable, managed source control service for private git repositories.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can be used with Git repositories that include submodules.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A single file in a repository cannot be more than 2 GB in size.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deleting an AWS CodeCommit repository is a destructive one-way operation that cannot be undone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CodeCommit supports code reviews and enables you to set permissions on branches of your code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;HTTPS or SSH protocols or both to communicate with AWS CodeCommit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Repositories are automatically encrypted at rest.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automation use case: Lambda function that will scan the CodeCommit code submissions for IAM credentials, and then send out notifications or perform corrective actions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;codebuild&quot;&gt;CodeBuild&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fully managed continuous integration service that compiles source code, builds packages, runs tests, and produces ready-to-deploy software packages. With CodeBuild, you don’t need to provision, manage, and scale your own build servers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports sources GitHub, GitHub Enterprise, Bitbucket, or Amazon S3. CodeCommit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CodeBuilld has a Jenkins plugin provides a build step for your Jenkins project to send your build jobs to CodeBuild eliminating the need for provisioning and managing the Jenkins worker nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CodeBuild runs your build in fresh environments isolated from other users and discards each build environment upon completion. CodeBuild provides security and separation at the infrastructure and execution levels.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;codedeploy&quot;&gt;CodeDeploy&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fully managed, automates deployment to ec2, ecs, lambda, and on-premises.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Protects your application from downtime during deployments through rolling updates and deployment health tracking.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports Rolling and Blue/Green updates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Agents that have been tested on Amazon Linux, Red Hat Enterprise Linux, Ubuntu Server, and Microsoft Windows Server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CodeDeploy has a Jenkins plugin that provides a post-build step for your Jenkins project. Upon a successful build, it will zip the workspace, upload to S3, and start a new deployment. Supports also other 3rd party integrations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CodeDeploy to create a deployment process that publishes the new Lambda version but does not send any traffic to it. Then it executes a PreTraffic test to ensure that your new function works as expected. After the test succeeds, CodeDeploy automatically shifts traffic gradually to the new version of the Lambda function.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;codepipeline&quot;&gt;CodePipeline&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fully managed automate continuous delivery pipelines.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Webhooks, SNS, Slack, Chime, MS Teams for notifications.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Possibility to register a custom action and own custom systems.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pull source code for your pipeline directly from AWS CodeCommit, GitHub, Amazon ECR, or Amazon S3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Build and test with CodeBuild.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deploy using CodeDeploy, Elastic Beanstalk, ECS, Fargate.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Trigger custom actions at any point with lambda.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Allows you to integrate third-party developer tools, like GitHub or Jenkins, into any stage of your release process with one click.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;observability--monitoring&quot;&gt;Observability &amp;amp; Monitoring&lt;/h2&gt;
&lt;h3 id=&quot;cloudwatch&quot;&gt;CloudWatch&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Easily collect and store logs and infra, app, container metrics.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Build alarms, dashboards.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Container insights provide automatic dashboards in the CloudWatch console.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automate response to operational changes with cloudwatch events.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudWatch log insights → understand, improve, and debug their applications, by allowing them to search and visualize their logs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Offers anomaly detection on alarms.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudWatch ServiceLens logs, metrics, traces.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cross-account → &lt;code&gt;Monitoring account&lt;/code&gt; is a central AWS account that can view and interact with observability data generated across other accounts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Possible to have single dashboard to report metrics from different regions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;xray&quot;&gt;Xray&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Complete view of requests as they travel through your distributed apps and different AWS components with end-to-end tracing capabilities. Identify performance bottlenecks and hard to detect issues .&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An X-Ray trace is a set of data points that share the same trace ID.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An X-Ray segment encapsulates all the data points for a single component (for example, authorization service).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An X-Ray annotation is system-defined or user-defined data associated with a segment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Works with lambda, ecs, ec2, sqs. sns , elastic beanstalk.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Integrate the X-Ray SDK with your application and install the X-Ray agent. For example for ECS, you will need to install the X-Ray agent and instrument your application code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Captures metadata for requests to RDS/Aurora.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Node.js, Java, and .NET.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Service Map → creates a map of services used by your application with trace data that you can use to drill into specific services or issues. This provides a view of connections between service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS X-Ray enables customers to choose their own sampling rate.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can use X-Ray to track requests flowing through applications or services across multiple regions and AWS accounts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;X-Ray stores trace data for the last 30 days. This enables you to query trace data going back 30 days.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Your Lambda functions send trace data to X-Ray, and X-Ray processes the data to generate a service map and searchable trace summaries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pricing per traces received, retrieved, scanned.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;operations&quot;&gt;Operations&lt;/h2&gt;
&lt;h3 id=&quot;systems-manager&quot;&gt;Systems manager&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Systems Manager supports an SSM document for Patch Manager, AWS-RunPatchBaseline, which performs patching operations on instances for both security-related and other types of updates. When the document is run, it uses the patch baseline currently specified as the “default” for an operating system type.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;AWS-ApplyPatchBaseline&lt;/code&gt; SSM document supports patching on Windows instances only and doesn’t support Linux instances. For applying patch baselines to both Windows Server and Linux instances, the recommended SSM document is &lt;code&gt;AWS-RunPatchBaseline&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A patch group is an optional means of organizing instances for patching. For example, you can create patch groups for different operating systems (Linux or Windows), different environments (Development, Test, and Production), or different server functions (web servers, file servers, databases).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;State Manager, a capability of AWS Systems Manager, sets and maintains the desired state configuration for managed nodes and AWS resources within your AWS account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In a hybrid environment(AWS + on prem), you must create an IAM role for those resources to communicate with the Systems Manager service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS Systems Manager Automation offers one-click automation for simplifying complex tasks such as creating golden Amazon Machines Images (AMIs) and recovering unreachable EC2 instances.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;AWSSupport-ExecuteEC2Rescue&lt;/code&gt; document is designed to perform a combination of Systems Manager actions, AWS CloudFormation actions, and Lambda functions that automate the steps normally required to use EC2Rescue&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;systems-manager-parameter-store&quot;&gt;Systems Manager Parameter Store&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Secure, hierarchical storage for configuration data management and secrets management.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can store values as plain text or encrypted data.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-opsworks&quot;&gt;AWS OpsWorks&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The stack is the top-level AWS OpsWorks Stacks entity. It represents a set of instances that you want to manage collectively, typically because they have a common purpose such as serving PHP applications.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Every stack contains one or more layers, each of which represents a stack component, such as a load balancer or a set of application servers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On Linux-based instances in Chef 11.10 or older stacks, run the Update Dependencies stack command.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;infrastructure-as-code&quot;&gt;Infrastructure as Code&lt;/h2&gt;
&lt;h3 id=&quot;cloudformation&quot;&gt;CloudFormation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Model a collection of related AWS and third-party resources, provision them quickly and consistently, and manage them throughout their lifecycles, by treating infrastructure as code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Template describes your desired resources and their dependencies so you can launch and configure them together as a stack.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Offers extensibility with CloudFormation Registry to provisiong 3rd party resources(e.g. monitoring from partners).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudFormation StackSets let you provision a common set of AWS resources across multiple accounts and regions, with a single CloudFormation template.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports JSON or YAML.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automates provisioning and updating your infrastructure in a safe and controlled manner. You can use Rollback Triggers to specify the CloudWatch alarms that CloudFormation should monitor during the stack creation and update process. If any of the alarms are triggered, CloudFormation rolls back the entire stack operation to a previously deployed state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using ChangeSets, you can preview the proposed changes that CloudFormation intends to make.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using Drift Detection, you can keep track of changes to resources outside CloudFormation, making sure you always have the most up-to-date picture of your infrastructure.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatically manages dependencies between your resources during stack management actions. You don’t need to worry about specifying the order in which resources are created, updated, or deleted; CloudFormation determines the correct sequence of actions to take for each resource when performing stack operations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Provides a set of application bootstrapping scripts that enable you to install packages, files, and services.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can be used with Chef and Puppet, Terraform.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, the “automatic rollback on error” feature is enabled.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;WaitCondition to wait for your app to start, blocking the creation of other resources.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Intrinsic functions can only be used in specific parts of a template: properties, output, metadata, and update policy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With the DeletionPolicy attribute you can preserve, and in some cases, backup a resource when its stack is deleted.To keep a resource when its stack is deleted, specify Retain, You can use retain for any resource. For Snapshot, CloudFormation creates a snapshot of the resource before deleting it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dynamic references provide a compact, powerful way for you to specify external values that are stored and managed in other services, such as the Systems Manager Parameter Store, in your stack templates. Retrieves the value of the specified reference when necessary during stack and change set operations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate policy.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-cdk&quot;&gt;AWS CDK&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It’s an open-source software development framework for defining cloud infrastructure as code with modern programming languages and deploying it through AWS CloudFormation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When AWS CDK applications are run, they compile down to fully formed CloudFormation JSON/YAML templates that are then submitted to the CloudFormation service for provisioning.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;website-and-web-app-development&quot;&gt;Website and Web App Development&lt;/h2&gt;
&lt;h3 id=&quot;elastic-beanstalk&quot;&gt;Elastic Beanstalk&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To enable managed platform updates configure the update level and the weekly update period.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Blue/Green: CodePipeline, CodeDeploy to blue, CodeBuild to test the code in blue env, use lambda after testing to swap URLs between blue/green.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Immutable deployments perform an immutable update to launch a full set of new instances running the new version of the application in a separate Auto Scaling group alongside the instances running the old version. Immutable deployments can prevent issues caused by partially completed rolling deployments. If the new instances don’t pass health checks, Elastic Beanstalk terminates them, leaving the original instances untouched.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;iot&quot;&gt;IoT&lt;/h2&gt;
&lt;h3 id=&quot;iot-greengrass&quot;&gt;IoT Greengrass&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Open-source edge runtime and cloud service for building, deploying, and managing device software.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Makes it easy to bring intelligence to edge devices. Collect, aggregate, filter, and send data locally. Manage and control what data goes to the cloud for optimized analytics and storage.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;iot-core&quot;&gt;IoT Core&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Central point of ingress for IoT data. Securely transmit messages to and from all of your IoT devices and applications with low latency and high throughput.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connect billions of IoT devices and route trillions of messages to AWS services without managing infrastructure.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;iot-device-management&quot;&gt;IoT Device Management&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Register, organize, monitor, and remotely manage IoT devices at scale.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;iot-sitewise&quot;&gt;IoT SiteWise&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Collect, organize, and analyze industrial equipment data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;iot-twinmaker&quot;&gt;IoT TwinMaker&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Create digital twins of real-world systems such as buildings, factories, industrial equipment, and production lines.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;other-services&quot;&gt;Other Services&lt;/h2&gt;
&lt;h3 id=&quot;amazon-cloudsearch&quot;&gt;Amazon CloudSearch&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Managed solutions for search functionality of website or app.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Index and search both structured data and plain text.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Different types of searches(boolean, range, full text).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;amazon-workspaces&quot;&gt;Amazon WorkSpaces&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Provision virtual, cloud-based Microsoft Windows or Amazon Linux desktops for your users&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon WorkSpaces Application Manager (Amazon WAM) offers a fast, flexible, and secure way for you to deploy and manage applications for Amazon WorkSpaces with Windows. software deployment, updates, patching, and retirement.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>aws</category><category>certifications</category></item><item><title>Building the DevOps Pipeline - Key Concepts &amp; Stages</title><link>https://devopsmadness.com/blog/devops-pipeline</link><guid isPermaLink="true">https://devopsmadness.com/blog/devops-pipeline</guid><description>The anatomy of a DevOps pipeline: core concepts, stages from commit to production, and the principles that separate working pipelines from fragile ones.</description><pubDate>Tue, 16 May 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; This piece pins down the stages between a commit and
production and what each exists to catch. Every stage is a filter with a
purpose, and stages nobody can explain are debt with a green checkmark.
Order checks by cost, and treat the pipeline as production code: version
it, review it, test it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers building their first serious pipeline,
and teams whose existing one grew by accretion.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/devops-pipeline&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>platform-engineering</category></item><item><title>How to Create Ansible Template [Examples]</title><link>https://devopsmadness.com/blog/ansible-template</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-template</guid><description>Jinja2 templating in Ansible: how the template module works, the syntax worth knowing, and a demo generating real config files in a playbook.</description><pubDate>Thu, 06 Apr 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Config files differ per host, and templates close the gap:
one Jinja2 file, variables filled at run time. The template module is copy
with a rendering step, and loops and conditionals handle the awkward cases
like optional blocks and per-host sections. Validate rendered output where
the module supports it, so a bad template fails before it lands.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; Ansible users still maintaining one config file
per environment, and anyone new to Jinja2.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-template&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>devops-tooling</category></item><item><title>How to Build on AWS with CDK for Terraform (CDKTF)</title><link>https://devopsmadness.com/blog/terraform-cdk</link><guid isPermaLink="true">https://devopsmadness.com/blog/terraform-cdk</guid><description>CDK for Terraform in practice: when writing infrastructure in a programming language pays off, the architecture, and a working AWS deployment demo.</description><pubDate>Fri, 03 Mar 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; CDKTF puts a general-purpose language on top of the
Terraform ecosystem, synthesizing to Terraform so providers, state and the
plan model carry over unchanged. The sweet spot is programmatic
generation: many similar resources, conditional structures, code shared
with an application team. For simple estates HCL stays easier to read and
review, so adopt CDKTF for a reason.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; developer-heavy teams considering infrastructure
in a real language, and Terraform users curious what CDKTF changes.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/terraform-cdk&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>terraform</category><category>iac</category><category>aws</category></item><item><title>Ansible Vault: How to Securely Encrypt Sensitive Data</title><link>https://devopsmadness.com/blog/ansible-vault</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-vault</guid><description>Ansible Vault end to end: encrypting files and strings, password management options, using encrypted content in playbooks and rotation habits.</description><pubDate>Wed, 25 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Secrets end up in playbooks, repositories leak, and Vault is
the built-in answer. Encrypt at the variable level with encrypt_string
where you can, since whole encrypted files hide diffs, and map vault IDs
to environments. Vault protects data at rest only, so combine it with
no_log to keep values out of run output.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; any team with credentials in their Ansible tree,
especially ones about to make that tree public.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-vault&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>security</category><category>devops-tooling</category></item><item><title>Working with Ansible Inventory - Basics and Examples</title><link>https://devopsmadness.com/blog/ansible-inventory</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-inventory</guid><description>Ansible inventory beyond one flat file: groups and variables, multiple sources, dynamic inventories and the layouts that scale with a fleet.</description><pubDate>Thu, 01 Dec 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Inventory decides what Ansible touches, which makes it the
highest-stakes file nobody thinks about. Model environments and tiers as
groups, keep variables in group_vars and host_vars next to the hosts they
describe, and playbooks stay generic. Dynamic inventory is mandatory once
hosts are elastic, since static files cannot chase autoscaling.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; Ansible users graduating from a single hosts file,
and anyone who has run a playbook against the wrong environment.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-inventory&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>devops-tooling</category></item><item><title>Terraform with GitHub Actions: How to Manage &amp; Scale</title><link>https://devopsmadness.com/blog/github-actions-terraform</link><guid isPermaLink="true">https://devopsmadness.com/blog/github-actions-terraform</guid><description>Running Terraform through GitHub Actions: a working pipeline example, troubleshooting notes, and the practices that keep it safe as usage grows.</description><pubDate>Thu, 10 Nov 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; GitHub Actions is the default answer when a
team already lives on GitHub and wants Terraform automated quickly,
with the runner, the secrets store and the review flow already in
place.
The article walks through a complete workflow, from checkout and
a pinned Terraform version to the conditional plan and apply steps, so
you can copy something that runs instead of assembling it from
fragments. The runs trigger on pull requests and pushes to main,
scoped to the Terraform directory, so unrelated changes never start
one. It also stays honest about where the DIY approach stops and a
&lt;a href=&quot;/blog/terraform-automation&quot;&gt;dedicated automation platform&lt;/a&gt; starts to
make sense.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The core loop is plan on pull request and apply on merge to main,
with fmt and validate as gates in between and the plan posted to
the PR as a comment so reviewers see what will be created, changed
or destroyed without leaving GitHub.&lt;/li&gt;
&lt;li&gt;Keep state in a remote backend with locking, never on the runner
filesystem, and swap static repository secrets for OIDC federation
and short-lived cloud credentials before any of this touches
production. The example uses S3 with DynamoDB locking for exactly
this reason, and security scanners like tfsec and Checkov slot into
the same pipeline.&lt;/li&gt;
&lt;li&gt;Scaling is where the maintenance cost shows up. Drift detection,
policy guardrails, RBAC, runner hardening and coordination across
environments remain your homework, and the article pairs that
warning with practical troubleshooting tips like debug mode,
pinning action versions to commit SHAs and trimming the workflow
down until a failure isolates itself.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Self-building IaC pipelines are doable for small
projects, but almost always fail at scale from experience. If you are working
at an enteprise scale or at a scaleup, consider managed IaC orchestration
solutions&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; GitHub-native teams automating Terraform, and
anyone comparing DIY pipelines with managed platforms. The workflow
pattern transfers almost unchanged if you also
&lt;a href=&quot;/blog/github-actions-ansible&quot;&gt;run Ansible playbooks from Actions&lt;/a&gt;,
and the checks it automates come straight from the standard
&lt;a href=&quot;/blog/terraform-best-practices&quot;&gt;Terraform best practices&lt;/a&gt; list.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/github-actions-terraform&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>terraform</category><category>devops-tooling</category></item><item><title>45 Best DevOps Books for Engineers to Read in 2026</title><link>https://devopsmadness.com/blog/devops-books</link><guid isPermaLink="true">https://devopsmadness.com/blog/devops-books</guid><description>A curated shelf for infrastructure people: DevOps, SRE, architecture, security and programming books organized by area, with notes on each pick.</description><pubDate>Fri, 28 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Forty-five titles across DevOps, SRE, architecture, security
and programming, organized so you can pick by the gap you want to close.
The classics earn their reputation: Accelerate for the evidence, the
Phoenix Project for the narrative, the SRE book for operations at scale.
Reading one book properly beats owning ten.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers building a learning path, and leads
assembling a team reading list.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/devops-books&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>opinion</category></item><item><title>50+ Ansible Best Practices to Follow [Tips &amp; Tricks]</title><link>https://devopsmadness.com/blog/ansible-best-practices</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-best-practices</guid><description>A long, organized list of Ansible practices covering project structure, playbooks, variables, modules, roles, execution and security habits.</description><pubDate>Mon, 26 Sep 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Ansible is forgiving, which is how playbook estates turn
into archaeology. This is the reference list I still point people at:
fifty-plus practices from repository layout to secrets handling, with
consistent project structure as the highest-leverage habit. Treat it as a
menu, adopt what fits, and write your choices down so reviews have a
reference.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; every team running Ansible in anger, and new
joiners who need the house rules explained.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-best-practices&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>iac</category><category>devops-tooling</category></item><item><title>Atlantis vs. Terraform Cloud / Terraform Enterprise - Comparison</title><link>https://devopsmadness.com/blog/atlantis-terraform</link><guid isPermaLink="true">https://devopsmadness.com/blog/atlantis-terraform</guid><description>Atlantis against Terraform Cloud and Enterprise: what the open-source PR workflow covers, what the platforms add, and how to choose between them.</description><pubDate>Tue, 06 Sep 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; Atlantis does PR plan and apply well, and
little else: you host it, secure it and extend it. Terraform Cloud and other
managed solutions in the space, such as Spacelift,
add managed state, policy, drift detection and a UI.
Most teams hit this exact choice right after
outgrowing a &lt;a href=&quot;/blog/github-actions-terraform&quot;&gt;hand-rolled pipeline&lt;/a&gt;,
and this comparison lays the two options side by side instead of
selling one answer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Atlantis keeps the whole workflow in the pull request: plan runs
when the PR opens, apply runs on a comment, and operators never
need a separate UI or extra credentials. It stays lightweight and
extensible, with Terragrunt, tfsec and Infracost slotting in
through custom workflows. The cost is self-hosting, no built-in
drift detection and manual work for high availability.&lt;/li&gt;
&lt;li&gt;Terraform Cloud brings the enterprise platform features: managed state with
locking, RBAC, SSO and audit logging, Sentinel policies, cost
estimation and native drift detection, delivered as SaaS so nobody
on your team has to operate it. Terraform Enterprise is the
self-hosted variant for teams that need it inside their own
network.&lt;/li&gt;
&lt;li&gt;The decision is mostly about operational appetite, run a tool or
buy a platform. Atlantis stays flexible and free for teams
comfortable running their own infrastructure; the platform trades
money for governance and reduced upkeep. The comparison table runs
deployment model, state, UI, extensibility and high availability
line by line, which makes the operational trade concrete.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Terraform Cloud has been one of the first players in the space, but it’s not the most feature-rich platform anymore. Atlantis is great for small projects, but missing features and scaling challenges might cause headaches.&lt;/p&gt;
&lt;p&gt;If you’re choosing between Atlantis and Terraform Cloud, why not give a chance to Spacelift, the infrastructure orchestration platform built for the AI-accelerated software era?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams choosing their first
&lt;a href=&quot;/blog/terraform-automation&quot;&gt;Terraform automation layer&lt;/a&gt;, and Atlantis
operators wondering what they are missing as their estate grows. The
article closes with Spacelift as an option that pairs a Git-driven
workflow with managed platform features, and whichever way you go,
make sure the tool you pick can enforce the
&lt;a href=&quot;/blog/terraform-best-practices&quot;&gt;Terraform practices&lt;/a&gt; your reviews
already argue about.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/atlantis-terraform&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>terraform</category><category>devops-tooling</category></item><item><title>How to Automate Terraform Deployments and Infrastructure</title><link>https://devopsmadness.com/blog/terraform-automation</link><guid isPermaLink="true">https://devopsmadness.com/blog/terraform-automation</guid><description>Three routes for automating Terraform beyond laptop applies: general CI/CD, purpose-built platforms, and scripting, with the trade-offs of each.</description><pubDate>Tue, 30 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Laptop applies stop scaling the day a second person touches
the code, and the loop worth automating is plan on pull request, review,
apply on merge. General CI/CD works but leaves state, credentials and plan
review as your problem. Purpose-built platforms trade some control for
guardrails and visibility that pipelines lack out of the box.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams still applying from laptops, and anyone
choosing between building and buying their Terraform pipeline.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/terraform-automation&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>terraform</category><category>iac</category><category>devops-tooling</category></item><item><title>Terraform vs. Kubernetes: Key Differences and Comparison</title><link>https://devopsmadness.com/blog/terraform-vs-kubernetes</link><guid isPermaLink="true">https://devopsmadness.com/blog/terraform-vs-kubernetes</guid><description>Two tools people keep comparing that solve different problems: provisioning versus orchestration, where they overlap, and how they work together.</description><pubDate>Thu, 18 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Terraform provisions infrastructure, Kubernetes orchestrates
workloads on top of it, and the interesting part is the boundary between
them. The strongest pattern uses Terraform to create clusters and
Kubernetes to run what lives inside them. Operators blur that line, so
decide deliberately which tool owns what.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers sorting out responsibilities in a stack
that uses both, and anyone asked this question in an interview.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/terraform-vs-kubernetes&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>terraform</category><category>kubernetes</category></item><item><title>Ansible Modules - How To Use Them Efficiently (Examples)</title><link>https://devopsmadness.com/blog/ansible-modules</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-modules</guid><description>How Ansible modules actually work: the common ones worth memorizing, usage patterns, building custom modules and the best practices around them.</description><pubDate>Tue, 26 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Modules are the unit of work in Ansible, and fluency with a
dozen of them covers most days: copy, template, service, package managers,
command and shell. Prefer purpose-built modules over shell whenever one
exists, because that is where idempotency comes from. When the ecosystem
falls short, custom modules are approachable Python.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; Ansible users building their vocabulary, and
anyone maintaining playbooks full of shell tasks that deserve better.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-modules&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>devops-tooling</category></item><item><title>16 DevOps Best Practices Every Developer Should Know</title><link>https://devopsmadness.com/blog/devops-best-practices</link><guid isPermaLink="true">https://devopsmadness.com/blog/devops-best-practices</guid><description>A grounded tour of DevOps practices and the anti-patterns that undo them, from CI/CD and IaC to blameless culture and sensible on-call habits.</description><pubDate>Thu, 23 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Best practice lists age badly when they chase tools, so this
one stuck to practices: small reversible changes as the core mechanic,
IaC and CI/CD as the automation floor, shared ownership and observability
around them. The anti-patterns section earns the read on its own: a DevOps
team as a silo, tools as culture substitutes, dashboards nobody reads.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; developers stepping into operational
responsibility, and teams auditing their habits against a checklist.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/devops-best-practices&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>devops-tooling</category><category>platform-engineering</category></item><item><title>AWS IAM Policies: Creating an IAM Policy &amp; Best Practices</title><link>https://devopsmadness.com/blog/iam-policy</link><guid isPermaLink="true">https://devopsmadness.com/blog/iam-policy</guid><description>IAM policies from the ground up: policy types, document structure, creating and validating policies, versioning and the practices that avoid pain.</description><pubDate>Wed, 15 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Everything in AWS passes through IAM evaluation, and policy
JSON is where security intentions become real. The guide covers how the
policy types combine (identity, resource, permissions boundaries, SCPs)
and the tooling that catches mistakes before production does. Least
privilege is iterative: start narrow, widen from access denied errors,
version every change.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; anyone writing IAM JSON by hand, and engineers who
inherited policies with stars in places stars should not be.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/iam-policy&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>aws</category><category>security</category></item><item><title>Ansible Roles: Basics, Creating &amp; Using</title><link>https://devopsmadness.com/blog/ansible-roles</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-roles</guid><description>Ansible roles from structure to sharing: why they exist, the directory anatomy, creating and using them, and how collections fit the picture.</description><pubDate>Wed, 08 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Roles are how Ansible code stops being copy-paste: tasks,
variables, templates and handlers packaged into reusable units with a
conventional layout. The directory convention is the feature, since anyone
who knows roles can navigate yours. Place defaults versus vars
deliberately, and share new work through collections.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; playbook authors repeating themselves across
projects, and teams formalizing shared automation.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-roles&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>devops-tooling</category></item><item><title>21 Terraform Best Practices to Improve your TF workflow</title><link>https://devopsmadness.com/blog/terraform-best-practices</link><guid isPermaLink="true">https://devopsmadness.com/blog/terraform-best-practices</guid><description>The Terraform habits that keep estates workable: remote state with locking, module reuse, project structure and the practices that prevent rework.</description><pubDate>Fri, 13 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Why this matters now:&lt;/strong&gt; Terraform gives you multiple options and freedom, and this list collects the habits that keep
repositories workable as teams grow. Spacelift keeps the article
current, so it now runs from remote state basics through testing,
policy as code and project structure to using AI assistants on
Terraform code without handing them your secrets. Most of these habits
only stick once a pipeline enforces them, whether that is
&lt;a href=&quot;/blog/github-actions-terraform&quot;&gt;Terraform in GitHub Actions&lt;/a&gt; or a
&lt;a href=&quot;/blog/terraform-automation&quot;&gt;fuller automation setup&lt;/a&gt; around plan and
apply.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Remote state with locking is the minimum setup. Put state in a versioned
backend, treat it as immutable, never edit it by hand, and keep
secrets in an external manager like Vault or AWS Secrets Manager
instead of version control. Mark sensitive variables as sensitive
and catch bad inputs early with validation blocks.&lt;/li&gt;
&lt;li&gt;Structure decisions compound. Small, reusable modules with pinned
versions age better than one repository that does everything, and
community modules from the registry beat hand-rolling your own for
infrastructure that hundreds of teams have already built. Pin your
providers and Terraform version too, so upgrades are deliberate.&lt;/li&gt;
&lt;li&gt;Enforcement beats convention. Run fmt, validate, tflint and static
analysis like Checkov automatically in CI or pre-commit hooks, then
add OPA policies on top so the rules hold without a reviewer
catching every miss. Bring in Terratest once modules stabilize and
plan output stops being enough.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What I’d add today:&lt;/strong&gt; Since this blog was written, OpenTofu is out and
gaining a lot of traction. There are many commonalities, but the two
solutions have started to converge already. If I would start today, I would
go for OpenTofu.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; anyone writing Terraform beyond a sandbox, teams
inheriting an estate that grew without rules, and reviewers who want a
shared reference to point at instead of arguing style in every pull
request. Once the list settles the style debates, the next question is
which tool enforces it, and the
&lt;a href=&quot;/blog/atlantis-terraform&quot;&gt;Atlantis comparison&lt;/a&gt; is a fair place to
start.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/terraform-best-practices&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>terraform</category><category>iac</category></item><item><title>Terraform Output Values: Complete Guide &amp; Examples</title><link>https://devopsmadness.com/blog/terraform-output</link><guid isPermaLink="true">https://devopsmadness.com/blog/terraform-output</guid><description>Terraform outputs from basics to real use: declaring them, chaining them between configurations, sensitive values and the output command flags.</description><pubDate>Thu, 28 Apr 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Outputs look trivial until they become the interface between
your configurations. Treat them as a module’s public API and chain them
through remote state reads to keep split configurations decoupled. Mark
secrets as sensitive, and remember sensitive only affects display; the
value still lives in state.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; Terraform users past their first module, and teams
splitting a monolithic configuration into pieces.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/terraform-output&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>terraform</category><category>iac</category></item><item><title>Ansible Variables: How to Use Different Types of Ansible Variables</title><link>https://devopsmadness.com/blog/ansible-variables</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-variables</guid><description>The full Ansible variable story: types, naming, lists and dicts, registered results, special variables and the precedence order that explains bugs.</description><pubDate>Mon, 11 Apr 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Variables are where Ansible surprises people, with
twenty-plus precedence levels. The guide maps the variable types and where
each comes from, turning mysterious overrides into explainable behavior.
In practice a handful of precedence levels cover most cases, registered
variables turn task output into logic, and group_vars in predictable
places beat inline cleverness.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; anyone who has spent an afternoon discovering why
a variable had the wrong value, which is every Ansible user eventually.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-variables&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>devops-tooling</category></item><item><title>Ansible Playbooks: Complete Guide with Examples</title><link>https://devopsmadness.com/blog/working-with-ansible-playbooks</link><guid isPermaLink="true">https://devopsmadness.com/blog/working-with-ansible-playbooks</guid><description>My Spacelift guide to Ansible playbooks: structure, variables, Vault for secrets, handlers, conditionals and loops, each with a runnable example.</description><pubDate>Mon, 28 Mar 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Playbooks are where Ansible work actually happens and where
most of the sharp edges live. The guide walks variables, Vault, handlers,
conditionals and loops with a runnable example for each. Learn variable
precedence once, pair Vault with no_log to keep secrets out of console
output, and treat shell scripts inside playbooks as a smell.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; anyone past the hello-world stage with Ansible who
wants their playbooks maintainable by someone other than the author.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-playbooks&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>iac</category><category>devops-tooling</category></item><item><title>Ansible Tutorial for Beginners: Playbook &amp; Examples</title><link>https://devopsmadness.com/blog/ansible-tutorial-for-beginners</link><guid isPermaLink="true">https://devopsmadness.com/blog/ansible-tutorial-for-beginners</guid><description>The Ansible starting point I wrote for Spacelift: concepts, installation, inventory, ad hoc commands and a first playbook, with a working demo setup.</description><pubDate>Tue, 22 Feb 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Ansible is still the tool many teams reach for first when
they start automating, and this intro builds a real demo environment with
two managed hosts so every command has something to run against. The core
concepts fit in one sitting: inventory, modules, ad hoc commands, then
playbooks. Build the idempotency habit early; rerunning a playbook should
change nothing on an already-correct host.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers new to Ansible, and anyone who wants a
refresher that comes with a reproducible lab instead of slides.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://spacelift.io/blog/ansible-tutorial&quot;&gt;Read the full article on Spacelift →&lt;/a&gt;&lt;/p&gt;</content:encoded><category>ansible</category><category>iac</category><category>devops-tooling</category></item><item><title>Architecting for sustainability on AWS</title><link>https://devopsmadness.com/blog/architecting-for-sustainability-on-aws</link><guid isPermaLink="true">https://devopsmadness.com/blog/architecting-for-sustainability-on-aws</guid><description>Improve the cloud architecture of workloads on AWS by leveraging the best practices of the new Sustainability Pillar</description><pubDate>Sun, 13 Feb 2022 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;If you are working with AWS chances are that you are already operating with the &lt;a href=&quot;https://aws.amazon.com/architecture/well-architected/&quot;&gt;AWS Well-Architected Framework&lt;/a&gt; in mind. If not, I urge you to read it as it addresses best practices and design patterns around 5 pillars; &lt;code&gt;Operational Excellence, Performance, Security, Reliability, Cost Optimization&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Late in 2021, AWS added a new pillar to the Well-Architected Framework, &lt;code&gt;the Sustainability pillar&lt;/code&gt;. In this article, we’ll have a look at this new aspect of the framework, try to understand where exactly it applies and discover some architectural practices that will help us to achieve sustainability for our cloud workloads.&lt;/p&gt;
&lt;h2 id=&quot;aws-sustainability-pillar&quot;&gt;AWS Sustainability Pillar&lt;/h2&gt;
&lt;p&gt;By introducing Sustainability as its new Pillar of the Well-Architected Framework, &lt;code&gt;AWS shows its commitment to environmental sustainability&lt;/code&gt;. For the past years, AWS’s main focus was digital transformation and bringing more and more customers to the cloud.&lt;/p&gt;
&lt;p&gt;As times are changing though, AWS commits to clean up and decarbonize its operations and offerings. They reportedly are using more renewable energy to power data centers and building new data centers with low-carbon materials among other initiatives.&lt;/p&gt;
&lt;p&gt;As data is core to addressing problems nowadays the same applies to the climate crisis. AWS has two programs that are facilitating the usage of data for this cause.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;Open Data Program&lt;/code&gt; allows anyone to host for free any type of useful large dataset and share it with the world and the &lt;code&gt;Amazon Sustainability Data Initiative&lt;/code&gt; helps reduce cost, time, and technical barriers associated with large datasets around sustainability.&lt;/p&gt;
&lt;p&gt;AWS claims that customers can potentially &lt;a href=&quot;https://d39w7f4ix9f5s9.cloudfront.net/d1/80/283b833847df8ee4fe9661e0dd8f/11061-aws-451research-advisory-bw-cloudefficiency-eu-2021-r2-final-2.pdf&quot;&gt;reduce their energy usage by 80%&lt;/a&gt; compared to on-premises workloads and they are targeting to power 100% of AWS operations with renewable energy by 2025.&lt;/p&gt;
&lt;p&gt;As with the Shared Responsibility model, environmental sustainability is a shared responsibility between AWS and its customers.&lt;/p&gt;
&lt;p&gt;Anyone running workloads on the cloud is also responsible for their footprint but also bears the responsibility to put the continuous effort in optimizing them primarily on energy reduction and efficiency.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_sustainability/sustainability_in_the_cloud.png&quot; alt=&quot;AWS shared responsibility model for sustainability: customers own sustainability in the cloud (data design, application design, deployments, storage, code efficiency, utilization) while AWS owns sustainability of the cloud (servers, cooling, water, waste, data centers, electricity, building materials)&quot;/&gt;&lt;/p&gt;
&lt;p&gt;In practice, this new pillar is a tool that shows us the path towards a more sustainable future by highlighting best practices, design principles, and patterns but also helps us understand better our workloads and take ownership of their environmental impact.&lt;/p&gt;
&lt;p&gt;Our responsibility as customers lies in making informed architectural decisions, selecting the right services and products while having efficiency and sustainability in mind.&lt;/p&gt;
&lt;h2 id=&quot;sustainability-design-principles&quot;&gt;Sustainability Design Principles&lt;/h2&gt;
&lt;p&gt;Follow these principles when designing workloads and applications on AWS to maximize sustainability while minimizing environmental impact.&lt;/p&gt;
&lt;h3 id=&quot;understand-your-impact&quot;&gt;Understand your impact&lt;/h3&gt;
&lt;p&gt;The first step is to get a better understanding of your workloads and impact. Try to create a model of your current and future impact and measure it. Gather all sources of impact and measure the resources needed and the emissions required per unit of work. Establish some metrics and KPIs to follow in order to be able to track improvements over time&lt;/p&gt;
&lt;h3 id=&quot;establish-sustainability-goals&quot;&gt;Establish sustainability goals&lt;/h3&gt;
&lt;p&gt;Set reachable sustainability goals such as reducing cloud resources and support owners to invest in these goals. Plan and architect your workloads with these goals in mind to achieve reduced impact intensity based on our decisions.&lt;/p&gt;
&lt;h3 id=&quot;maximize-utilization&quot;&gt;Maximize utilization&lt;/h3&gt;
&lt;p&gt;Utilize your resources wisely and strive to right-size workloads, use elasticity principles whenever possible and implement efficient designs to maximize the underlying energy used by your workloads. Detect and eliminate underused or idle resources and storage.&lt;/p&gt;
&lt;h3 id=&quot;anticipate-and-adopt-new-more-efficient-hardware-and-software-offerings&quot;&gt;Anticipate and adopt new, more efficient hardware and software offerings&lt;/h3&gt;
&lt;p&gt;Stay informed of new offerings and releases, monitor and evaluate new and more efficient product offerings across the whole cloud ecosystem, and design for flexibility to allow changes whenever necessary.&lt;/p&gt;
&lt;h3 id=&quot;use-managed-services&quot;&gt;Use managed services&lt;/h3&gt;
&lt;p&gt;AWS commits to optimize the resource usage of its managed services so opt for them whenever possible to minimize your impact.&lt;/p&gt;
&lt;h3 id=&quot;reduce-the-downstream-impact-of-your-cloud-workloads&quot;&gt;Reduce the downstream impact of your cloud workloads&lt;/h3&gt;
&lt;p&gt;Work with customers and test your services to understand how they use your products and what is the actual impact of this usage. Reduce the amount of energy required to use your products and services.&lt;/p&gt;
&lt;h2 id=&quot;improvement-process-for-sustainability&quot;&gt;Improvement Process for sustainability&lt;/h2&gt;
&lt;p&gt;Of course, all these improvements can’t be achieved from one day to another. To accomplish these goals you have to continually put effort into your architectural decisions, learn from the process, and repeat the cycle.&lt;/p&gt;
&lt;h3 id=&quot;identify-targets-for-improvement&quot;&gt;Identify targets for improvement&lt;/h3&gt;
&lt;p&gt;Review all your workloads and figure out areas of improvement, low-utilized resources, and bad practices to define your targets.&lt;/p&gt;
&lt;h3 id=&quot;evaluate-specific-improvements&quot;&gt;Evaluate specific improvements&lt;/h3&gt;
&lt;p&gt;Evaluate possible changes and the outcomes, risk, and cost that these could bring.&lt;/p&gt;
&lt;h3 id=&quot;prioritize-and-plan-improvements&quot;&gt;Prioritize and plan improvements&lt;/h3&gt;
&lt;p&gt;Based on the evaluation prioritize accordingly the changes that offer the largest improvement potential and plan for them.&lt;/p&gt;
&lt;h3 id=&quot;test-and-validate-improvements&quot;&gt;Test and validate improvements&lt;/h3&gt;
&lt;p&gt;To test your hypothesis and evaluation implement the changes to development environments first in order to validate them before moving forward.&lt;/p&gt;
&lt;h3 id=&quot;deploy-changes-to-production&quot;&gt;Deploy changes to production&lt;/h3&gt;
&lt;p&gt;After you have validated the changes, deploy them to production environments across your workloads.&lt;/p&gt;
&lt;h3 id=&quot;measure-results-and-replicate-successes&quot;&gt;Measure results and replicate successes&lt;/h3&gt;
&lt;p&gt;The cycle doesn’t end with the deployment to production but continues by measuring the impact, reverting changes that failed, and trying to replicate successful outcomes to other areas and environments.&lt;/p&gt;
&lt;h2 id=&quot;make-sustainability-a-non-functional-requirement&quot;&gt;Make sustainability a non-functional requirement&lt;/h2&gt;
&lt;p&gt;A byproduct of sustainability as a non-functional business requirement is that your solutions become more cost-effective and efficient. AWS follows a &lt;code&gt;pay only for what you use&lt;/code&gt; model so there is also an extra incentive on utilizing fewer resources and getting more value out of them.&lt;/p&gt;
&lt;p&gt;At times, reaching sustainability objectives might require trade-offs in other aspects of the system so experiment continually with sustainability improvements that fit your functional requirements.&lt;/p&gt;
&lt;h2 id=&quot;best-practices-for-sustainability-in-the-cloud&quot;&gt;Best practices for sustainability in the cloud&lt;/h2&gt;
&lt;p&gt;Optimize your region selection and workload placement, your software, data, hardware, and other processes to increase energy efficiency. Employ best practices across all these areas and aspects of your cloud usage.&lt;/p&gt;
&lt;h3 id=&quot;region-selection&quot;&gt;Region selection&lt;/h3&gt;
&lt;p&gt;Choose AWS Regions near Amazon renewable energy projects and Regions where the grid has a published carbon intensity that is lower than other locations.&lt;/p&gt;
&lt;h3 id=&quot;user-behavior-patterns&quot;&gt;User behavior patterns&lt;/h3&gt;
&lt;p&gt;Understand the way users consume and use your workloads to identify improvement in terms of sustainability. Scale your infrastructure according to usage, negotiate impact-friendly SLAs with your customers, eliminate maintenance of unused assets, optimize geographic placement of resources.&lt;/p&gt;
&lt;h3 id=&quot;software-and-architecture-patterns&quot;&gt;Software and architecture patterns&lt;/h3&gt;
&lt;p&gt;Use patterns for consistent high-utilization of resources but also revise them often to consolidate under-utilized components over time. Decommission unneeded components and strive to optimize the performance of your applications. Apply sustainable data access and storage patterns and optimize areas of code that consume the most time or resources.&lt;/p&gt;
&lt;h3 id=&quot;data-patterns&quot;&gt;Data patterns&lt;/h3&gt;
&lt;p&gt;Curate your overall data management practices and governance to reduce the storage and data transfer required for your applications and products. Leverage lifecycle policies to transition data to less performant data when it’s acceptable and remove unused data.&lt;/p&gt;
&lt;h3 id=&quot;hardware-patterns&quot;&gt;Hardware patterns&lt;/h3&gt;
&lt;p&gt;Continually look for chances to use more efficient hardware and minimize the number of resources needed for your applications. Try to use the most efficient instance type compatible with your workload(e.g. &lt;a href=&quot;https://aws.amazon.com/ec2/graviton/&quot;&gt;AWS Graviton processor&lt;/a&gt;) and use burstable instances to support workloads with infrequent requirements.&lt;/p&gt;
&lt;h3 id=&quot;development-and-deployment-process&quot;&gt;Development and Deployment process&lt;/h3&gt;
&lt;p&gt;Create a culture of experimentation around sustainability objectives and test them before deploying to production. Keep your systems up-to-date to gain performance efficiencies. Use automation to manage the lifecycle of dev and test environments and shut them down when they aren’t used.&lt;/p&gt;
&lt;p&gt;For more details check the &lt;a href=&quot;https://docs.aws.amazon.com/wellarchitected/latest/sustainability-pillar/sustainability-pillar.html&quot;&gt;official AWS documentation for the Sustainability Pillar&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;That’s all folks, hope you enjoyed it as much as I did. We had a look into the new AWS Sustainability Pillar of the AWS Well-Architected Framework and pinpointed different design principles and best practices that we can follow to make informed decisions towards improving the sustainability of our cloud usage.&lt;/p&gt;</content:encoded><category>aws</category><category>devops-tooling</category></item><item><title>Continuous Development for Kubernetes with Skaffold</title><link>https://devopsmadness.com/blog/continuous-development-for-kubernetes-with-skaffold</link><guid isPermaLink="true">https://devopsmadness.com/blog/continuous-development-for-kubernetes-with-skaffold</guid><description>Use Skaffold to facilitate your development flow for Kubernetes applications.</description><pubDate>Mon, 17 Jan 2022 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;Developing modern applications can be a process that involves many steps. Some of these include writing your code, testing, builds, local deployments, persisting your code in a Git repository, running CI/CD jobs, deploying to an environment.&lt;/p&gt;
&lt;p&gt;Skaffold attempts to simplify this workflow for developers by gathering all these processes in one place, allowing them to focus on writing code.&lt;/p&gt;
&lt;h2 id=&quot;why-skaffold&quot;&gt;Why Skaffold&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/skaffold_logo.png&quot; alt=&quot;Skaffold logo&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Skaffold is an open-source project from Google and has some characteristics that make it attractive for developers.&lt;/p&gt;
&lt;p&gt;It’s extremely lightweight, runs everywhere with easy-to-remember &lt;code&gt;skaffold&lt;/code&gt; commands, has a lot of features for Kubernetes-native development, and is built with optimized development in mind.&lt;/p&gt;
&lt;p&gt;Even more, it enables you to focus on your application development locally while Skaffold continuously deploys to your local or remote Kubernetes cluster.&lt;/p&gt;
&lt;p&gt;Detects changes in your source code and handles anything related to build, push, test, and deploy automatically. Can be used effectively as part of your CI/CD process as it provides the building blocks of these pipelines.&lt;/p&gt;
&lt;p&gt;Simplicity is considered a core aspect of the project as everything is defined in a single pluggable, declarative configuration for your project, the &lt;code&gt;skaffold.yaml&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;Sounds promising right? Let’s go give it a spin!&lt;/p&gt;
&lt;h2 id=&quot;simplify-your-local-development-experience-with-skaffold&quot;&gt;Simplify your local development experience with Skaffold&lt;/h2&gt;
&lt;p&gt;First things first; follow this link to &lt;a href=&quot;https://skaffold.dev/docs/install/&quot;&gt;install&lt;/a&gt; it according to your environment if you would like to follow along.&lt;/p&gt;
&lt;p&gt;To simulate a Kubernetes cluster in order to deploy our demo app I am going to use the &lt;a href=&quot;https://docs.docker.com/desktop/kubernetes/&quot;&gt;Kubernetes mode from Docker Desktop&lt;/a&gt;, which provides us a single node cluster.&lt;/p&gt;
&lt;p&gt;For the needs of this article, we’ll use a simple go web server as our demo application. You can find all the files used for the demo &lt;a href=&quot;https://github.com/Imoustak/skaffold-demo&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Our main.go file&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;package main&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;	&quot;fmt&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;	&quot;log&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;	&quot;net/http&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;func handler(w http.ResponseWriter, req *http.Request) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;	fmt.Fprintf(w, &quot;Testing Skaffold&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;func main() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;	http.HandleFunc(&quot;/&quot;, handler)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;	log.Fatal(http.ListenAndServe(&quot;:8080&quot;, nil))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Dockerfile&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;FROM golang:1.15.5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;COPY main.go .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RUN go build -o /webserver main.go&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CMD [&quot;/webserver&quot;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Kubernetes simple pod manifest&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apiVersion: v1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kind: Pod&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;metadata:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  name: webserver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  labels:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      name: webserver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;spec:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  containers:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - name: webserver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    image: moustakis/skaffold-demo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and service to expose our web app&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apiVersion: v1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kind: Service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;metadata:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  name: webserver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;spec:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  selector:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    name: webserver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ports:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - port: 8080&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    targetPort: 8080&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  type: LoadBalancer&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At this stage, since we have our source code, Dockerfile and k8s manifests we can ask skaffold to generate a simple config for us to get started. Simple run &lt;code&gt;skaffold init&lt;/code&gt; at the root of the project directory.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/skaffold_init.png&quot; alt=&quot;Terminal output of skaffold init generating skaffold.yaml with a docker build artifact and kubectl deploy manifests, then confirming the file was written&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Amazing! &lt;code&gt;skaffold.yaml&lt;/code&gt; has been created and our k8s manifests and image name were automatically filled for us.&lt;/p&gt;
&lt;p&gt;We are ready to try the continuous development flow of skaffold by running &lt;code&gt;skaffold dev&lt;/code&gt; next. During dev mode, Skaffold will watch for source file changes, and when it detects them, will rebuild &amp;amp; push your images, test built images, and redeploy the application to your cluster.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;skaffold dev&lt;/code&gt; is considered Skaffold’s main mode of operation for development, as it allows us to work continuously while iterating our application.&lt;/p&gt;
&lt;p&gt;Without any further modifications to the config file, we expect skaffold to build locally our docker image and deploy it to our local k8s cluster.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/skaffold_dev.png&quot; alt=&quot;Terminal output of skaffold dev: it tags the image, builds the Dockerfile with the local docker daemon, deploys the pod and service, waits for deployments to stabilize and watches for changes&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Super! We already see from the command output that our image was built successfully and the k8s manifests seem to have been deployed. Let’s verify.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/k8s_commands.png&quot; alt=&quot;Terminal output of kubectl get pods, svc and ep showing the webserver pod running and its LoadBalancer service on port 8080&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Time to check our web server.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/webserver_1.png&quot; alt=&quot;Browser at localhost:8080 showing the demo response Testing Skaffold&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Great success, that was extremely easy. What happens if we modify our source code and hit save?&lt;/p&gt;
&lt;p&gt;In our &lt;code&gt;main.go&lt;/code&gt; file I will change the message as shown below to test the continuous development process.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/source_code_change.png&quot; alt=&quot;Editor with main.go where the handler response line is changed to: This has been changed. Do your magic skaffold!&quot;/&gt;&lt;/p&gt;
&lt;p&gt;The moment we hit save, we notice skaffold picked up the changes and reruns the whole flow. After refreshing the browser and we have the updated message, sweet!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/webserver_2.png&quot; alt=&quot;Browser at localhost:8080 showing the updated response: This has been changed. Do your magic skaffold!&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Something to note here is that the behavior of skaffold in these cases is always predictable as the actions have certain precedence over one another.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;File sync&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Build&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deploy&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You might prefer to trigger the flow yourself. In this case, &lt;code&gt;skaffold run&lt;/code&gt; is your friend. Skaffold will perform the workflow described in skaffold.yaml exactly once.&lt;/p&gt;
&lt;p&gt;For debugging purposes try &lt;code&gt;skaffold debug&lt;/code&gt;. This mode configures specific containers for debugging in pods per the container’s runtime technology. Check &lt;a href=&quot;https://skaffold.dev/docs/workflows/debug/&quot;&gt;this page&lt;/a&gt; for more information about how the &lt;code&gt;debug mode&lt;/code&gt; works.&lt;/p&gt;
&lt;p&gt;To get an overview of all possible commands simply type &lt;code&gt;skaffold&lt;/code&gt; on your terminal.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/skaffold_commands.png&quot; alt=&quot;Terminal output of the skaffold command listing its end-to-end pipelines (run, dev, debug), building blocks (build, test, deploy, delete, render, apply), init and other commands&quot;/&gt;&lt;/p&gt;
&lt;p&gt;For detailed information around all the possible configuration options of &lt;code&gt;skaffold.yaml&lt;/code&gt; check &lt;a href=&quot;https://skaffold.dev/docs/references/yaml/&quot;&gt;this page&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;architecture-design-and-pipeline-stages&quot;&gt;Architecture Design and Pipeline Stages&lt;/h2&gt;
&lt;p&gt;The chain of actions that Skaffold performs can be shown in this picture:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/skaffold_pipeline_stages.png&quot; alt=&quot;Skaffold pipeline stages: detect source changes, build, test, tag, render manifests, deploy, then tail logs and forward ports, with file sync and cleanup on exit&quot;/&gt;&lt;/p&gt;
&lt;p&gt;A great feature of Skaffold is that it’s designed with pluggability and customizability in mind. You can modify the workflow according to your needs, skip stages, pick your favorite tools for each stage.&lt;/p&gt;
&lt;p&gt;Check this image for different combinations of tools that you can use for each stage.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/skaffold/skaffold_architecture.png&quot; alt=&quot;Skaffold architecture diagram: source changes feed artifact builds (Dockerfile, Bazel or Jib — locally, in-cluster with kaniko, or on Google Cloud Build), then testing, tagging by git commit, sha256, template or date, pushing, and deploying with kubectl, Helm or Kustomize; files needing no compilation sync directly to the pod&quot;/&gt;&lt;/p&gt;
&lt;p&gt;That’s all folks, hope you enjoyed this. We explored skaffold, a tool that facilitates continuous development and promises to make our development workflows easier.&lt;/p&gt;</content:encoded><category>kubernetes</category><category>devops-tooling</category><category>containers</category></item><item><title>Build container images with kaniko in Kubernetes</title><link>https://devopsmadness.com/blog/build-container-images-with-kaniko-in-kubernetes</link><guid isPermaLink="true">https://devopsmadness.com/blog/build-container-images-with-kaniko-in-kubernetes</guid><description>Use kaniko as an alternative to Docker for building container images in Kubernetes clusters.</description><pubDate>Wed, 20 Oct 2021 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;There are a couple of issues with using Docker to build custom images within a Kubernetes cluster.&lt;/p&gt;
&lt;p&gt;First, running Docker in a container requires open communication with the Docker daemon running in Kubernetes nodes and that is considered a bad security practice.&lt;/p&gt;
&lt;p&gt;Even more, Kubernetes will completely &lt;a href=&quot;https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/&quot;&gt;remove the support for Docker as a container runtime after v1.22&lt;/a&gt;. The container runtime of a cluster is responsible for pulling and running our container images.&lt;/p&gt;
&lt;p&gt;The problem with using Docker as our container runtime in clusters is that it isn’t compliant with the &lt;a href=&quot;https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/&quot;&gt;Cointainer Runtime Interface&lt;/a&gt; and wasn’t designed to be embedded in Kubernetes.&lt;/p&gt;
&lt;p&gt;This change, fortunately, doesn’t affect the usage of Docker images in our clusters as these images aren’t Docker-specific but OCI &lt;a href=&quot;https://opencontainers.org/&quot;&gt;Open Container Initiative&lt;/a&gt; images. That means that images created with Docker will work with all CRI implementations. All our existing images will still work exactly the same.&lt;/p&gt;
&lt;p&gt;But it will affect our ability to build Docker images with the Docker engine as this will no longer be supported in Kubernetes.&lt;/p&gt;
&lt;h2 id=&quot;kaniko-for-building-container-images&quot;&gt;kaniko for building container images&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/images/kaniko_build_docker_images/Kaniko-Logo.png&quot; alt=&quot;Kaniko logo&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/GoogleContainerTools/kaniko&quot;&gt;kaniko&lt;/a&gt; is a tool to build container images from a Dockerfile but is suitable for running inside containers and Kubernetes clusters.&lt;/p&gt;
&lt;p&gt;The difference is that Kanino doesn’t depend on the Docker daemon and runs completely in the userspace, so by using it instead, we avoid all the issues mentioned above.&lt;/p&gt;
&lt;p&gt;kaniko is meant to be run as an image: &lt;code&gt;gcr.io/kaniko-project/executor&lt;/code&gt;. The kaniko executor image is responsible for building an image from a Dockerfile and pushing it to a registry.&lt;/p&gt;
&lt;p&gt;Within the executor image, the filesystem is extracted from the base image (the FROM image in the Dockerfile). Then the commands in the Dockerfile are executed, snapshotting the filesystem in userspace after each one. After each command, a layer of changed files is appended to the base image (if there are any) and image metadata are updated.&lt;/p&gt;
&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;/h2&gt;
&lt;p&gt;Time get our hands-on and try it. We’ll need a Kubernetes cluster and a &lt;a href=&quot;https://hub.docker.com/&quot;&gt;dockerhub&lt;/a&gt; account. To simulate a Kubernetes cluster I am going to use the Kubernetes mode from Docker Desktop, which provides us a single node cluster.&lt;/p&gt;
&lt;p&gt;kaniko is using the concept of a &lt;code&gt;build context&lt;/code&gt; in order to represent the directory containing a Dockerfile which kaniko will use to build the final image. For the needs of this short demo, we’ll use &lt;a href=&quot;https://github.com/Imoustak/kaniko-build-demo&quot;&gt;this Github repo&lt;/a&gt; as our build context. Other possible supported storage solution alternatives include &lt;code&gt;GCS Bucket&lt;/code&gt;, &lt;code&gt;S3 Bucket&lt;/code&gt;, &lt;code&gt;Azure Blob Storage&lt;/code&gt;, &lt;code&gt;Local Directory&lt;/code&gt;, &lt;code&gt;Local Tar&lt;/code&gt;, &lt;code&gt;Standard Input&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When running kaniko, we are going to use the &lt;code&gt;--context&lt;/code&gt; flag with the appropriate prefix to specify the location of our build context.&lt;/p&gt;
&lt;p&gt;We also define the &lt;code&gt;--destination&lt;/code&gt; flag which defines the destination where we would like to push our newly generated Docker image. In our case that’s dockerhub.&lt;/p&gt;
&lt;p&gt;The last thing to configure is a &lt;a href=&quot;https://github.com/GoogleContainerTools/kaniko#kubernetes-secret&quot;&gt;Kubernetes Secret&lt;/a&gt; that will hold our dockerhub credentials.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;➜  kaniko export REGISTRY_SERVER=https://index.docker.io/v1/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;➜  kaniko export REGISTRY_USER=&amp;#x3C;your_dockerhub_username&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;➜  kaniko export REGISTRY_PASS=&amp;#x3C;your_dockerhub_password&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;➜  kaniko export REGISTRY_EMAIL=&amp;#x3C;your_dockerhub_email&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;➜  kaniko kubectl create secret \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    docker-registry dockerhub-registry \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --docker-server=$REGISTRY_SERVER \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --docker-username=$REGISTRY_USER \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --docker-password=$REGISTRY_PASS \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --docker-email=$REGISTRY_EMAIL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;secret/dockerhub-registry created&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alright, we are ready to start building Docker images with kaniko. For this demo we’ll use a simple Kubernetes pod that looks like this:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apiVersion: v1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kind: Pod&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;metadata:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  name: kaniko-builder&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;spec:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  containers:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - name: kaniko&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    image: gcr.io/kaniko-project/executor:latest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    args: [&quot;--context=git://github.com//Imoustak/kaniko-build-demo.git&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            &quot;--destination=moustakis/kaniko-build-demo:1.0.0&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            &quot;--dockerfile=dockerfile&quot;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    volumeMounts:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      - name: kaniko-secret&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        mountPath: /kaniko/.docker&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  restartPolicy: Never&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  volumes:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: kaniko-secret&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      secret:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        secretName: dockerhub-registry&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        items:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          - key: .dockerconfigjson&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            path: config.json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With everything set, let’s go ahead and kickstart the build by spawning this pod in our cluster.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;➜  kaniko-build-demo git:(main) kubectl apply -f pod.yaml&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pod/kaniko-builder created&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;➜  kaniko-build-demo git:(main) kubectl logs kaniko-builder -f&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Enumerating objects: 10, done.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Counting objects: 100% (10/10), done.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Compressing objects: 100% (7/7), done.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Total 10 (delta 1), reused 7 (delta 1), pack-reused 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0001] GET KEYCHAIN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0001] running on kubernetes ....&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;E1019 16:02:18.955083       1 aws_credentials.go:77] while getting AWS credentials NoCredentialProviders: no valid providers in chain. Deprecated.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;	For verbose messaging see aws.Config.CredentialsChainVerboseErrors&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0009] Retrieving image manifest ubuntu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0009] Retrieving image ubuntu from registry index.docker.io&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0009] GET KEYCHAIN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0012] Built cross stage deps: map[]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0012] Retrieving image manifest ubuntu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0012] Returning cached image manifest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0012] Executing 0 build triggers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0012] Skipping unpacking as no commands require it.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0012] ENTRYPOINT [&quot;/bin/bash&quot;, &quot;-c&quot;, &quot;echo hello&quot;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0012] GET KEYCHAIN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0012] Pushing image to moustakis/kaniko-build-demo:1.0.0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INFO[0017] Pushed image to 1 destinations&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As simple as that. Our pod grabbed the dockerfile(and any other needed files) from our GitHub repository(our defined build context), build the image, and pushed the result to dockerhub. Let’s head to dockerhub to validate that.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/kaniko_build_docker_images/dockerhub_pushed.png&quot; alt=&quot;Docker Hub page for the moustakis/kaniko-build-demo repository showing tag 1.0.0 pushed a few seconds earlier&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Sweet! Our newly generated image is pushed successfully there.&lt;/p&gt;
&lt;p&gt;Another nice option that we can set is caching layers created by &lt;code&gt;RUN&lt;/code&gt; and &lt;code&gt;COPY&lt;/code&gt; (configured by flag &lt;code&gt;--cache-copy-layers&lt;/code&gt;). Before executing a command, kaniko checks the cache for the layer. If it exists, kaniko will pull and extract the cached layer instead of executing the command. If not, kaniko will execute the command and then push the newly created layer to the cache.&lt;/p&gt;
&lt;p&gt;Users can opt into caching by setting the &lt;code&gt;--cache=true&lt;/code&gt; flag. A remote repository for storing cached layers can be provided via the –cache-repo flag. If this flag isn’t provided, a cached repo will be inferred from the –destination provided.&lt;/p&gt;
&lt;p&gt;Different registries for pushing images are also supported apart from dockerhub like &lt;code&gt;Google GCR&lt;/code&gt;, &lt;code&gt;Amazon ECR&lt;/code&gt;, &lt;code&gt;JFrog Container Registry&lt;/code&gt;, &lt;code&gt;JFrog Artifactory&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In case we need to debug something in the kaniko container, we can use the debugger image &lt;code&gt;gcr.io/kaniko-project/executor:debug&lt;/code&gt; which contains a shell.&lt;/p&gt;
&lt;p&gt;That’s all folks, hope you enjoyed this. We explored an alternative to Docker, kaniko, for building Docker images without any special privileges or permissions.&lt;/p&gt;</content:encoded><category>kubernetes</category><category>devops-tooling</category><category>containers</category></item><item><title>AWS Solutions Architect Associate Cheat Sheet</title><link>https://devopsmadness.com/blog/aws-solutions-architect-associate-cheat-sheet</link><guid isPermaLink="true">https://devopsmadness.com/blog/aws-solutions-architect-associate-cheat-sheet</guid><description>AWS Solutions Architect Associate study notes, exam pointers, and cheat sheet.</description><pubDate>Sun, 25 Jul 2021 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;This material was gathered during my preparation for the &lt;code&gt;AWS Solutions Architect Associate Exam&lt;/code&gt;. I created and curated this cheatsheet with useful information that will be handy to review before taking the exam.&lt;/p&gt;
&lt;p&gt;Gathered all the topics and details that I struggled with and I believe this cheatsheet greatly helped me pass this certification and get my &lt;a href=&quot;https://www.credly.com/badges/3325185c-6585-48c9-8c1f-a42812fb17e6&quot;&gt;badge&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/aws_solutions_architect_badge.png&quot; alt=&quot;Credly verification page for the AWS Certified Solutions Architect Associate badge issued to Ioannis Moustakis in July 2021&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Note that the most important thing to pass this exam is to &lt;code&gt;get a good overall understanding of the basic AWS services&lt;/code&gt; first. Use these notes as &lt;code&gt;complementary material and not complete study&lt;/code&gt; material for the exam.&lt;/p&gt;
&lt;p&gt;This cheat sheet doesn’t include all the information you will need to pass the exam, &lt;code&gt;easy or obvious topics are skipped&lt;/code&gt;. It is rather focused on gathering &lt;code&gt;tricky, hidden &amp;amp; more difficult&lt;/code&gt; information and questions.&lt;/p&gt;
&lt;p&gt;AWS frequently changes information, configuration, and options of different services so &lt;code&gt;some of the content might become outdated at some point&lt;/code&gt;. Make sure to cross-check and validate the information you are getting from online sources with the &lt;code&gt;official AWS Documentation and FAQs&lt;/code&gt; before your exam.&lt;/p&gt;
&lt;p&gt;OK enough with the disclaimers, let’s get to it.&lt;/p&gt;
&lt;h2 id=&quot;ec2&quot;&gt;EC2&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Dedicated (Instances): No other customers will share the hardware. May share hardware with other instances of ONLY your account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;(Dedicated) Hosts: Book an entire physical server and have full control of EC2 instance placement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can only change the tenancy of an instance from dedicated to host, or from host to dedicated after you’ve launched it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Good EC2 combo -&amp;gt; reserved instances for baseline + on-demand &amp;amp; spot for peaks.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;userdata&quot;&gt;Userdata&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Executed as &lt;code&gt;root&lt;/code&gt; by default.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;hibernate&quot;&gt;Hibernate&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Hibernation saves the contents from the instance memory (RAM) to your Amazon EBS root volume. When you start your instance: The Amazon EBS root volume is restored to its previous state The RAM contents are reloaded.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/ec2_hibernation.png&quot; alt=&quot;AWS diagram of EC2 hibernation: RAM is saved to the encrypted EBS root volume while the instance moves from running through stopping to stopped, then restored on start&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To use hibernation, the root volume must be an encrypted EBS volume.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When the instance state is stopping, you will not be billed if it is preparing to stop however, you will still be billed if it is just preparing to hibernate.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;spot-instances&quot;&gt;Spot instances&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A Spot Instance request is either one-time or persistent. If the spot request is persistent, the request is opened again after your Spot Instance is interrupted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Spot blocks are Spot Instances with a &lt;code&gt;defined duration &amp;amp; are designed not to be interrupted&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your Spot Instance request is disabled and has an associated stopped Spot Instance, &lt;code&gt;canceling the request does not terminate the instance&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;placement-groups&quot;&gt;Placement groups&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It is recommended that you launch the number of instances that you need in the placement group in a single launch request and that you use the same instance type for all instances in the placement group. If you try to add more instances to the placement group later, or if you try to launch more than one instance type in the placement group, you increase your chances of getting an insufficient capacity error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you receive a capacity error when launching an instance in a placement group that already has running instances, stop and start all of the instances in the placement group, and try the launch again. Restarting the instances may migrate them to hardware that has the capacity for all the requested instances.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;spread&quot;&gt;Spread&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Maximum of 7 running instances per Availability Zone per group.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Recommended for applications that have a &lt;code&gt;small number of critical instances that should be kept separate from each other&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Spread placement groups provide access to &lt;code&gt;distinct racks&lt;/code&gt;, and are therefore suitable for mixing instance types or launching instances over time.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;cluster&quot;&gt;Cluster&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Higher per-flow throughput limit of up to 10 Gbps for TCP/IP traffic and are placed in the same high-bisection bandwidth segment of the network.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;partition&quot;&gt;Partition&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Spreads your instances across logical partitions such that groups of &lt;code&gt;instances in one partition do not share the underlying hardware with groups of instances in different partitions&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Used by &lt;code&gt;large distributed and replicated workloads&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;autoscaling&quot;&gt;Autoscaling&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Lifecycle hooks enable you to perform custom actions as the Auto Scaling group launches or terminates instances.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/ec2_autoscaling_lifecycle_hooks.png&quot; alt=&quot;EC2 Auto Scaling lifecycle diagram: instances pass through the Pending:Wait and Pending:Proceed lifecycle hook states before InService, and Terminating:Wait and Terminating:Proceed before Terminated&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Lifecycle hooks &lt;code&gt;put the instance into wait state until the script or timeout period ends&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With launch templates, you can provision capacity across multiple instance types using both On-Demand Instances and Spot Instances.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can put an instance that is in the InService state into the Standby state, update some software or troubleshoot the instance, and then return the instance to service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Auto Scaling doesn’t terminate an instance that came into service based on EC2 status checks and ELB health checks &lt;code&gt;until the health check grace period expires&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cooldown period: It ensures that the Auto Scaling group does not launch or terminate additional EC2 instances before the previous scaling activity takes effect(default 300s).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon EC2 Auto Scaling &lt;code&gt;does not immediately terminate instances with an Impaired status&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, Amazon EC2 Auto Scaling doesn’t use the results of ELB health checks to determine an instance’s health status when the group’s health check configuration is set to EC2.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When there are multiple policies in force at the same time, Auto Scaling &lt;code&gt;chooses the policy that provides the largest capacity for both scale-out and scale-in&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The default value for the instance placement tenancy is null and the instance tenancy is controlled by the tenancy attribute of the VPC. If you set the Launch Configuration Tenancy to default and the VPC Tenancy is set to dedicated, then the instances have dedicated tenancy. If you set the Launch Configuration Tenancy to dedicated and the VPC Tenancy is set to default, then again the instances have dedicated tenancy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you have an EC2 Auto Scaling group (ASG) with running instances and you &lt;code&gt;choose to delete the ASG, the instances will be terminated and the ASG will be deleted&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Rebalancing AZs launches new instances before terminating the old ones.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Auto Scaling creates a new scaling activity for terminating the unhealthy instance and then terminates it. Later, another scaling activity launches a new instance to replace the terminated instance.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;s3&quot;&gt;S3&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;S3 standard: There is no minimum storage duration charge and no retrieval fee (use case: if you want to keep data for a few days only)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Object-level permissions: &lt;code&gt;For actions inside the bucket&lt;/code&gt;(e.g. GetObject), add &lt;code&gt;/*&lt;/code&gt; after arn, -&amp;gt; arn:aws:s3:::test/*&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With bucket policies, you can grant users within your AWS Account or other AWS Accounts access to your Amazon S3 resources.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The AWS S3 sync command uses the CopyObject APIs to copy objects between S3 buckets.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, S3 replication only supports copying new Amazon S3 objects after it is enabled.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Max upload 5GB per time&lt;/code&gt;, for more use multi-part upload. If the object to upload is &lt;code&gt;&amp;gt; 100 MB&lt;/code&gt;, you should &lt;code&gt;consider using multipart uploads&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon S3 delivers &lt;code&gt;strong read-after-write consistency&lt;/code&gt; automatically.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can increase your read or write performance by parallelizing reads with prefixes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you version-enable a bucket, it can never return to an unversioned state. Versioning can only be suspended once it has been enabled.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No S3 data transfer charges &lt;code&gt;when data is transferred in&lt;/code&gt; from the internet.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Also with S3TA, &lt;code&gt;you pay only for transfers that are accelerated&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using the Range HTTP header in a GET Object request, you can fetch a byte-range from an object, transferring only the specified portion. &lt;code&gt;A byte-range request is a perfect way to get the beginning of a file&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can place a retention period on an object version. Different versions of a single object can have different retention modes and periods.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Max object size 5TB&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For replication must enable versioning in source and destination.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, an S3 object is owned by the AWS account that uploaded it, even in a bucket in a different account. To get full access to the object, the object owner must explicitly grant the bucket owner access. You can create a bucket policy to require external users to grant bucket-owner-full-control when uploading objects so the bucket owner can have full access to the objects.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Object lock: store objects as locked(only on versioned buckets).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Metadata&lt;/code&gt;, which can be included with the object, &lt;code&gt;is not encrypted&lt;/code&gt; while being stored on Amazon S3. Therefore, AWS recommends that customers not place sensitive information in Amazon S3 metadata.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 event notification allows destinations: &lt;code&gt;SQS standard, Lambda, SNS&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Allowed names for S3 website endpoints: &lt;a href=&quot;http://bucket-name.s3-website.Region.amazonaws.com&quot;&gt;http://bucket-name.s3-website.Region.amazonaws.com&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://bucket-name.s3-website-Region.amazonaws.com&quot;&gt;http://bucket-name.s3-website-Region.amazonaws.com&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 Select scan a subset of an object by specifying a range of bytes to query based on the bucket’s name and the object’s key.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With S3 Select, you can use simple structured query language (SQL) statements to filter the contents of an Amazon S3 object and retrieve just the subset of data that you need. CSV, JSON, or Apache Parquet format.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 can publish notifications for the following events: &lt;code&gt;New object-created events, Object removal events, Restore object events, Reduced Redundancy Storage (RRS) object lost events, Replication events&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;To encrypt an object at the time of upload&lt;/code&gt;, you need to add a header called &lt;code&gt;x-amz-server-side-encryption&lt;/code&gt;. To enforce object encryption, create an S3 bucket policy that denies any S3 Put request that does not include the x-amz-server-side-encryption header.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To enable S3 website: a) An S3 bucket that is configured to host a static website. The bucket must have the same name as your domain or subdomain b) a registered domain name c) Route 53 as the DNS service for the domain.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 server access logs provide detailed records for the requests that are made to an S3 bucket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;3,500 requests per second to add data and 5,500 requests per second to retrieve data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can have an S3 bucket that has different objects stored in S3 Standard, S3 Intelligent-Tiering, S3 Standard-IA, and S3 One Zone-IA.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;s3-ia&quot;&gt;S3 IA&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;S3 One Zone-IA is for data that is accessed less frequently but requires rapid access when needed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;minimum storage duration is 30 days&lt;/code&gt; before you can transition objects from S3 Standard to S3 Standard IA or One Zone-IA.(This limitation does not apply to Intelligent Tiering, Glacier, and Glacier Deep Archive)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;s3-lifecycle-transitions&quot;&gt;S3 Lifecycle Transitions&lt;/h3&gt;
&lt;p&gt;Supported lifecycle transitions - &lt;code&gt;waterfall model&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The S3 Standard storage class to any other storage class.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Any storage class to the S3 Glacier or S3 Glacier Deep Archive storage classes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The S3 Standard-IA storage class to the S3 Intelligent-Tiering or S3 One Zone-IA storage classes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The S3 Intelligent-Tiering storage class to the S3 One Zone-IA storage class.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The S3 Glacier storage class to the S3 Glacier Deep Archive storage class.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/s3_lifecycle_transitions.png&quot; alt=&quot;Waterfall diagram of supported S3 lifecycle transitions, from S3 Standard down through Standard-IA, Intelligent-Tiering, One Zone-IA and Glacier to Glacier Deep Archive&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Encrypted objects remain encrypted throughout the storage class transition process&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;glacier&quot;&gt;Glacier&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Glacier supports encryption by default for both data at rest as well as in-transit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The minimal storage duration period is &lt;code&gt;90 days for the S3 Glacier&lt;/code&gt; storage class and &lt;code&gt;180 days for S3 Glacier Deep Archive&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data can be stored directly in Amazon S3 Glacier Deep Archive.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;snowball&quot;&gt;Snowball&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Snowball Edge storage optimised: 80TB 40 vCPUs, 1 TB of SATA SSD storage, and up to 40 Gb network connectivity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can’t directly copy data from Snowball Edge devices into AWS Glacier.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;For data &amp;lt; 10PB or distributed in multiple locations&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Snowball Edge compute optimised(52 vCPUs, 42 TB of usable block or object storage, and an optional GPU).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Snowball Edge possibility for storage clustering.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS OpsHub is a graphical user interface you can use to manage your AWS Snowball devices.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;snowmobile&quot;&gt;Snowmobile&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Each Snowmobile has a total capacity of up to 100 petabytes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;For data &amp;gt; 10PB in a single location&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/snow_comparison.png&quot; alt=&quot;Comparison table of AWS Snow family devices (Snowcone, Snowball Edge Storage and Compute Optimized, Snowmobile) by storage, compute, memory, network interfaces and portability&quot;/&gt;&lt;/p&gt;
&lt;h2 id=&quot;iam&quot;&gt;IAM&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Permissions Boundary to &lt;code&gt;limit max access of users&lt;/code&gt;. They can only be applied to roles or users, not IAM groups.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/iam_permissions_boundary.png&quot; alt=&quot;Diagram showing effective IAM permissions as the intersection of the identity-based policy and the permissions boundary&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;IAM Policy Evaluation Logic: if there is an explicit deny, the final decision is deny for the resource.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When you assume a role, you give up your original permissions and take the permissions of the assigned role.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When using a resource-based policy the principal doesn’t have to give up his permissions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In a policy condition: aws:RequestedRegion represents the target of the API call.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can share an AMI with another account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Trust Policy: only IAM resource-based policy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you got your certificate from a third-party CA, import the certificate into ACM or upload it to the IAM certificate store.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With &lt;code&gt;web identity federation&lt;/code&gt;, you don’t need to create custom sign-in code or manage your own user identities. Instead, users of your app can sign in using a well-known external identity provider (IdP), such as Login with Amazon, Facebook, Google, or any other OpenID Connect (OIDC)-compatible IdP.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;security-token-servicests&quot;&gt;Security Token Service(STS)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Temporary security credentials that can control access to your AWS resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-organizations&quot;&gt;AWS Organizations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It does not offer federation capability.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To migrate an account to another Organization: remove member account, send an invite to new Org, Accept the invite to the new Org from the member account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SCPs offer central control over the maximum available permissions for all accounts in your organization, allowing you to ensure your accounts stay within your organization’s access control guidelines.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SCPs affect all users and roles in the attached accounts, including the root user.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SCPs do not affect any service-linked role.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;vpc&quot;&gt;VPC&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;VPN connection: Virtual Private Gateway endpoint on the AWS VPC side - Customer Gateway on the on-premises side.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can’t have a VPC with only a public subnet and AWS Site-to-Site VPN.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Private IPs allowed ranges: 10.0.0.0/8 (10.0.0.0 - 10.255.255.255), 172.16.0.0/12 (172.16.0.0 - 172.31.255.255), 192.168.0.0/16(192.168.0.0 - 192.168.255.255)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS &lt;code&gt;reserves 5 Ip addresses in each subnet&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Shared services VPC, which provides access to services required by workloads in each of the VPCs. This might include directory services or VPC endpoints. Sharing resources from a central location instead of building them in each VPC may reduce administrative overhead and cost.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use AZ ID to uniquely identify the Availability Zones across the two AWS Accounts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, non-default subnets have the &lt;code&gt;IPv4 public addressing(assign public IP) attribute set to false&lt;/code&gt;, and default subnets have this attribute set to true.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cannot disable IPv4 support for your VPC and subnets since this is the default IP addressing system for Amazon VPC and Amazon EC2.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Every subnet that you create is automatically associated with the main route table for the VPC.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Allowed block size in VPC is between a /16 netmask (65,536 IP addresses) and /28 netmask.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;While primary ENIs cannot be detached from an instance, secondary ENIs can be detached and attached to a different instance.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;security-groups&quot;&gt;Security Groups&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;If nothing is defined in a security group then all access is blocked.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;nacl&quot;&gt;NACL&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;NACLs are stateless so outbound rules have to be evaluated again.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Defined at Subnet level.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Should allow outbound traffic from ephemeral ports.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NACL rules are evaluated starting with the lowest numbered rule. As soon as a rule matches traffic, it’s applied immediately regardless of any higher-numbered rule that may contradict it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;cloudhub&quot;&gt;Cloudhub&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Multiple AWS Site-to-Site VPN connections, you can provide secure communication between sites using the AWS VPN CloudHub including Direct Connect connections.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports IP Multicast.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Low-cost primary or secondary network connectivity between locations, only for VPNs.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;direct-connect&quot;&gt;Direct Connect&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Maximum resilience is achieved by separate connections terminating on separate devices in more than one location.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/direct_connect_high_resiliency.png&quot; alt=&quot;AWS diagram of high-resiliency Direct Connect: one AWS region connected to customer data centers through two independent Direct Connect locations&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Dedicated connection 1-10 Gbps.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hosted connection 50Mbps -10Gbps, add or remove capacity on demand.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Data in transit not encrypted&lt;/code&gt;, but private.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;transit-gateway&quot;&gt;Transit Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Network transit hub that you can use to interconnect your virtual private clouds (VPC) and on-premises networks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AWS Transit Gateway also enables you to scale the IPsec VPN throughput with equal-cost multi-path (ECMP) routing support over multiple VPN tunnels.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;nat-instance&quot;&gt;NAT Instance&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Can be used as a bastion, supports security groups, supports port-forwarding, must disable ec2 flag source/destination check.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;nat-gateway&quot;&gt;Nat Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Only for IPv4.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set up in a public subnet.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In a specific AZ and can only be used by instances in other subnets.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;egress-only-internet-gateway&quot;&gt;Egress-only Internet Gateway:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;nat for ipv6.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;route53&quot;&gt;Route53&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Routing policy multi-value supports up to 8 healthy records for each multi-value query.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To integrate an external domain to route53, update the nameservers on the 3rd party registrar with your public hosted zone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To resolve any DNS queries &lt;code&gt;for resources in the AWS VPC from the on-premises network&lt;/code&gt;, you can create an &lt;code&gt;inbound endpoint&lt;/code&gt; on Route 53 Resolver, and then DNS resolvers on the on-premises network can forward DNS queries to Route 53 Resolver via this endpoint.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To resolve DNS queries &lt;code&gt;for any resources in the on-premises network from the AWS VPC&lt;/code&gt;, you can create an &lt;code&gt;outbound endpoint&lt;/code&gt; on Route 53 Resolver, and then Route 53 Resolver can conditionally forward queries to resolvers on the on-premises network via this endpoint.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cannot create a CNAME record for the top node of the DNS namespace. So, if you register the DNS name mpla.com the zone apex is mpla.com You can’t create a CNAME record for mpla.com but you can create an alias record for mpla.com that routes traffic to &lt;a href=&quot;http://www.mpla.com&quot;&gt;www.mpla.com&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Route 53 &lt;code&gt;doesn&amp;#39;t charge for alias queries&lt;/code&gt; to AWS resources but Route 53 does &lt;code&gt;charge for CNAME queries&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each VPC that you want to associate with the Route 53 hosted zone, change the following VPC settings to true: &lt;code&gt;enableDnsHostnames&lt;/code&gt;, &lt;code&gt;enableDnsSupport&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You configure active-active failover using any routing policy (or combination of routing policies) other than failover, and you configure active-passive failover using the failover routing policy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Active-Active Failover&lt;/code&gt; when you want all of your resources to be available the majority of the time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Active-Passive Failover&lt;/code&gt; when you want a primary resource or group of resources to be available the majority of the time and you want a secondary resource or group of resources to be on standby in case all the primary resources become unavailable.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;ebs&quot;&gt;EBS&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;By default, the root volume for an AMI backed by Amazon EBS is deleted when the instance terminates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For an encrypted EBS volume data stored at rest on the volume, data moving between the volume and the instance, snapshots created from the volume, and volumes created from those snapshots are all encrypted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;GP2: system boot volumes, 1GB - 16TB, max IOPS 16,000, if you add 1TB you get +3000IOPS, for low latency interactive apps.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;io1/io2: 4GB-16TB, max 64,000 IOPS, &lt;code&gt;50:1&lt;/code&gt; IOPS:GB ratio.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;io2 Block Express volumes, Provisioned IOPS (PIOPS) up to &lt;code&gt;256,000&lt;/code&gt;, with an IOPS:GiB ratio of &lt;code&gt;1,000:1&lt;/code&gt;, for submillisecond latency for &amp;gt; 64,000 IOPS or 1000 MB/s throughput.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Throughput optimised HDD(st1): &lt;code&gt;max throughput 500 MB/s - max 500 IOPS&lt;/code&gt;, Big data, log processing, data warehouses.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cold HDD(scl): max throughput 250 MB/s - max 250 IOPS, throughput-oriented storage that is infrequently accessed, low storage cost scenarios.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon EBS Multi-Attach enables you to attach a single Provisioned IOPS SSD (io1 or io2) volume to multiple instances with Nitro system that are in the same Availability Zone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Throughput Optimized HDD (&lt;code&gt;st1&lt;/code&gt;) and Cold HDD (&lt;code&gt;sc1&lt;/code&gt;) volume types &lt;code&gt;cannot be used for boot volumes&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/ebs_comparison.png&quot; alt=&quot;Comparison table of EBS SSD volume types gp3, gp2, io2 Block Express, io2 and io1 covering durability, use cases, volume size, max IOPS, throughput and multi-attach&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Locked to AZ, to attach to other AZ you have to snapshot it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copying an unencrypted snapshot allows encryption.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When copying an AMI to another region, automatically creates the underlying EBS snapshot also in the new region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RAID 0 to increase performance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RAID 1 to increase fault tolerance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the instance is already running, you can set &lt;code&gt;DeleteOnTermination&lt;/code&gt; to False using the &lt;code&gt;command line&lt;/code&gt; for the root EBS volume.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An in-progress snapshot is not affected by ongoing reads and writes to the volume hence, you can still use the EBS volume normally.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enforce the encryption of the new EBS volumes and snapshot copies that you create with &lt;code&gt;Encryption by Default&lt;/code&gt; feature(no effect on existing EBS volumes or snapshots). If you enable it for a Region, you cannot disable it for individual volumes or snapshots in that Region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When you enable encryption by default, you can launch an instance only if the instance type supports EBS encryption.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon EBS does not support asymmetric CMKs.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;instance-store&quot;&gt;Instance Store&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Temporary block-level storage for your instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ideal for temporary storage of information that changes frequently, such as buffers, caches, scratch data, and other temporary content, or for data that is replicated across a fleet of instances, such as a load-balanced pool of web servers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/instance_store.png&quot; alt=&quot;AWS diagram of instance store: ephemeral volumes physically attached to each host computer, visible only to the instances on that host&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For high I/O performance, instance store volumes are a better option.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cant resize the instance store.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;efs&quot;&gt;EFS&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Control which EC2 instances can access your EFS file system with security group rules and IAM policies.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;1000s on concurrent NFS clients, 10Gbs throughput.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use EFS Access Points to manage application access.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Max I/O performance mode is used to scale to higher levels of aggregate throughput and operations per second - tradeoff of slightly higher latencies.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;General Purpose performance mode is ideal for latency-sensitive use cases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;POSIX&lt;/code&gt; compliant.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Provisioned Throughput mode: for applications with high throughput to storage (MiB/s per TiB) ratios, or with requirements greater than those allowed by the Bursting Throughput mode.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bursting Throughput mode: designed to burst to high throughput levels for periods of time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Higher price point than EBS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maximum days for the EFS lifecycle policy is 90.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;amazon-fsx-for-lustre&quot;&gt;Amazon FSx for Lustre:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Run the world’s most popular high-performance file system.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For machine learning, high-performance computing (&lt;code&gt;HPC&lt;/code&gt;), video processing, and financial modeling.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ability to both process the ‘hot data’ in a parallel and distributed fashion as well as easily store the ‘cold data’ on Amazon S3.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;rds&quot;&gt;RDS&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Multi A-Z synchronous replication&lt;/code&gt; across AZs. Replication between the primary and standby instances does not incur additional data transfer charges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Read replicas asynchronous replication&lt;/code&gt; across AZs or cross-region, up to 5.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/rds_multi_az_read_replicas.png&quot; alt=&quot;Table comparing RDS Multi-AZ deployments (high availability, synchronous replication), multi-region deployments (disaster recovery) and read replicas (read scalability, asynchronous replication)&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Backups every 5min, ability to restore at any point in time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports storage autoscaling.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;IAM database authentication works with &lt;code&gt;MySQL and PostgreSQL&lt;/code&gt;. Use an authentication token with a lifetime of 15 minutes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RDS provides metrics in real-time for the operating system (OS) that your DB instance runs on with &lt;code&gt;Enhanced Monitoring&lt;/code&gt;(RDS processes, RDS child processes, OS processes).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To encrypt unencrypted RDS database: create a snapshot of your DB instance, and then create an encrypted copy of that snapshot, restore DB from encrypted snapshot, terminate previous DB.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Upgrades to the database engine level require downtime&lt;/code&gt;. Even if your RDS DB instance uses a Multi-AZ deployment, both the primary and standby DB instances are upgraded at the same time. This causes downtime until the upgrade is complete, and the duration of the downtime varies based on the size of your DB instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RDS applies OS updates by performing maintenance on the standby, then promoting the standby to primary, and finally performing maintenance on the old primary, which becomes the new standby.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maximum backup retention period for automated backup is 35 days.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;aurora&quot;&gt;Aurora&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Auto-scales &lt;code&gt;up to 128 TB&lt;/code&gt; per database instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Aurora cluster: one Primary DB instance - &lt;code&gt;up to 15 replicas(read-only)&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/aurora_cluster.png&quot; alt=&quot;Amazon Aurora DB cluster diagram: a primary instance and Aurora replicas across three availability zones sharing one cluster volume with data copies in each zone&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You can specify the failover priority for Aurora Replicas, each Read Replica is associated with a priority tier (0-15). Aurora will promote the Read Replica that has the highest priority (the lowest numbered tier). If two or more Aurora Replicas share the same priority, then Amazon RDS promotes the replica that is the largest in size.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Aurora &lt;code&gt;Global Database&lt;/code&gt; is designed for &lt;code&gt;globally distributed applications&lt;/code&gt;, allowing a single Amazon Aurora database to span multiple AWS regions, &lt;code&gt;sub-second data access in any region&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Storage automatically grows in increments of 10GB.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In a multi-master cluster, all DB instances can perform write operations(scale writes, avoid downtime for writes) - &lt;code&gt;continuous availability&lt;/code&gt; for applications where you can’t afford even brief downtime for database write operations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using endpoints, you can map each connection to the appropriate instance or group of instances based on your use case. For clusters with DB instances of different capacities or configurations, you can connect to custom endpoints associated with different subsets of DB instances.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reader endpoint automatically performs load-balancing among all the Aurora Replicas.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For diagnosis or tuning, you can connect to a specific instance endpoint to examine details about a specific DB instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you are running Aurora Serverless and the DB instance or AZ becomes unavailable, Aurora will automatically recreate the DB instance in a different AZ.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you have a single instance, Aurora will attempt to create a new DB Instance in the same Availability Zone as the original instance. This replacement of the original instance is done on a best-effort basis and may not succeed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;dynamodb&quot;&gt;DynamoDB&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for Amazon DynamoDB that delivers &lt;code&gt;up to a 10 times performance improvement—from milliseconds to microseconds&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tables must have provisioned read and write capacity units RCU, WRC.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DynamoDB Streams allow changes in DynamoDB to be streamed to other services(read by Lambda etc, 24h retention on streams).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Global Tables support multi-region replication, low latency, disaster recovery. Must first enable Streams.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can only query on primary key, sort key, or indexes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;All DynamoDB tables are encrypted&lt;/code&gt;. There is no option to enable or disable encryption for new or existing tables. By default, all DynamoDB tables are encrypted under an AWS owned customer master key (CMK), which do not write to CloudTrail logs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the shard iterator expires immediately before you can use it, this might indicate that the DynamoDB table used by Kinesis does not have enough capacity to store the lease data. To solve increase the write capacity assigned to the shard table.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;elasticache&quot;&gt;Elasticache&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;For &lt;code&gt;sub-millisecond latency caching&lt;/code&gt;, ElastiCache is the best choice.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;memcached&quot;&gt;Memcached&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Supports &lt;code&gt;multithreaded architecture&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;redis&quot;&gt;Redis&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Redis &lt;code&gt;HIPAA compliant&lt;/code&gt;, supports replication, high availability, and cluster sharding.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In-memory data store that provides &lt;code&gt;sub-millisecond latency&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;IAM Auth is not supported by ElastiCache.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Redis AUTH(enable Redis to require a token (password) before allowing clients to execute commands, thereby improving data security).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;redshift&quot;&gt;Redshift&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;With Spectrum, you can efficiently query and retrieve structured and semistructured data from files in Amazon S3 without having to load the data into Amazon Redshift tables.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/redshift_spectrum.png&quot; alt=&quot;Redshift Spectrum architecture: a query on the Redshift cluster fans out to Spectrum workers that read data directly from S3 using a Hive metastore data catalog&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For OLAP: online analytical processing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Redshift enhanced VPC routing, copy/unload goes through VPC.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Possibility to copy snapshots for a cluster to another region for DR.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;cloudwatch&quot;&gt;Cloudwatch&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Metrics belong to namespaces, Dimension is an attribute of a metric, Up to 10 dimensions per metric.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatically recover ec2: If your instance has a public IPv4 address, it &lt;code&gt;retains the public IPv4 address&lt;/code&gt; after recovery. During instance recovery, the instance is migrated during an instance reboot, and &lt;code&gt;any data that is in-memory is lost&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can use CloudWatch Events to run Amazon ECS tasks when certain AWS events occur.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;eventbridge&quot;&gt;EventBridge&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Recommended when you want to build an application that reacts to events from SaaS applications and/or AWS services. Only event-based service that integrates directly with third-party SaaS partners.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;encryptionsecrets&quot;&gt;Encryption/Secrets&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Key Policies: control access to keys, you cannot control access without them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatic key rotation: CMK every one year.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SSE-KMS is a service that combines secure, highly available hardware and software to provide a key management system scaled for the cloud. When you use server-side encryption with AWS KMS (SSE-KMS), you can specify a customer-managed CMK that you have already created. SSE-KMS provides you with an audit trail that shows when your CMK was used and by whom.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Deleting a customer master key (CMK) has enforced a waiting period&lt;/code&gt;, you schedule key deletion(&lt;code&gt;minimum of 7 days up to a maximum of 30 days(default)&lt;/code&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SSE-C - With Server-Side Encryption with Customer-Provided Keys (SSE-C), you manage the encryption keys and Amazon S3 manages the encryption, as it writes to disks and decryption when you access your objects.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SSE-S3 - When you use Server-Side Encryption with Amazon S3-Managed Keys (SSE-S3), each object is encrypted with a unique key. Uses 256-bit Advanced Encryption Standard (AES-256).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Client-side encryption when there is a proprietary encryption algorithm.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;secrets-manager&quot;&gt;Secrets Manager&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Nice RDS integration.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Force secret rotation every X days.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;ssm-parameter-store&quot;&gt;SSM Parameter Store&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Allow assigning TTL to a parameter(expiration date) to force update/delete of sensitive data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;cloudhsm&quot;&gt;CloudHSM&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Dedicated hardware, you manage your own encryption keys.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Good option to use with SSE-C.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It is possible to lose keys that were created since the most recent daily backup if the CloudHSM cluster that you are using fails and you are not using two or more HSMs.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;kinesis&quot;&gt;Kinesis&lt;/h2&gt;
&lt;h3 id=&quot;kinesis-data-streams&quot;&gt;Kinesis Data Streams&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Default data retention 1 day&lt;/code&gt;, can go up to 7.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;1MB/sec/shard ingest capacity&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, the &lt;code&gt;2MB/second/shard output&lt;/code&gt; is shared between all of the applications consuming data from the stream.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use enhanced fan-out if you have multiple consumers retrieving data from a stream in parallel, automatically scales throughput with the number of shards.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ability for multiple apps to consume the same stream concurrently.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ability to consume records in the &lt;code&gt;same order a few hours later&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Routing related records to the same record processor. For example, counting and aggregation are simpler when all records for a given key are routed to the same record processor.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;kinesis-firehose&quot;&gt;Kinesis Firehose&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Automatically scales to match the throughput&lt;/code&gt; of your data and requires no ongoing administration. Auto-scaling solution, as there is no need to provision any shards like Kinesis Data Streams.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Kinesis Agent cannot write to a Kinesis Firehose for which the delivery stream source is already set as Kinesis Data Streams.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data into Amazon S3, Amazon Redshift, Amazon Elasticsearch Service, generic HTTP endpoints and Datadog, New Relic, MongoDB, Splunk.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Load streaming data into Redshift for near real-time analytics.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;sqs&quot;&gt;SQS&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When you need &lt;code&gt;messaging semantics&lt;/code&gt;(ack/fail) and &lt;code&gt;visibility timeout&lt;/code&gt;(default 30s).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dynamically increasing concurrency/throughput at read time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;FIFO queues support up to &lt;code&gt;3,000 messages&lt;/code&gt;(batch 10 messages per operation- max) per second with batching(&lt;code&gt;300 without&lt;/code&gt;), have an 80-character queue name limit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Message retention &lt;code&gt;4 days default, 14 days max&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Limit 256kb per message sent.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To scale to &lt;code&gt;same number of consumers as producers&lt;/code&gt;, send data with a &lt;code&gt;Group ID attribute&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Delay queues let you postpone the delivery of new messages to a queue for several seconds. &lt;code&gt;The default (minimum) delay for a queue is 0 seconds&lt;/code&gt;. The maximum is 15 minutes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can use message timers to set an initial invisibility period for a message added to a queue. Default delay for a message is 0 seconds. The maximum is 15 minutes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Temporary queues help you save development time and deployment costs when using common message patterns such as request-response. To better support short-lived, lightweight messaging destinations, AWS recommends Amazon SQS Temporary Queue Client. The key concept behind the client is the &lt;code&gt;Virtual Queue&lt;/code&gt;. Virtual queues let you multiplex many low-traffic queues onto a single SQS queue.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/sqs_virtual_queues.png&quot; alt=&quot;Diagram of SQS virtual queues: producers tag messages with a virtual queue name in one host queue and a dispatch thread on the consumer routes each message to its virtual queue&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;AWS recommends using &lt;code&gt;separate queues to provide prioritization of work&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A single SQS message queue can contain an unlimited number of messages. However, there is a 120,000 quota for the number of inflight messages for a standard queue and 20,000 for a FIFO queue. Messages &lt;code&gt;are inflight after they have been received from the queue by a consuming component, but have not yet been deleted&lt;/code&gt; from the queue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Standard queues provide &lt;code&gt;at-least-once&lt;/code&gt; delivery, which means that each message is delivered at least once.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;FIFO queues provide &lt;code&gt;exactly once&lt;/code&gt; processing, which means that each message is delivered once and remains available until a consumer processes it and deletes it. &lt;code&gt;Duplicates are not introduced&lt;/code&gt; into the queue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An Amazon SQS message can contain up to 10 metadata attributes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, &lt;code&gt;ReceiveMessageWaitTimeSeconds&lt;/code&gt; is zero which means it is using Short polling. If it is set to a value greater than zero, then it is Long polling.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;sns&quot;&gt;SNS&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event producers send events to 1 topic, we can have many subs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;100000 topics limit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use SNS &lt;code&gt;message filtering&lt;/code&gt; to assign a filter policy to the topic subscription, and the subscriber will &lt;code&gt;only receive a message that they are interested in&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SNS FIFO for strict message ordering and deduplicated message delivery to one or more subscribers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/sns_fifo.png&quot; alt=&quot;Diagram of ordered messaging: an SNS FIFO topic feeds an SQS FIFO queue and a Lambda function applies the updates to a DynamoDB table in order&quot;/&gt;&lt;/p&gt;
&lt;h2 id=&quot;loadbalancers&quot;&gt;LoadBalancers&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;LBs can scale but &lt;code&gt;not instantaneously&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Elastic Load Balancing stops sending requests to targets that are deregistering. By default, Elastic Load Balancing waits 300s(can be set between 1s to 3600s) seconds before completing the deregistration process, which can &lt;code&gt;help in-flight requests to the target to complete&lt;/code&gt;(connection drain).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When &lt;code&gt;cross-zone load balancing is enabled&lt;/code&gt;, each load balancer node &lt;code&gt;distributes traffic&lt;/code&gt; across the registered targets in all enabled Availability Zones &lt;code&gt;evenly&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/cross-zone-lb-enabled.png&quot; alt=&quot;Diagram of cross-zone load balancing enabled: both load balancer nodes spread traffic evenly, ten percent to each of the ten targets across two availability zones&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;By default, cross-zone load balancing is enabled for Application Load Balancer and disabled for Network Load Balancer&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ELB cannot distribute incoming traffic for targets deployed in different regions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Access logging is an optional feature of Elastic Load Balancing that is disabled by default. Use to analyze traffic patterns and troubleshoot issues.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;application-loadbalancer&quot;&gt;Application LoadBalancer&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ALB targets with &lt;code&gt;instance ID&lt;/code&gt; route to &lt;code&gt;primary private IP in primary NIC&lt;/code&gt;, targets using IP addresses route to any private IP from one or more NICs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Host-based Routing: You can route a client request based on the Host field of the HTTP header allowing you to route to multiple domains from the same load balancer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Path-based Routing: You can route a client request based on the URL path of the HTTP header.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;HTTP header-based routing: You can route a client request based on the value of any standard or custom HTTP header.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;HTTP method-based routing: You can route a client request based on any standard or custom HTTP method.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Query string parameter-based routing: You can route a client request based on the query string or query parameters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Source IP address CIDR-based routing: You can route a client request based on source IP address CIDR from where the request originates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ALB not registered any targets with the target groups -&amp;gt; 503 error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use Cognito Authentication via Cognito User Pools for your ALB.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With SNI support AWS makes it easy to use more than one certificate with the same ALB.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can host multiple TLS secured applications, each with its own TLS certificate, behind a single ALB. In order to use SNI, all you need to do is bind multiple certificates to the same secure listener on your load balancer. ALB will automatically choose the optimal TLS certificate for each client.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ALBs support Weighted Target Groups routing.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;network-loadbalancer&quot;&gt;Network LoadBalancer&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;NLB traffic is routed using the private IP address.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Network LB has no security groups, lets traffic passing by.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With Network Load Balancer (NLB), you can offload the decryption/encryption of TLS traffic from your application servers to the NLB.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;classic-loadbalancer&quot;&gt;Classic LoadBalancer&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;CLB does not support Server Name Indication (SNI).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;lambda&quot;&gt;Lambda&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Supports &lt;code&gt;1000 concurrent executions per AWS account per region&lt;/code&gt;, contact support to raise the limit if needed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supported languages: C#/.NET, GO, node.js, Python, Java, Ruby.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;lamda@edge: deploy lambda to each region alongside your CloudFront CDN.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can set your memory from 128MB to 10,240MB&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your Lambda function accesses a VPC, you must make sure that your VPC has sufficient ENI or subnect IPs capacity to support the scale requirements of your Lambda function.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;step-functions&quot;&gt;Step Functions&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Serverless workflows orchestration.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;cloudfront&quot;&gt;Cloudfront&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Delivering data out of CloudFront can be &lt;code&gt;more cost-effective than delivering it from S3&lt;/code&gt; directly to your users.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use CloudFront to &lt;code&gt;improve application performance&lt;/code&gt; to serve static content from S3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dynamic content does not flow through regional edge caches, but goes directly to the origin - Proxy methods PUT/POST/PATCH/OPTIONS/DELETE go directly to the origin.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Preferred to handle spikes in traffic over GA.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You &lt;code&gt;cannot directly integrate Cognito User Pools&lt;/code&gt; with CloudFront distribution as you have to create a separate Lambda@Edge function to accomplish the authentication via Cognito User Pools.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudFront can route to &lt;code&gt;multiple origins based on the content type&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Field-level encryption: The sensitive information provided by your users is &lt;code&gt;encrypted at the edge&lt;/code&gt; (You can’t encrypt all of the data in a request with field-level encryption; you must specify individual fields to encrypt).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudFront &lt;code&gt;signed cookies&lt;/code&gt; -&amp;gt; provide access to &lt;code&gt;multiple restricted files&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CloudFront &lt;code&gt;signed URLs&lt;/code&gt; -&amp;gt; access to &lt;code&gt;one file&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can also use an EC2 instance or a custom origin in configuring CloudFront.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;Cache-Control&lt;/code&gt; and &lt;code&gt;Expires&lt;/code&gt; headers control how long objects stay in the cache. The &lt;code&gt;Cache-Control max-age&lt;/code&gt; directive lets you specify how long (in seconds) you want an object to remain in the cache before CloudFront gets the object again from the origin server. The minimum expiration time CloudFront supports is 0 seconds for web distributions and 3600 seconds for RTMP distributions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;global-acceleratorga&quot;&gt;Global Accelerator(GA)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Directs traffic to optimal endpoints over the AWS global network.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Improves the availability and performance of your internet applications.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Two static anycast IP addresses that act as a fixed entry point to your application endpoints.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/global_accelerator.png&quot; alt=&quot;AWS Global Accelerator diagram: users enter at four global locations through static anycast IPs and travel the Amazon global network to an endpoint in us-east-1, roughly 50 to 60 percent faster&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Good fit for non-HTTP use cases, such as gaming (UDP), IoT (MQTT), or Voice over IP.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Uses endpoint weights to determine the proportion of traffic that is directed to endpoints in an endpoint group(can be used in blue/green deployments).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/global_accelerator_weighted_endpoints.png&quot; alt=&quot;AWS Global Accelerator endpoint weights for a blue/green deployment: weight 128 sends all traffic to the blue environment and weight 0 to the green&quot;/&gt;&lt;/p&gt;
&lt;h3 id=&quot;waf&quot;&gt;WAF&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use AWS WAF to &lt;code&gt;block or allow requests based on conditions&lt;/code&gt; that you specify, such as the IP addresses.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Geographic &lt;code&gt;(Geo) Match Conditions&lt;/code&gt; in AWS WAF to restrict application access based on the geographic location of your viewers - choose the countries from which AWS WAF should allow access.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Protects against &lt;code&gt;SQL injection and Cross-Site Scripting&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Rate based&lt;/code&gt; rules(DDoS protection).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;firewall-manager&quot;&gt;Firewall Manager&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Centrally configure and manage firewall rules across your accounts and applications in AWS Organizations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can centrally configure AWS WAF rules, AWS Shield Advanced protection, Amazon Virtual Private Cloud (VPC) security groups, AWS Network Firewalls, and Amazon Route 53 Resolver DNS Firewall rules across accounts and resources in your organization. It does &lt;code&gt;not support Network ACLs&lt;/code&gt; as of today.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-shield&quot;&gt;AWS Shield&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;DDoS&lt;/code&gt;, protection against &lt;code&gt;SYN/UDP floods&lt;/code&gt;, reflection attacks, and other layer/3 &amp;amp; layer 4 attacks.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;emr&quot;&gt;EMR&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Cloud big data platform for processing vast amounts of data using Apache Spark, Apache Hive, Apache HBase, Apache Flink, Apache Hudi, and Presto, Hadoop.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;beanstalk&quot;&gt;Beanstalk&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Easy-to-use service for deploying and scaling web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatically handles the deployment, from capacity provisioning, load balancing, auto-scaling to application health monitoring.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You retain &lt;code&gt;full control over the AWS resources powering your application and can access the underlying resources at any time&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Application files are stored in S3. The server log files can also optionally be stored in S3 or in CloudWatch Logs.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;cloudformation&quot;&gt;CloudFormation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;StackSet extends the functionality of stacks by enabling you to create, update, or delete stacks &lt;code&gt;across multiple accounts and regions&lt;/code&gt; with a single operation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the &lt;code&gt;CreationPolicy&lt;/code&gt; attribute when you want to wait on resource configuration actions before stack creation proceeds.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;cognito&quot;&gt;Cognito&lt;/h2&gt;
&lt;h3 id=&quot;user-pools&quot;&gt;User pools&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Provide built-in user management e.g. sign-in and register functionality for apps.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;identity-pools&quot;&gt;Identity pools&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Provide temporary credentials for AWS access to users.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-database-migration-service&quot;&gt;AWS Database Migration Service&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Seamlessly migrate data from supported sources to relational databases, data warehouses, streaming platforms, and other data stores in AWS cloud. (e.g. quickly move data from S3 to Kinesis data streams, not only for DBs).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/S3_to_Kinesis.png&quot; alt=&quot;Architecture diagram: third-party application data lands in S3, AWS DMS streams it into Amazon Kinesis, and consumers such as Lambda, Kinesis Data Analytics, Firehose and the Kinesis Consumer Library process the stream&quot;/&gt;&lt;/p&gt;
&lt;h2 id=&quot;storage-gateway&quot;&gt;Storage Gateway&lt;/h2&gt;
&lt;h3 id=&quot;file-gateway&quot;&gt;File Gateway&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/images/aws_solutions_architect_associate_cheatsheet/file-gw-architecture.png&quot; alt=&quot;Storage Gateway file gateway architecture: on-premises clients reach a file share over NFS or SMB through the gateway appliance with local cache, backed by an S3 bucket&quot;/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SMB or NFS access to data in S3 with local caching.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;volume-gateway&quot;&gt;Volume Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Present cloud-based iSCSI block storage volumes to your on-premises applications.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;tape-gateway&quot;&gt;Tape Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Supports archiving directly to Glacier and Glacier Deep Archive.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;datasync&quot;&gt;DataSync&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Move large data from on-premise to AWS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can move data &lt;code&gt;directly to Glacier or Glacier Deep Archive&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;appsync&quot;&gt;AppSync&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Store and sync data across mobile and web apps in real-time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;cloudtrail&quot;&gt;CloudTrail&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;By default, CloudTrail event log files are encrypted using Amazon S3 server-side encryption (SSE).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;xray&quot;&gt;Xray&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;AWS X-Ray helps developers analyze and &lt;code&gt;debug&lt;/code&gt; production, distributed applications, such as those built using a microservices architecture.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;End-to-end view of requests &lt;code&gt;as they travel through your application&lt;/code&gt;, and shows a map of your application’s underlying components.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The X-Ray agent can assume a role to publish data into an account different from the one in which it is running.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;guardduty&quot;&gt;GuardDuty&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Threat detection that enables you to continuously monitor and protect your AWS accounts, workloads, and data stored in Amazon S3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Analyses AWS &lt;code&gt;CloudTrail Events, Amazon VPC Flow Logs, and DNS Logs&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Disabling the service&lt;/code&gt; in the general settings &lt;code&gt;deletes all the remaining data&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;macie&quot;&gt;Macie&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Discover and protect your sensitive data on Amazon S3.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;inspector&quot;&gt;Inspector&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Helps you check for unintended network accessibility of your Amazon EC2 instances and for vulnerabilities on those EC2 instances.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;recognition&quot;&gt;Recognition&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Automate your image and video analysis with machine learning.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;vpc-endpoints&quot;&gt;VPC Endpoints&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;When you create a VPC endpoint, you can attach an endpoint policy that controls access to the service to which you are connecting.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;gateway-endpoints&quot;&gt;Gateway Endpoints&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;GE is a gateway that you specify as a &lt;code&gt;target for a route in your route table for traffic destined to a supported AWS service&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 &amp;amp; DynamoDB only.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;interface-endpoints&quot;&gt;Interface Endpoints&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;An elastic network interface with a private IP address from the IP address range of your subnet that serves as an entry point for traffic destined to a supported service.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;elastic-network-adapterena&quot;&gt;Elastic Network Adapter(ENA)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Enhanced networking capabilities with network speeds of up to 100 Gbps.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supports Windows.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;elastic-fabric-adapter-efa&quot;&gt;Elastic Fabric Adapter (EFA)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Network device that you can attach to your Amazon EC2 instance to accelerate &lt;code&gt;High-Performance Computing (HPC)&lt;/code&gt; and machine learning applications.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ENA with added capabilities.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Doesn’t support Windows.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EFA support can be enabled either at the launch of the instance or added to a stopped instance. EFA devices cannot be attached to a running instance.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;api-gateway&quot;&gt;API Gateway&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Rest APIs - stateless client-server communication.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Websocket APIs - statefull full-duplex communication.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All of the APIs created with Amazon API Gateway expose HTTPS endpoints only&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;swf-simple-workflow-service&quot;&gt;SWF Simple Workflow Service&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use if you need: &lt;code&gt;external signals to intervene&lt;/code&gt;, or child processes to &lt;code&gt;return values to parent processes&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For decoupled architectures.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Provides useful guarantees around task assignments. It ensures that a task is never duplicated and is assigned only once.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-backup&quot;&gt;AWS Backup&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Centralized backup service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A backup plan is a policy expression that defines when and how you want to back up your AWS resources.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-batch&quot;&gt;AWS Batch&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Multi-node parallel jobs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-parallelcluster&quot;&gt;AWS ParallelCluster&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Cluster management tool to deploy HPC, automate creation of vpc, subnet, cluster type etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;ad-connector&quot;&gt;AD Connector&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;If you only need to allow your on-premises users to log in to AWS applications and services with their Active Directory credentials.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;aws-managed-microsoft-ad&quot;&gt;AWS Managed Microsoft AD&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Configure a trust relationship between AWS Managed Microsoft AD in the AWS Cloud and your existing on-premises Microsoft Active Directory, providing users and groups with access to resources in either domain, using single sign-on (SSO).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;data-transfer&quot;&gt;Data Transfer&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;No charge for inbound data transfer across all services in all Regions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data transfer from AWS to the internet is charged per service, with rates specific to the originating Region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There is a charge for data transfer across Regions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data transfer within the same Availability Zone is free.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data transfer over a VPC peering connection that stays within an Availability Zone is free. Data transfer over a VPC peering connection that crosses Availability Zones will incur a data transfer charge for ingress/egress traffic. If the VPCs are peered across Regions, standard inter-Region data transfer charges will apply.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data processing charges apply for each GB sent from a VPC, Direct Connect, or VPN to Transit Gateway.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Direct Connect &amp;amp; VPN also incur charges for data flowing out of AWS.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;important-ports&quot;&gt;Important ports:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;FTP: 21&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SSH: 22&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SFTP: 22 (same as SSH)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;HTTP: 80&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;HTTPS: 443&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RDP: TCP 3389 and UDP 3389&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;rds-databases-ports&quot;&gt;RDS Databases ports:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;PostgreSQL: 5432&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MySQL: 3306&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Oracle RDS: 1521&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MSSQL Server: 1433&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MariaDB: 3306 (same as MySQL)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Aurora: 5432 (if PostgreSQL compatible) or 3306 (if MySQL compatible)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;disaster-recovery-in-aws&quot;&gt;Disaster Recovery in AWS&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;RPO: Recovery Point Objective -&amp;gt; how much data loss we are willing to recover&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RTO: Recovery Time Objective -&amp;gt; downtime between disaster and RTO&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>aws</category><category>certifications</category></item><item><title>Exploring AWS Serverless Architectures</title><link>https://devopsmadness.com/blog/exploring-aws-serverless-architectures</link><guid isPermaLink="true">https://devopsmadness.com/blog/exploring-aws-serverless-architectures</guid><description>Common patterns and Serverless Architectures on AWS</description><pubDate>Sun, 21 Mar 2021 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;This article contains several patterns and common architectural choices for building software solutions leveraging mostly AWS serverless services.&lt;/p&gt;
&lt;h2 id=&quot;why-serverless&quot;&gt;Why Serverless&lt;/h2&gt;
&lt;p&gt;Serverless services help us abstract our computing infrastructure so that we can focus solely on business logic.&lt;/p&gt;
&lt;p&gt;Even more, When our app is not running we don’t pay for idle server time, but only for what we use. Serverless services scale horizontally &amp;amp; auto-magically and we don’t have to guess our capacity needs upfront.&lt;/p&gt;
&lt;p&gt;We can deploy to production quickly, benefiting from zero infrastructure provisioning &amp;amp; maintenance that these services offer.&lt;/p&gt;
&lt;p&gt;These services have built-in fault tolerance and support feature deployments without downtime.&lt;/p&gt;
&lt;h2 id=&quot;transition-to-serverless&quot;&gt;Transition to Serverless&lt;/h2&gt;
&lt;p&gt;In order to enjoy all these benefits, we should try to transition from traditional monolith to microservices with &lt;code&gt;event-driven architectures&lt;/code&gt;. This isn’t always an easy transition and requires some changes in how we approach our applications and infrastructure.&lt;/p&gt;
&lt;p&gt;We need to start thinking about how we can start decoupling the different services from our monolith and separate responsibilities and roles between them. In the process of “thinking” Serverless, we have to understand tradeoffs for our design choices and use common patterns for event-Driven Architectures &amp;amp; microservices.&lt;/p&gt;
&lt;p&gt;Serverless apps use technology-agnostic APIs with &lt;code&gt;decoupled communication&lt;/code&gt;. Code is executed in response to events where state and code are decoupled. Integration between components is done via messaging to create asynchronous communication flows.&lt;/p&gt;
&lt;p&gt;From monolith to microservices, use the concepts of Domain-driven design to untangle highly coupled applications. The main idea is that we establish a bounded context for each microservice and agree on boundaries between teams &amp;amp; responsibilities.&lt;/p&gt;
&lt;p&gt;This way each component can scale independently. Furthermore, your schedule-based tasks could be transformed easily to Lambda functions that run on a schedule for example.&lt;/p&gt;
&lt;h2 id=&quot;example-serverless-architectures&quot;&gt;Example Serverless Architectures&lt;/h2&gt;
&lt;p&gt;Let’s take a look at how we can leverage and combine different AWS Services to build Serverless Architectures.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/serverless_aws_architectures/add_sqs.png&quot; alt=&quot;Serverless pattern: HTTP requests pass from API Gateway into an SQS queue that a Lambda function consumes, writing to DynamoDB&quot;/&gt;&lt;/p&gt;
&lt;p&gt;In the above example for a &lt;code&gt;RESTful microservice&lt;/code&gt;, the order of information starts with an API call over HTTP. &lt;code&gt;Amazon API Gateway&lt;/code&gt; handles the requests and responses accordingly and triggers &lt;code&gt;Lambda&lt;/code&gt; that executes the business logic and stores the result in &lt;code&gt;DynamoDB&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In order to decouple the synchronous connection between Amazon Gateway and Lambda Function, we could use a message queue, &lt;code&gt;SQS&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;That has multiple advantages like leveraging built-in retry mechanisms if something fails, the abstraction of Lambda running time, taking care of messages that can’t be processed at the moment, the possibility to add an extra Dead-Letter Queue for messages that fail continuously.&lt;/p&gt;
&lt;p&gt;In cases that we have to chain multiple Lambda Functions together we can use &lt;code&gt;Step Functions&lt;/code&gt; to orchestrate Lambda workflows and make our life easier since we keep orchestration out of our code, Lambdas are triggered automatically and the state and logs of each step are kept.&lt;/p&gt;
&lt;p&gt;This way the Lambda functions are focused only on business logic and Step Functions control the sequence and timing of each task and the state of the whole workflow.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/serverless_aws_architectures/sp.png&quot; alt=&quot;Hand-drawn serverless pattern: an HTTP request enters API Gateway, is buffered in an SQS queue, and a Lambda function starts a Step Functions state machine that writes to DynamoDB&quot;/&gt;&lt;/p&gt;
&lt;p&gt;For situations where we need to provide updates to a client regarding the status of a job, we could use a service like &lt;code&gt;AWS AppSync&lt;/code&gt; to listen for updates using for example WebSockets with GraphQL subscriptions.&lt;/p&gt;
&lt;p&gt;AWS AppSync is a fully managed service that makes it easy to develop GraphQL APIs by handling the heavy lifting of securely connecting to data sources like AWS DynamoDB, Lambda, and more.&lt;/p&gt;
&lt;p&gt;With AWS AppSync, clients can automatically subscribe and receive status updates as they occur. This is a great pattern when data drives the user interface and is ideal for data that is streaming or may yield more than a single response.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/serverless_aws_architectures/app_sync.png&quot; alt=&quot;GraphQL serverless pattern: the client calls AWS AppSync, which invokes a Lambda function that triggers a Step Functions state machine writing to DynamoDB, with results returned through AppSync&quot;/&gt;&lt;/p&gt;
&lt;p&gt;For serverless data processing, we can leverage Amazon Kineses streaming services to ingest and process large volumes of data in near real-time.&lt;/p&gt;
&lt;p&gt;For example, we could use Amazon Kinesis Data Firehose to send data and automatically deliver them to the destination that we specify, for example S3.&lt;/p&gt;
&lt;p&gt;We could also configure Amazon Kinesis Data Firehose to perform data transformation via specified Lambda Functions as the records are processed, to streamline our architecture. Finally, we could use a tool like Amazon Athena to perform analysis on our stored data.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/serverless_aws_architectures/kinesis_data_firehose.png&quot; alt=&quot;Serverless ingestion pattern: clients call API Gateway, Kinesis Data Firehose transforms records with a Lambda function and delivers them to S3, where Athena queries them&quot;/&gt;&lt;/p&gt;
&lt;p&gt;A similar architecture for a data pipeline could use &lt;code&gt;Kinesis Data streams&lt;/code&gt; to get big data in real-time and leverage Kinesis Data Firehose to offload our data in an Amazon ingestion S3 bucket.&lt;/p&gt;
&lt;p&gt;The S3 events in our ingestion bucket could be used to send messages to an SQS queue that triggers a Lambda. This Lambda triggers Amazon Athena to query the ingestion S3 bucket and stores the results in a reporting S3 bucket.&lt;/p&gt;
&lt;p&gt;Finally, we could use &lt;code&gt;Amazon QuickSight&lt;/code&gt; to visualize our data from the reporting S3 bucket&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/serverless_aws_architectures/data_pipeline.png&quot; alt=&quot;Serverless data pipeline: a producer sends events through Kinesis Data Streams and Firehose with a transform Lambda into an S3 ingestion bucket, SQS and Lambda hand them to Athena, and results land in a reporting bucket visualized with QuickSight&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Similar to the pattern we saw earlier (API Gateway, Lambda, SQS, DynamoDB) we can achieve a serverless web application architecture by combining it with &lt;code&gt;Amazon Cognito&lt;/code&gt; for authentication, and Amazon S3 and &lt;code&gt;Amazon CloudFront&lt;/code&gt; to quickly serve up static content from anywhere.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/serverless_aws_architectures/webapp.png&quot; alt=&quot;Serverless web app architecture: the client authenticates with Cognito, calls API Gateway into SQS and Lambda backed by DynamoDB, and static assets are served from S3 through CloudFront&quot;/&gt;&lt;/p&gt;
&lt;p&gt;That’s all folks, hope you enjoyed this. We explored Serverless options, architectures, and common patterns on AWS and explored how we can use and combine different services to benefit from the advantages or Serverless. Let’s start building!&lt;/p&gt;</content:encoded><category>aws</category><category>devops-tooling</category></item><item><title>CKA - Kubernetes Certified Administrator Cheatsheet</title><link>https://devopsmadness.com/blog/cka-kubernetes-certified-administrator-cheatsheet</link><guid isPermaLink="true">https://devopsmadness.com/blog/cka-kubernetes-certified-administrator-cheatsheet</guid><description>Gathered all my notes to create a CKA cheatsheet.</description><pubDate>Sun, 17 Jan 2021 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;This material was gathered during my preparation for the CKA certification exam. I created and curated this cheatsheet with useful commands and information that will be handy to review before taking the exam.&lt;/p&gt;
&lt;p&gt;If you want to know how to prepare for the CKA exam, check my &lt;a href=&quot;/blog/how-to-pass-cka-kubernetes-certified-administrator&quot;&gt;How to pass CKA&lt;/a&gt; post.&lt;/p&gt;
&lt;h2 id=&quot;core-concepts&quot;&gt;Core Concepts&lt;/h2&gt;
&lt;p&gt;View resources in namespace &lt;code&gt;dev&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get pods -n dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;View all pods in all namespaces:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get pods -A&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;View all resources in all namespaces:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get all -A&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Generate a pod yaml file with &lt;code&gt;nginx&lt;/code&gt; image and &lt;code&gt;label env=prod&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl run nginx --image=nginx --labels=env=prod --dry-run=client -o yaml &gt; nginx_pod.yaml&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Delete a pod &lt;code&gt;nginx&lt;/code&gt; fast:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl delete pod nginx --grace-period 0 --force&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Generate Deployment yaml file:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl create deploy --image=nginx nginx --dry-run=client -o yaml &gt; nginx-deployment.yaml&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Access a service &lt;code&gt;test-service&lt;/code&gt; in a different namespace &lt;code&gt;dev&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;test-service.dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create a service for a pod &lt;code&gt;valid-pod&lt;/code&gt;, which serves on port 444 with the name &lt;code&gt;frontend&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl expose pod valid-pod --port=444 --name=frontend&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Recreate the contents of a yaml file:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl replace --force -f nginx.yaml&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Edit details of a deployment &lt;code&gt;nginx&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl edit deploy nginx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Set image of a deployment &lt;code&gt;nginx&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl set image deploy nginx nginx=nginx:1.18&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Scale deployment &lt;code&gt;nginx&lt;/code&gt; to 4 replicas and &lt;code&gt;record&lt;/code&gt; the action:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl scale deploy nginx --repliacs=4 --record&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Get events in current namespace:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get events&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;scheduling&quot;&gt;Scheduling&lt;/h2&gt;
&lt;p&gt;Get pods with their labels:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get pods --show-labels&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Get the pods that are labeled &lt;code&gt;env=dev&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get pods -l env=dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Get taints of node &lt;code&gt;node01&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl describe node node01 | grep -i Taints:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Label node &lt;code&gt;node01&lt;/code&gt; with label &lt;code&gt;size=small&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl label nodes node01 size=small&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Default static pods path:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/etc/kubernetes/manifests&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check pod nginx logs:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl logs nginx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check pod logs with multiple containers:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl logs &amp;#x3C;pod_name&gt; -c &amp;#x3C;container_name&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;monitoring&quot;&gt;Monitoring&lt;/h2&gt;
&lt;p&gt;Check node resources usage:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl top node&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check pod and their containers resource usage:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl top pod --containers=true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;application-lifecycle-management&quot;&gt;Application Lifecycle Management&lt;/h2&gt;
&lt;p&gt;Check rollout status of deployment &lt;code&gt;app&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl rollout status deployment/app&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check rollout history of deployment &lt;code&gt;app&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl rollout history deployment/app&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Undo rollout:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl rollout undo deployment/app&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create configmap &lt;code&gt;app-config&lt;/code&gt; with &lt;code&gt;env=dev&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl create configmap app-config --from-literal=env=dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create secret &lt;code&gt;app-secret&lt;/code&gt; with &lt;code&gt;pass=123&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl create secret generic app-secret --from-literal=pass=123&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;cluster-maintenance&quot;&gt;Cluster Maintenance&lt;/h2&gt;
&lt;p&gt;Drain node &lt;code&gt;node01&lt;/code&gt; of all workloads:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl drain node01&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Make the node schedulable again:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl uncordon node01&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Upgrade cluster to 1.18 with kubeadm:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubeadm upgrade plan&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get upgrade -y kubeadm=1.18.0-00&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubeadm upgrade apply v1.18.0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get upgrade -y kubelet=1.18.0-00&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl restart kubelet&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Backup etcd:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;export ETCDCTL_API=3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;etcdctl \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;--endpoints=https://127.0.0.1:2379 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;--cacert=/etc/kubernetes/pki/etcd/ca.crt \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;--cert=/etc/kubernetes/pki/etcd/server.crt \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;--key=/etc/kubernetes/pki/etcd/server.key \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;snapshot save /tmp/etcd-backup.db&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Restore etcd:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ETCDCTL_API=3 etcdctl snapshot restore /tmp/etcd-backup.db --data-dir /var/lib/etcd-backup&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After edit &lt;code&gt;/etc/kubernetes/manifests/etcd.yaml&lt;/code&gt; and change &lt;code&gt;/var/lib/etcd&lt;/code&gt; to &lt;code&gt;/var/lib/etcd-backup&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;security&quot;&gt;Security&lt;/h2&gt;
&lt;p&gt;Create service account &lt;code&gt;sa_1&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl create serviceaccount sa_1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check kube-apiserver certificate details:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;openssl x509 -in /etc/kubernetes/pki/apiserver.crt -text -noout&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Approve certificate singing request for user john:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl certificate approve john&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check the current kubeconfig file:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl config view&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check current context:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl config current-context&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use context dev-user@dev:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl config use-context prod-user@production&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Validate if user &lt;code&gt;john&lt;/code&gt; can create deployments:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl auth can-i create deployments --as john&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create role &lt;code&gt;dev&lt;/code&gt; to be able to create secrets:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl create role dev --verb=create --resource=secret&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bind the role &lt;code&gt;dev&lt;/code&gt; to user &lt;code&gt;john&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl create rolebinding dev-john --role dev --user john&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check namespaced resources:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl api-resources --namespaced=true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;/h2&gt;
&lt;p&gt;View all the kube-system related pods:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get pods -n kube-system&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check if all nodes are in &lt;code&gt;ready&lt;/code&gt; state:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get nodes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check memory, cpu and disk usage on node:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;df -h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;top&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check status of &lt;code&gt;kubelet&lt;/code&gt; service on node:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl status kubelet&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check &lt;code&gt;kubelet&lt;/code&gt; service logs:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo journalctl -u kubelet&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;View kubelet service details:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ps -aux | grep kubelet&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check cluster info:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl cluster-info&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;gather-info&quot;&gt;Gather info&lt;/h2&gt;
&lt;p&gt;Find pod CIDR:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl describe node | less -p PodCIDR&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Get pods in all namespaces sorted by creation timestamp:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get pod -A --sort-by=.metadata.creationTimestamp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Find the service CIDR of &lt;code&gt;node-master&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ssh node0master&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /etc/kubernetes/manifests/kube-apiserver.yaml | grep range&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Find which CNI plugin is used on &lt;code&gt;node-master&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls /etc/cni/net.d/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Find events ordered by creation timestamp:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get events -A --sort-by=.metadata.creationTimestamp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Find internal IP of all nodes:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl get nodes -o jsonpath=&apos;{.items[*].status.addresses[?(@.type==&quot;InternalIP&quot;)].address}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;general-notes&quot;&gt;General notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To create a daemonset, use &lt;code&gt;kubectl create deploy&lt;/code&gt; command to create a .yaml file and then change the &lt;code&gt;kind&lt;/code&gt; and remove &lt;code&gt;replicas&lt;/code&gt; &amp;amp; &lt;code&gt;strategy&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To find the static pod manifest path, check the exec command of &lt;code&gt;kubelet service&lt;/code&gt; or &lt;code&gt;staticPodPath&lt;/code&gt; parameter of kubelet’s config file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To create a static pod, place a yaml definition file in the &lt;code&gt;staticPodPath&lt;/code&gt; directory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To identify static pods look for the suffix &lt;code&gt;-&amp;lt;node_name&amp;gt;&lt;/code&gt; on pods.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To add a new scheduler copy the existing one and add to the container’s command the flags&lt;code&gt;--leader-elect=false&lt;/code&gt; and &lt;code&gt;--scheduler-name=my-scheduler-name&lt;/code&gt;. To use the new scheduler under &lt;code&gt;spec&lt;/code&gt; of a pod definition file specify the option &lt;code&gt;schedulerName&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To add a default command to a pod use &lt;code&gt;command&lt;/code&gt; that overrides the default &lt;code&gt;ENTRYPOINT&lt;/code&gt; from Dockerfile. Use &lt;code&gt;args&lt;/code&gt; to override the Dockerfile &lt;code&gt;CMD&lt;/code&gt; command for the commmand’s extra parameters.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>kubernetes</category><category>certifications</category></item><item><title>How to pass CKA - Kubernetes Certified Administrator</title><link>https://devopsmadness.com/blog/how-to-pass-cka-kubernetes-certified-administrator</link><guid isPermaLink="true">https://devopsmadness.com/blog/how-to-pass-cka-kubernetes-certified-administrator</guid><description>How to prepare for CKA.</description><pubDate>Wed, 13 Jan 2021 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;Just passed the CKA - Kubernetes Certified Administrator certification exam in January with the new format and I’ll share my preparation with you. Follow this recipe and you will be ready to get your hands on CKA too!&lt;/p&gt;
&lt;h2 id=&quot;study-material--strategy&quot;&gt;Study material &amp;amp; strategy&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Get this course &lt;a href=&quot;https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/&quot;&gt;https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/&lt;/a&gt; and &lt;code&gt;go over all the videos at least once&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are a lot of details so maybe you want to keep notes. If you dont feel like taking notes, check my &lt;a href=&quot;/blog/cka-kubernetes-certified-administrator-cheatsheet&quot;&gt;CKA Cheatsheet and study notes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Complete successfully &lt;code&gt;all the practice tests along with the mock exams at least 3 times&lt;/code&gt;.&lt;/p&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;While doing the practice tests try to &lt;code&gt;use only the official documentation&lt;/code&gt; to simulate the real exam. In the examination, you’re only allowed to have one other browser tab open with the Kubernetes documentation. These pages only:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://kubernetes.io/docs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://github.com/kubernetes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://kubernetes.io/blog&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That means for example you can’t access &lt;code&gt;discuss.kubernetes.io&lt;/code&gt;. Pay attention to that and try to complete the practice tests and exams only with the allowed resources.&lt;/p&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Bookmark documentation pages&lt;/code&gt; you find useful while solving the practice tests.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify you have read at least once the &lt;a href=&quot;https://kubernetes.io/docs/reference/kubectl/cheatsheet/&quot;&gt;kubectl-cheatsheet&lt;/a&gt; as it can be very useful for some questions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pay extra attention to: &lt;code&gt;etcd backup/restore&lt;/code&gt;, &lt;code&gt;Persistent Volumes &amp;amp; Claims and how to configure them&lt;/code&gt;, &lt;code&gt;kubeadm upgrade&lt;/code&gt;, &lt;code&gt;RBAC&lt;/code&gt; , &lt;code&gt;Network Policies&lt;/code&gt;, &lt;code&gt;Ingress&lt;/code&gt;, &lt;code&gt;DNS for services and pods&lt;/code&gt;, &lt;code&gt;Advanced and Manual scheduling&lt;/code&gt;, &lt;code&gt;How to debug a broken cluster&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify you can answer all the questions from this &lt;a href=&quot;https://github.com/dgkanatsios/CKAD-exercises&quot;&gt;repo&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When you feel ready, you can try this practice test &lt;a href=&quot;https://killer.sh/&quot;&gt;killer sh&lt;/a&gt;. It costs an extra amount but I found the material super useful as the last step to validate my level of readiness. This exam is more difficult than the actual one so you may fail the first time. Study the questions, check the answer &amp;amp; tips and retry.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Before the exam read: &lt;a href=&quot;https://docs.linuxfoundation.org/tc-docs/certification/lf-candidate-handbook&quot;&gt;Handbook&lt;/a&gt;, &lt;a href=&quot;https://docs.linuxfoundation.org/tc-docs/certification/tips-cka-and-ckad&quot;&gt;Important Tips&lt;/a&gt;, &lt;a href=&quot;https://docs.linuxfoundation.org/tc-docs/certification/faq-cka-ckad&quot;&gt;FAQ&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To save some time during the exam you can set in your terminal:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;alias k=kubectl&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;export do=&quot;--dry-run=client -o yaml&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After completing these steps I guarantee that you’ll feel quite confident!&lt;/p&gt;
&lt;p&gt;May the kubectl be with you!&lt;/p&gt;</content:encoded><category>kubernetes</category><category>certifications</category></item><item><title>Manage Docker Storage &amp; Volumes</title><link>https://devopsmadness.com/blog/manage-docker-storage-volumes</link><guid isPermaLink="true">https://devopsmadness.com/blog/manage-docker-storage-volumes</guid><description>Intro to volumes and storage.</description><pubDate>Fri, 08 Jan 2021 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Overview of how docker storage &amp;amp; volumes work and how to manage them.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_4/docker_logo.png&quot; alt=&quot;Docker logo: a whale carrying shipping containers&quot;/&gt;&lt;/p&gt;
&lt;p&gt;In this fourth part of the &lt;code&gt;Dockerventure&lt;/code&gt; series, we are going to focus on how docker handles storage, how it manages container file systems, and showcase how we can effectively manage our data with volumes.&lt;/p&gt;
&lt;p&gt;Check here for the first 3 parts: &lt;a href=&quot;/blog/exploring-the-docker-world&quot;&gt;Intro Docker&lt;/a&gt;, &lt;a href=&quot;/blog/taming-the-dockerfile&quot;&gt;Dockerfiles&lt;/a&gt;, &lt;a href=&quot;/blog/docker-ninja-tricks&quot;&gt;Useful Docker commands&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;default-docker-file-system&quot;&gt;Default Docker File System&lt;/h2&gt;
&lt;p&gt;By default at creation time, docker creates the directory &lt;code&gt;/var/lib/docker&lt;/code&gt; where it stores all its data regarding containers, images, volumes, etc.&lt;/p&gt;
&lt;p&gt;When a new container is started, a new &lt;code&gt;read-write container layer&lt;/code&gt; is added on top of the &lt;code&gt;read-only image layers&lt;/code&gt; that were created during the build phase.&lt;/p&gt;
&lt;p&gt;This container layer exists only while the container exists and when the container is killed this layer along with all the changes we made on top is lost.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_4/docker_container_layer.png&quot; alt=&quot;Diagram of the same server.py file in two layers: the read-only image layer and a modified copy in the read-write container layer&quot;/&gt;&lt;/p&gt;
&lt;p&gt;For example, if I bash inside my docker container that holds the &lt;code&gt;server.py&lt;/code&gt; file modifies it, and saves it, a copy of this file is saved on the &lt;code&gt;read-write temporary container layer&lt;/code&gt; while the &lt;code&gt;image read-only layer&lt;/code&gt; isn’t affected.&lt;/p&gt;
&lt;h2 id=&quot;persist-data-with-volumes&quot;&gt;Persist data with volumes&lt;/h2&gt;
&lt;p&gt;To persist newly created data beyond the container’s lifetime, we can use &lt;code&gt;docker volumes&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To do this we can create a docker volume by executing &lt;code&gt;docker volume create myvolume&lt;/code&gt;. This automatically creates a directory under &lt;code&gt;/var/lib/docker/volumes/myvolume&lt;/code&gt; in our host.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_4/docker_volumes.png&quot; alt=&quot;Diagram of docker volume mounting: the container’s /var/lib/postgresql directory in the read-write container layer is mounted to the myvolume volume on the host, above the read-only image layer&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Let’s use this persistent volume while running a container.&lt;/p&gt;
&lt;p&gt;Let’s say for example that we would like to spawn a &lt;code&gt;postgres database&lt;/code&gt; container. We would like to preserve our db data even if for example our container stops, restarts, or gets killed.&lt;/p&gt;
&lt;p&gt;To do this let’s mount the postgres default &lt;code&gt;/var/lib/postgresql&lt;/code&gt; directory inside the postgres container to my newly created &lt;code&gt;myvolume&lt;/code&gt; by running:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -v&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; myvolume:/var/lib/postgres&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; postgres&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that when specifying the &lt;code&gt;-v&lt;/code&gt; option we define the name of the volume on the left side of &lt;code&gt;:&lt;/code&gt; and the path inside the container on the right side.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;-v&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;volume_nam&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;path_inside_the_containe&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;r&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now the directory &lt;code&gt;/var/lib/postgresql&lt;/code&gt; inside the container is mounted on our &lt;code&gt;myvolume&lt;/code&gt; volume on our host under &lt;code&gt;/var/lib/docker/volumes/myvolume&lt;/code&gt; and any data written there will be persisted.&lt;/p&gt;
&lt;p&gt;This is called &lt;code&gt;volume mounting&lt;/code&gt; as we are mounting one of the docker volumes.&lt;/p&gt;
&lt;p&gt;Another option is to mount an already existing host directory to a directory inside the container.&lt;/p&gt;
&lt;p&gt;For example, let’s say we already have a directory configured with lots of capacity to store our db data under &lt;code&gt;/db_data&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In this case, instead of specifying a volume name, we will specify a path on our host:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -v&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; /db_data:/var/lib/postgres&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; postgres&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is called &lt;code&gt;bind mounting&lt;/code&gt; and in this case, after the &lt;code&gt;-v&lt;/code&gt; option we define the path on the host on the left side of &lt;code&gt;:&lt;/code&gt; and the path inside the container on the right side.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;-v&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;path_on_the_hos&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;t&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;path_inside_the_containe&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;r&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Something to note here is that using &lt;code&gt;-v&lt;/code&gt; is the old fashioned way while there is a new more verbose way to define mounts.&lt;/p&gt;
&lt;p&gt;The new preferred way is to use the &lt;code&gt;--mount&lt;/code&gt; flag and define specifically the type of the mount. The last example using this option is transformed like this:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --mount&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; type=bind,source=/db_data,target=/var/lib/postgres&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; postgres&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;storage-drivers&quot;&gt;Storage drivers&lt;/h2&gt;
&lt;p&gt;All the above operations fall into the responsibility of storage drivers. Storage drivers allow us to create data in the writable layer of our container.&lt;/p&gt;
&lt;p&gt;There is a list of storage drivers and docker picks the best storage driver automatically available on our system. These drivers have different characteristics, and selecting a specific one depends on our workload’s use case and needs.&lt;/p&gt;
&lt;p&gt;For a detailed comparison and info check the official documentation &lt;a href=&quot;https://docs.docker.com/storage/storagedriver/select-storage-driver/&quot;&gt;select-storage-driver&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To check what is the storage driver used in your system run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; info&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;The fourth part of our Dockerventure around &lt;code&gt;storage&lt;/code&gt; and &lt;code&gt;volumes&lt;/code&gt; has come to an end. We discussed how docker handles data, filesystems, volumes, and layers.&lt;/p&gt;
&lt;p&gt;Showed examples of how to use &lt;code&gt;volumes&lt;/code&gt;, the 2 different types of mounts &lt;code&gt;volume mounting&lt;/code&gt; and &lt;code&gt;bind mounting&lt;/code&gt; and in the end, had a quick look on docker &lt;code&gt;storage drivers&lt;/code&gt;.&lt;/p&gt;</content:encoded><category>containers</category><category>devops-tooling</category></item><item><title>Docker Ninja Tricks</title><link>https://devopsmadness.com/blog/docker-ninja-tricks</link><guid isPermaLink="true">https://devopsmadness.com/blog/docker-ninja-tricks</guid><description>Docker basic commands.</description><pubDate>Thu, 07 Jan 2021 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Useful docker commands to have in your arsenal.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_3/docker_logo.png&quot; alt=&quot;Docker logo: a whale carrying shipping containers&quot;/&gt;&lt;/p&gt;
&lt;p&gt;So far we’ve seen the basic functionality of Docker, had a detailed look on Dockerfiles, and common commands used to &lt;code&gt;manage/view/build/share&lt;/code&gt; containers and images.&lt;/p&gt;
&lt;p&gt;In this post, I am going to try to gather some other useful Docker commands that will make our life easier operating dockerized systems.&lt;/p&gt;
&lt;h2 id=&quot;usefull-docker-commands&quot;&gt;Usefull Docker Commands&lt;/h2&gt;
&lt;p&gt;In the previous 2 parts, we ’ve already seen:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;docker run&lt;/code&gt; &lt;code&gt;docker ps&lt;/code&gt; &amp;amp; &lt;code&gt;docker ps -a&lt;/code&gt; &lt;code&gt;docker stop&lt;/code&gt; &lt;code&gt;docker start&lt;/code&gt; &lt;code&gt;docker logs&lt;/code&gt; &lt;code&gt;docker help&lt;/code&gt; &lt;code&gt;docker login&lt;/code&gt; &lt;code&gt;docker rm&lt;/code&gt; &lt;code&gt;docker build&lt;/code&gt; &lt;code&gt;docker images&lt;/code&gt; &lt;code&gt;docker push&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So I’ll move forward to other more sneaky commands.&lt;/p&gt;
&lt;p&gt;If you want to check how the previous Docker commands can be used in action check my 2 previous posts &lt;a href=&quot;/blog/exploring-the-docker-world&quot;&gt;Intro to Docker&lt;/a&gt; and deep dive on &lt;a href=&quot;/blog/taming-the-dockerfile&quot;&gt;Dockerfiles&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;docker-version&quot;&gt;docker –version&lt;/h3&gt;
&lt;p&gt;Quite self-explanatory, shows the currently installed version.&lt;/p&gt;
&lt;h3 id=&quot;docker-rmi&quot;&gt;docker rmi&lt;/h3&gt;
&lt;p&gt;Used to delete docker images. More or less similar to &lt;code&gt;docker rm&lt;/code&gt; but for images instead of containers.&lt;/p&gt;
&lt;h3 id=&quot;docker-exec&quot;&gt;docker exec&lt;/h3&gt;
&lt;p&gt;This command is used to execute a command on a running container. The most common use case is to access a running container to debug something. &lt;code&gt;docker exec -it &amp;lt;cotnainer_id&amp;gt; bash&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;docker-inspect&quot;&gt;docker inspect&lt;/h3&gt;
&lt;p&gt;Used to get detailed low-level information on Docker objects like containers and images. If you are looking for details like Ip addresses, volumes, stuff around networking, image layers, etc this should be your first place to look.&lt;/p&gt;
&lt;h3 id=&quot;docker-restart&quot;&gt;docker restart&lt;/h3&gt;
&lt;p&gt;Quite self-explanatory, restarts a docker container.&lt;/p&gt;
&lt;h3 id=&quot;docker-system-prune&quot;&gt;docker system prune&lt;/h3&gt;
&lt;p&gt;Used for housekeeping and cleaning in order to remove all unused containers, networks, and images, combine with &lt;code&gt;--volumes&lt;/code&gt; to clean volumes too.&lt;/p&gt;
&lt;h3 id=&quot;docker-top&quot;&gt;docker top&lt;/h3&gt;
&lt;p&gt;Display the running processes of a container.&lt;/p&gt;
&lt;h3 id=&quot;docker-volume&quot;&gt;docker volume&lt;/h3&gt;
&lt;p&gt;Manage volumes by combining with the subcommands &lt;code&gt;create&lt;/code&gt; , &lt;code&gt;inspect&lt;/code&gt; &lt;code&gt;ls&lt;/code&gt; &lt;code&gt;prune&lt;/code&gt;, &lt;code&gt;rm&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;docker-stats&quot;&gt;docker stats&lt;/h3&gt;
&lt;p&gt;Get a live stream of resource usage of your running containers. Quite useful for debugging purposes as it shows info about CPU, Mem, Net I/O, Block I/O , Pids.&lt;/p&gt;
&lt;h3 id=&quot;docker-network&quot;&gt;docker network&lt;/h3&gt;
&lt;p&gt;Manage docker networking by combining with the subcommands &lt;code&gt;create&lt;/code&gt; , &lt;code&gt;connect&lt;/code&gt;, &lt;code&gt;disconnect&lt;/code&gt;, &lt;code&gt;inspect&lt;/code&gt;, &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;prune&lt;/code&gt;, &lt;code&gt;rm&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Check the next part regarding Docker Storage &lt;a href=&quot;/blog/manage-docker-storage-volumes&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content:encoded><category>containers</category><category>devops-tooling</category></item><item><title>Taming the Dockerfile</title><link>https://devopsmadness.com/blog/taming-the-dockerfile</link><guid isPermaLink="true">https://devopsmadness.com/blog/taming-the-dockerfile</guid><description>Dockerfile basics and usage showcase</description><pubDate>Tue, 05 Jan 2021 00:00:00 GMT</pubDate><content:encoded>
&lt;h2 id=&quot;taming-the-dockerfile-beast---dockerventure-part-2&quot;&gt;Taming the Dockerfile beast - Dockerventure Part 2&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Build and share your own managed docker images.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_2/docker_logo.png&quot; alt=&quot;Docker logo: a whale carrying shipping containers&quot;/&gt;&lt;/p&gt;
&lt;p&gt;In this second part of the &lt;code&gt;Dockerventure&lt;/code&gt; series, we are going to focus on how we can define our own custom images with &lt;code&gt;Dockerfiles&lt;/code&gt;, how we can build those images, and publish them in &lt;code&gt;Dockerhub&lt;/code&gt; so we can share them with the rest of the world!&lt;/p&gt;
&lt;p&gt;If you missed my intro to &lt;code&gt;Docker&lt;/code&gt; click here &lt;a href=&quot;/blog/exploring-the-docker-world&quot;&gt;Exploring the Docker world&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;docker-images--dockerfile-basics&quot;&gt;Docker images &amp;amp; Dockerfile basics&lt;/h2&gt;
&lt;p&gt;In Docker’s world, the image definition is described inside a file called &lt;code&gt;Dockerfile&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The Dockerfile describes how to assemble an environment for a container that contains all the necessary information and metadata on how to run it based on this image.&lt;/p&gt;
&lt;p&gt;To containerize our applications, we have to write Dockerfiles that define step by step how are images are built.&lt;/p&gt;
&lt;p&gt;Let’s look at one Dockerfile and discuss it’s building blocks. This Dockerfile defines an image that basically sets up a python flask server and shows a message with a color that we picked.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;dockerfile&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; python:3.7-alpine&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# set env var color&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;ENV&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; color=blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# set working directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;WORKDIR&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; /server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# copy the dependencies file to the working directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;COPY&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; requirements.txt .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# install dependencies&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;RUN&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pip install -r requirements.txt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# copy the script file to the working directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;COPY&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; server.py .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;CMD&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;python&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;./server.py&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;The order&lt;/code&gt; of the commands in a Dockerfile matters as they are executed &lt;code&gt;top-down&lt;/code&gt; and each one of them is considered as &lt;code&gt;one layer&lt;/code&gt; of our image.&lt;/p&gt;
&lt;p&gt;For reference, this is our python file &lt;code&gt;server.py&lt;/code&gt; that outputs the selected color and we would like to dockerize:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; flask &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; Flask&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; os&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;server &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; Flask(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;__name__&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;color &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; os.environ[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;color&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;@server.route&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; hey&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;Hey there my favourite color is: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;{}&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;!&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.format(color)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; __name__&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;__main__&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;   server.run(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#E36209;--shiki-dark:#FFAB70&quot;&gt;host&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;0.0.0.0&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;from&quot;&gt;FROM&lt;/h3&gt;
&lt;p&gt;Let’s start with the &lt;code&gt;FROM&lt;/code&gt; command which is required in every Dockerfile. It’s the initial image on top of which we start to build our custom one.&lt;/p&gt;
&lt;p&gt;Can be either a minimum Linux distribution or some image configured already with the basic tools we need for our application. In our case, since we are going to run a python script, we used &lt;code&gt;python:3.7-alpine&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;env&quot;&gt;ENV&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;ENV&lt;/code&gt; refers to an environment variable and is one of the ways to set them. These environment variables are used extensively to inject key/value pairs for building and running containers.&lt;/p&gt;
&lt;p&gt;Environment variables are quite handy for these use cases as they work on every os, config, environment. In our case, we set the &lt;code&gt;color&lt;/code&gt; we picked.&lt;/p&gt;
&lt;h3 id=&quot;run&quot;&gt;RUN&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;RUN&lt;/code&gt; command is used to execute shell commands inside the container while it’s building it. We use &lt;code&gt;RUN&lt;/code&gt; to create files, folders, install dependencies, run shell scripts, and various other tasks that we would like to run inside our container at creation time to prepare it.&lt;/p&gt;
&lt;p&gt;To combine multiple commands with the same &lt;code&gt;RUN&lt;/code&gt; statement you can use &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;. This way we can include multiple commands in a single layer in our image.&lt;/p&gt;
&lt;h3 id=&quot;workdir&quot;&gt;WORKDIR&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;WORKDIR&lt;/code&gt; is changing the working directory inside our container.&lt;/p&gt;
&lt;h3 id=&quot;copy&quot;&gt;COPY&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;COPY&lt;/code&gt; is used to copy files inside the container. This is useful to transfer for example executable files and various other files used by the container. In our case, we copy our python script along with its dependencies definitions.&lt;/p&gt;
&lt;h3 id=&quot;cmd&quot;&gt;CMD&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;CMD&lt;/code&gt; is the final command that will be run every time we launch a new container from this image or restart a container. In our example, we are just executing our python app at runtime.&lt;/p&gt;
&lt;h2 id=&quot;build-an-image-from-a-dockerfile&quot;&gt;Build an image from a Dockerfile&lt;/h2&gt;
&lt;p&gt;To build our Dockerfile and produce an image that can be used to create a containerized version of our app, we need to execute the &lt;code&gt;docker build&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;The docker build command requires just a path in order to set the &lt;code&gt;build context&lt;/code&gt;, the directory where to build from. That is enough if we use the default name &lt;code&gt;Dockerfile&lt;/code&gt; for our build files.&lt;/p&gt;
&lt;p&gt;If we choose to pick a custom Dockerfile name, we can specify this with the &lt;code&gt;-f&lt;/code&gt; flag. We can also specify a custom tag and a repository at which to save the new image with the &lt;code&gt;-t&lt;/code&gt; flag.&lt;/p&gt;
&lt;p&gt;To build our image, we have to run this command from the directory where our &lt;code&gt;Dockerfile1&lt;/code&gt; lives.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; build&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -t&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; myflaskserver:0.0.1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -f&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; Dockerfile1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; .&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the above command, we specify &lt;code&gt;-t&lt;/code&gt; flag and we add a custom tag for our image, &lt;code&gt;myflaskserver&lt;/code&gt;. We can also define a numbered version after &lt;code&gt;:&lt;/code&gt; like &lt;code&gt;0.0.1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Alright if you tried the above command with our Dockerfile you should have built an image locally. Let’s verify this by executing:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; images&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There we can see our new image along with some info like &lt;code&gt;REPOSITORY&lt;/code&gt; &lt;code&gt;TAG&lt;/code&gt; &lt;code&gt;IMAGE&lt;/code&gt; &lt;code&gt;ID&lt;/code&gt; &lt;code&gt;CREATED&lt;/code&gt; &lt;code&gt;SIZE&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now we are ready to use our newly created image to generate a containerized version of our python flask server. Let’s go ahead and try that.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -d&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; 5000:5000&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; myflaskserver:0.0.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; ps&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now try curl on localhost on port 5000 or open your browser at locahost:5000 and you should see a message like below:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; localhost:5000&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_2/docker_run_image1.png&quot; alt=&quot;Terminal output of docker run and docker ps for the myflaskserver image, then curl localhost:5000 answering with the color blue&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Amazing our containerized python server works as expected!&lt;/p&gt;
&lt;p&gt;Let’s try something else. Let’s use the environment variable &lt;code&gt;color&lt;/code&gt; to change the message. First,let’s kill the previous container by executing &lt;code&gt;docker rm -f &amp;lt;docker-container-id&amp;gt;&lt;/code&gt;. Then:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -d&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; 5000:5000&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -e&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; color=green&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; myflaskserver:0.0.1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And again if you try curl or go to your browser at &lt;code&gt;localhost:5000&lt;/code&gt; you should see the color has changed:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_2/flask_server_browser.png&quot; alt=&quot;Browser at localhost:5000 showing the flask server reply with the color changed to green&quot;/&gt;&lt;/p&gt;
&lt;h2 id=&quot;publish-a-custom-docker-image&quot;&gt;Publish a custom Docker image&lt;/h2&gt;
&lt;p&gt;Alright, so far we have our custom image and verified that it works as expected.&lt;/p&gt;
&lt;p&gt;Next, we would like to store this image on Dockerhub, so we can share it with other people.&lt;/p&gt;
&lt;p&gt;To do that we’ll need a &lt;code&gt;Dockerhub&lt;/code&gt; account so if you don’t have one go ahead and register &lt;a href=&quot;https://hub.docker.com/&quot;&gt;here&lt;/a&gt;. After you created your account, you can log in from the command line with &lt;code&gt;docker login&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In order to publish our image to our account on Dockerhub, we must tag it using with the &lt;code&gt;docker account id&lt;/code&gt; like that: &lt;code&gt;docker build &amp;lt;Your Docker ID&amp;gt;/myflaskserver:0.0.1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;For example, my Docker ID is &lt;code&gt;moustakis&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; build&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -t&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; moustakis/myflaskserver:0.0.1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -f&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; Dockerfile1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; .&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then we can simply run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; push&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt; moustakis/myflaskserver:0.0.1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will automatically create a public repository for our image. Go ahead and explore your newly published image &lt;a href=&quot;https://hub.docker.com/repositories&quot;&gt;here&lt;/a&gt;. Congrats on your first published image!&lt;/p&gt;
&lt;h2 id=&quot;dockerfile-best-practises&quot;&gt;Dockerfile Best Practises&lt;/h2&gt;
&lt;p&gt;As the last step let’s examine some best practices on creating Dockerfiles and try to improve our previous Dockerfile a bit.&lt;/p&gt;
&lt;h3 id=&quot;instruction-order-matters&quot;&gt;Instruction order matters&lt;/h3&gt;
&lt;p&gt;To leverage efficiently the build cache mechanism place the instructions that tend to change more frequently after the ones that change less often.&lt;/p&gt;
&lt;p&gt;For example, taken from our previous Dockerfile, our dependencies tend to change less frequently than our code. So we decided to first copy the &lt;code&gt;requirements.txt&lt;/code&gt;, install them and then copy the &lt;code&gt;server.py&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Notice that we could copy both the &lt;code&gt;requirements.txt&lt;/code&gt; and &lt;code&gt;server.py&lt;/code&gt; using the same layer but we chose not to leverage the caching mechanism on the less often changed &lt;code&gt;requirements.txt&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;dockerfile&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# copy the dependencies file to the working directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;COPY&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; requirements.txt .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# install dependencies&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;RUN&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pip install -r requirements.txt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# copy the script file to the working directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;COPY&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; server.py .&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;ephemeral-containers&quot;&gt;Ephemeral containers&lt;/h3&gt;
&lt;p&gt;Keep in mind that containers by nature are destroyed and replaced all the time, so the containers that we create with Dockerfiles should be able to terminate and rebuilt.&lt;/p&gt;
&lt;h3 id=&quot;use-dockerignore&quot;&gt;Use .dockerignore&lt;/h3&gt;
&lt;p&gt;Similar to &lt;code&gt;.gitignore&lt;/code&gt;, used to exclude files that aren’t relevant to the build.&lt;/p&gt;
&lt;h3 id=&quot;multi-stage-builds-ftw&quot;&gt;Multi-stage builds FTW&lt;/h3&gt;
&lt;p&gt;By including files or packages that aren’t necessary in our final image we end up with larger build times and larger image sizes.&lt;/p&gt;
&lt;p&gt;That results in more time to build, push, and pull our images along with some other disadvantages like increasing the possible attack surface by some malicious outsider.&lt;/p&gt;
&lt;p&gt;To avoid this, we can create different stages in our Dockerfile, for example:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;dockerfile&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; python:3.7-alpine &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; base&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;ENV&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; color=blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; base &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; builder&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;RUN&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; mkdir /install&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;WORKDIR&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; /install&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# copy the dependencies file to the working directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;COPY&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; requirements.txt /requirements.txt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# install dependencies&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;RUN&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pip install --prefix=/install -r /requirements.txt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; base&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;COPY&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; --from=builder /install /usr/local&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;# set the working directory in the container&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;WORKDIR&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; /server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;COPY&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; server.py ./&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;ENTRYPOINT&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;python&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;CMD&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;./server.py&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the above Dockerfile we use the &lt;code&gt;builder&lt;/code&gt; stage to install build our dependencies but strip them from our final application image.&lt;/p&gt;
&lt;p&gt;The first stage is only used for building dependencies and we copy to our final stage only the necessary files produced from the first stage. To define a stage, we use the &lt;code&gt;as&lt;/code&gt; argument to the &lt;code&gt;FROM&lt;/code&gt; command as shown.&lt;/p&gt;
&lt;p&gt;Go ahead and build this image and then run &lt;code&gt;docker images&lt;/code&gt; and compare the size of the two images, the second one should be smaller:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;dockerfile&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;docker build -t &amp;#x3C;Your Docker ID&gt;/myflaskserver2:0.0.1 -f Dockerfile2 .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;docker images&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;install-only-the-necessary-packages&quot;&gt;Install only the necessary packages&lt;/h3&gt;
&lt;p&gt;It’s never a good idea to install more stuff than you need, keep it simple and add only completely necessary packages otherwise you’ll find yourself fighting to maintain dependencies.&lt;/p&gt;
&lt;h3 id=&quot;one-container-for-one-job&quot;&gt;One container for one job&lt;/h3&gt;
&lt;p&gt;Each of your images should be defined to execute one specific job. The Docker architecture favors decoupling applications as much as possible so try to separate your container’s responsibilities as much as possible.&lt;/p&gt;
&lt;p&gt;This way you can achieve horizontal scaling, reusability, easier maintenance, and faster development lifecycles.&lt;/p&gt;
&lt;h2 id=&quot;other-useful-dockerfile-instructions&quot;&gt;Other useful Dockerfile instructions&lt;/h2&gt;
&lt;h3 id=&quot;label&quot;&gt;LABEL&lt;/h3&gt;
&lt;p&gt;Labels can be added to the image for various reasons like organization, automation, versioning, etc. Use the &lt;code&gt;LABEL&lt;/code&gt; command followed by a &lt;code&gt;key-value&lt;/code&gt; pair:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;LABEL version=&amp;quot;0.0.1&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;expose&quot;&gt;EXPOSE&lt;/h3&gt;
&lt;p&gt;Defines the ports on which the container listens for connections to be used.&lt;/p&gt;
&lt;h3 id=&quot;entrypoint&quot;&gt;ENTRYPOINT&lt;/h3&gt;
&lt;p&gt;Defines the default command to run in a container if specified. To overwrite, we need to specify the command &lt;code&gt;--entrypoint&lt;/code&gt; at runtime.&lt;/p&gt;
&lt;p&gt;If only the &lt;code&gt;CMD&lt;/code&gt; instruction exists then the &lt;code&gt;CMD&lt;/code&gt; is executed and can be overwritten by placing at the end of the &lt;code&gt;docker run&lt;/code&gt; another command.&lt;/p&gt;
&lt;p&gt;If an &lt;code&gt;ENTRYPOINT&lt;/code&gt; is defined in a dockerfile then the value of &lt;code&gt;CMD&lt;/code&gt; e.g. &lt;code&gt;CMD [&amp;quot;5&amp;quot;]&lt;/code&gt; will be passed as a parameter to the value of &lt;code&gt;ENTRYPOINT&lt;/code&gt; &lt;code&gt;ENTRYPOINT [&amp;quot;sleep]&lt;/code&gt;. In our second &lt;code&gt;Dockerfile&lt;/code&gt; example we modified the initial&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CMD [ &quot;python&quot;, &quot;./server.py&quot; ]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ENTRYPOINT [ &quot;python&quot; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CMD [&quot;./server.py&quot; ]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This way we specify that &lt;code&gt;python&lt;/code&gt; is the image’s main command and the &lt;code&gt;&amp;quot;./server.py&amp;quot;&lt;/code&gt; is the default flag passed to the entrypoint.&lt;/p&gt;
&lt;p&gt;For example, if we would just like to check the python version, we could specify the &lt;code&gt;--version&lt;/code&gt; after our docker run command which will replace the execution of our python file &lt;code&gt;&amp;quot;./server.py&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;volume&quot;&gt;VOLUME&lt;/h3&gt;
&lt;p&gt;Used to define some persistent volumes for any mutable parts of the image. Anything that isn’t considered ephemeral and should be persisted further the container’s lifecycle.&lt;/p&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;That concludes the second part of our Dockerventure. Hope you enjoyed our deep dive into &lt;code&gt;Dockerfiles&lt;/code&gt; as much as I did.&lt;/p&gt;
&lt;p&gt;We explained and analyzed some of the fundamental and most used &lt;code&gt;Dockerfile instructions&lt;/code&gt;, wrote a simple Dockerfile for our python server, and learned how to build and push our custom images to &lt;code&gt;Dockerhub&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In the end, we saw some &lt;code&gt;best practices&lt;/code&gt; around Dockerfiles and tried to implement some of these to improve our first Dockerfile. Here you can find the next episode on &lt;a href=&quot;/blog/docker-ninja-tricks&quot;&gt;Useful Docker commands&lt;/a&gt;.&lt;/p&gt;</content:encoded><category>containers</category><category>devops-tooling</category></item><item><title>Exploring the Docker world</title><link>https://devopsmadness.com/blog/exploring-the-docker-world</link><guid isPermaLink="true">https://devopsmadness.com/blog/exploring-the-docker-world</guid><description>First view at Docker.</description><pubDate>Sun, 03 Jan 2021 00:00:00 GMT</pubDate><content:encoded>
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Intro to Docker’s basic functionality and concepts. Keep reading if you are new to Docker or want to learn about it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_1/docker_logo.png&quot; alt=&quot;Docker logo: a whale carrying shipping containers&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Today we are going to focus on a fundamental modern software technology, Docker. We are trying to analyze Docker by answering three simple questions around it. &lt;code&gt;What&lt;/code&gt; is Docker, &lt;code&gt;why&lt;/code&gt; should we adopt its usage, and &lt;code&gt;when&lt;/code&gt; is the right time for this.&lt;/p&gt;
&lt;p&gt;We are going to explain some of its &lt;code&gt;basic components&lt;/code&gt; and the high-level picture of how they work together. Finally, we are going &lt;code&gt;hands-on&lt;/code&gt; on our first Docker trip by spawning a &lt;code&gt;containerized webserver in seconds!&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you are already familiar with Docker but would like to check the second part of this Docker adventure where we investigate more advanced topics, click here: &lt;a href=&quot;/blog/taming-the-dockerfile&quot;&gt;Taming the Dockerfile&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;what-is-this-sorcery---docker-intro&quot;&gt;What is this sorcery - Docker Intro&lt;/h2&gt;
&lt;p&gt;Docker is an &lt;code&gt;open source tool&lt;/code&gt; designed to make our life easier(or sometimes harder) regarding creating, building, deploying, and run software applications.&lt;/p&gt;
&lt;p&gt;This is achieved by &lt;code&gt;packaging applications into containers&lt;/code&gt; along with everything else they need, allowing them to be considered and deployed as one package.&lt;/p&gt;
&lt;p&gt;Our code with its dependencies, libraries, tools, runtime environment, and operating system is combined into &lt;code&gt;a standard unit of software&lt;/code&gt; that can technically run in every environment without any other requirement, well apart from Docker itself being present.&lt;/p&gt;
&lt;p&gt;This is actually the magic of Docker, eliminating the need to care about different environments, installing dependencies while allowing our software to run on any machine. This means that Devs can focus on writing and developing their code and Ops have a new flexible tool in their arsenal to help them manage complex software systems.&lt;/p&gt;
&lt;h2 id=&quot;docker-architecture&quot;&gt;Docker Architecture&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_1/docker_architecture.png&quot; alt=&quot;Docker architecture diagram: the docker client sends commands like docker run to the docker daemon on the Docker host, which manages containers and images and pulls images from a registry&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Docker is like a client-server application including a &lt;code&gt;server&lt;/code&gt; called the docker daemon process(dockerd), a &lt;code&gt;REST API&lt;/code&gt; that provides interfaces to talk to the daemon and a &lt;code&gt;command line interface&lt;/code&gt; client(command &lt;code&gt;docker&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;The communication goes like this:&lt;/p&gt;
&lt;p&gt;The client is the main way of interaction for the users and via commands like &lt;code&gt;docker run&lt;/code&gt; informs the daemon what is supposed to be done. Then the daemon which is listening for those requests gets to work by managing accordingly the various docker objects.&lt;/p&gt;
&lt;p&gt;The docker client and daemon can live on the same system (the case of running docker locally on your machine for example) or the client can connect remotely to a remote daemon.&lt;/p&gt;
&lt;h2 id=&quot;why-should-i-use-docker&quot;&gt;Why should I use Docker&lt;/h2&gt;
&lt;p&gt;Containers are considered the &lt;code&gt;once in a decade shift in infrastructure&lt;/code&gt; and if you are working in any sector related to software development or IT this is one of the fundamental tools that you should know.&lt;/p&gt;
&lt;p&gt;It’s the shift to the next object of computation as in some years(if not already) running software in containers will be the &lt;code&gt;default practice&lt;/code&gt;. They are considered the &lt;code&gt;fastest-growing cloud-enabling technology&lt;/code&gt; and Docker is the face behind all this.&lt;/p&gt;
&lt;p&gt;There are of course other container tools but Docker is the defacto containerization technology and definitely the most used one. The real power that Docker provides us though is &lt;code&gt;speed&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Speed of software development &amp;amp; delivery, speed of building and testing, speed of providing value, speed of bringing our software from idea to production.&lt;/p&gt;
&lt;p&gt;Even more, as previously mentioned in the What section, containers &lt;code&gt;reduce complexity&lt;/code&gt; by allowing us to run and test the software everywhere the same way. That abstraction simplifies and makes it easier to handle a lot of the problems around managing software lifecycle.&lt;/p&gt;
&lt;h2 id=&quot;when-is-the-right-time-to-start-using-docker&quot;&gt;When is the right time to start using Docker&lt;/h2&gt;
&lt;p&gt;I know that migrating or learning a new tool and technology can be challenging but Docker makes this transition really smooth and focuses a lot on the &lt;code&gt;migration experience&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Finally, we have a tool that can be used &lt;code&gt;easily by any role&lt;/code&gt; in software development or IT like devs, ops, testers, build engineers, sysadmins etc and &lt;code&gt;NOW&lt;/code&gt; is the time to jump on the docker ship.&lt;/p&gt;
&lt;p&gt;The nice thing about Docker is that it &lt;code&gt;doesn&amp;#39;t require any code changes&lt;/code&gt; to your existing software and that’s actually one of the main reasons explaining why it has been adopted so quickly.&lt;/p&gt;
&lt;h2 id=&quot;fundamental-docker-concepts&quot;&gt;Fundamental Docker Concepts&lt;/h2&gt;
&lt;p&gt;Before we jump into our first hands-on quick Docker trip, let’s first define some vocabulary that we’ll need.&lt;/p&gt;
&lt;h3 id=&quot;image&quot;&gt;Image&lt;/h3&gt;
&lt;p&gt;An image is the application we would like to run along with binaries, libraries and everything that ultimately makes our source code, including also metadata about how to run it.&lt;/p&gt;
&lt;h3 id=&quot;dockerfile&quot;&gt;Dockerfile&lt;/h3&gt;
&lt;p&gt;A Dockerfile is a &lt;code&gt;recipe&lt;/code&gt; to create our Docker images. We are going to deep dive into Dockerfiles in the next episode. For now, if you want to have a look at the Dockerfile that we are going to use check &lt;a href=&quot;https://github.com/nginxinc/docker-nginx/blob/0dc809fa606828a78087cd0a824bed06268d73e0/mainline/buster/Dockerfile&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;container&quot;&gt;Container&lt;/h3&gt;
&lt;p&gt;A container is a running instance of an image running as a &lt;code&gt;process&lt;/code&gt;. So in the end containers are just processes limited by what resources they can access.&lt;/p&gt;
&lt;h3 id=&quot;image-registry&quot;&gt;Image Registry&lt;/h3&gt;
&lt;p&gt;Images are usually stored in registries and &lt;a href=&quot;https://hub.docker.com/&quot;&gt;Dockerhub&lt;/a&gt; is the default registry for Docker. Dockerhub is for docker images what Github is for source code.&lt;/p&gt;
&lt;h2 id=&quot;ok-enough-with-the-blah-blah-show-us&quot;&gt;Ok enough with the blah blah, show us&lt;/h2&gt;
&lt;p&gt;Ok by now you should be fully onboard on the Docker train chu chuuuu, demo time.&lt;/p&gt;
&lt;p&gt;If you don’t have already Docker installed here is the link to the official documentation regarding &lt;a href=&quot;https://docs.docker.com/engine/install/&quot;&gt;installation instructions&lt;/a&gt; per platform. For this demo, we are going to use the &lt;a href=&quot;https://www.nginx.com/&quot;&gt;nginx&lt;/a&gt; webserver image, which can be found &lt;a href=&quot;https://hub.docker.com/_/nginx&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Go in your terminal and just run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker run -p 80:80 -d nginx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And dadaaaaaah you have an nginx webserver up and running. To validate go to your web browser and type: &lt;code&gt;localhost:80&lt;/code&gt; and you should see something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_1/nginx_default_page.png&quot; alt=&quot;Browser at localhost showing the Welcome to nginx! default page&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Well done running your first docker container! That was easy, wasn’t it?&lt;/p&gt;
&lt;p&gt;Let’s go see what happened there. When we run this command docker tried to look for a docker image named &lt;code&gt;nginx&lt;/code&gt;, couldn’t find any so it went to Dockerhub and downloaded the latest image and then started it in a newly created container.&lt;/p&gt;
&lt;p&gt;Also with the &lt;code&gt;-p 80:80&lt;/code&gt; option, we instructed our container to expose traffic on our host IP at port 80 and route it to the container IP port 80, pure magic. The &lt;code&gt;-d&lt;/code&gt; option runs the container in the background and allows us to continue using the same terminal for other stuff.&lt;/p&gt;
&lt;p&gt;To verify this go back to your terminal and run the command that lists our running containers:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker ps&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And you should see something similar to this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_1/docker_ps.png&quot; alt=&quot;Terminal output of docker run -p 80:80 -d nginx pulling the image, then docker ps showing the running nginx container with its ports and generated name&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Note there is various info there. You get your container id (every container has a unique id), the image from which it spawned, the default command used when the container starts when was your container created, it’s status, what ports are exposed and a random &amp;amp; usually funny name attached to it (if you don’t specifically specify one).&lt;/p&gt;
&lt;p&gt;To stop a running container get the id from the above output and execute:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker stop 1663e7b52343&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;now running the same command again should return nothing:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker ps&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to see your stopped containers run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker ps -a&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ok, let’s say I want to specify a name for my container so that I can reference it easily and I don’t have to grab the id every time, that can be achieved by using the &lt;code&gt;--name&lt;/code&gt; flag.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker run -p 80:80 -d --name webserver nginx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now if you execute again &lt;code&gt;docker ps&lt;/code&gt; you will see that the container has the specified name and can be for example stopped by running:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker stop webserver&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you stopped our webserver go ahead and restart the container by running:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker start webserver&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This again starts the same previously stopped container instead of the &lt;code&gt;run&lt;/code&gt; command which will create a new one.&lt;/p&gt;
&lt;p&gt;Ok, what if we want to check how our webserver is doing? Let’s go check some logs:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker logs webserver&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And you should see something similar to this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_1/docker_logs_1.png&quot; alt=&quot;Terminal output of docker logs webserver showing the nginx entrypoint configuration messages and one GET request&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Let’s try to generate some more logs, go to your browser at &lt;code&gt;localhost:80&lt;/code&gt; where our nginx webserver is exposed and hit the &lt;code&gt;refresh&lt;/code&gt; button a couple of times. Now let’s execute again:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker logs webserver&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now you should have more logs in your webserver showing all the get requests you just did:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_1/docker_logs_2.png&quot; alt=&quot;Terminal output of docker logs webserver after refreshing the browser: several more GET request lines appear&quot;/&gt;&lt;/p&gt;
&lt;p&gt;If you like also you can follow the logs in the terminal by specifying the &lt;code&gt;-f&lt;/code&gt; flag. Try&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker logs -f webserver&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And back to your browser hit the refresh button a couple of times and you will see the log stream being updated real-time.&lt;/p&gt;
&lt;p&gt;The Docker tool has a lot of useful commands, and you’ll have to play a bit with them to explore them all. To list all the different docker commands just run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker help&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It returns a list of options and commands. If you would like to learn more info regarding one specific command, for example, the &lt;code&gt;login&lt;/code&gt; command, you can run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker help login&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And you get more information regarding the &lt;code&gt;login&lt;/code&gt; command&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/dockerventure_1/docker_help_login.png&quot; alt=&quot;Terminal output of docker help login describing the login command and its password and username options&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Alright, let’s say we are done with our quick demo, and we would like to clean our containers.&lt;/p&gt;
&lt;p&gt;Go ahead and run &lt;code&gt;docker ps -a&lt;/code&gt; to list all your containers, running or not. To remove them, we’ll use the &lt;code&gt;docker rm&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;If you try to use this command on a running container, you’ll get an error that you &lt;code&gt;can&amp;#39;t remove a running container&lt;/code&gt;. We’ll use &lt;code&gt;-f&lt;/code&gt; flag to force the deletion in this case, note that it will be the same if you first stopped the running containers with the &lt;code&gt;docker stop&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;Let’s go and remove both the 2 containers we created previously in one go:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker rm -f webserver 1663e7b52343&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;Alright, that was it folks, a quick intro to Docker answering What-Why-When questions around it, defining some basic components, and finally getting our hands dirty with a small demo.&lt;/p&gt;
&lt;p&gt;Hope you enjoyed this as much as I did and if you want to learn more, check the second part of our Docker trip &lt;a href=&quot;/blog/taming-the-dockerfile&quot;&gt;Taming the Dockerfile&lt;/a&gt; where we deep dive into more advanced Docker topics and we are going to build our first Dockerfile.&lt;/p&gt;</content:encoded><category>containers</category><category>devops-tooling</category></item></channel></rss>