<?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>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;Summary:&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. Import what exists and enforce code-first changes before
tooling decisions, break up monolithic state and add policy gates before
automating delivery. Bring AI in last, once guardrails exist, and plan for
a multi-tool reality built on open standards.&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.&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;Summary:&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. Start with the boring work (module upgrades, refactors,
drift explanations, docs), give the agent plan-only permissions, and let
it earn trust per repo through conventions and context files, the same way
a new team member would.&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.&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;Summary:&lt;/strong&gt; The landing zone is the highest-leverage early decision in
AWS, since accounts, identity, networking and guardrails all inherit it.
The guide compares the build routes honestly (Control Tower, Landing Zone
Accelerator, account factory, fully custom), each trading flexibility
against maintenance differently. OU design and account vending hurt most
to change later, so spend your thinking there first and manage the landing
zone itself with IaC from day one.&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.&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;Summary:&lt;/strong&gt; Migrations create a window where data lives in two places,
identities double, and temporary access hardens into permanent access.
This guide maps the risks to each migration phase and ends in a runnable
checklist. Know who owns what during the move, expire migration access by
design, and re-verify encryption, logging and identity in the new home.&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.&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></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;Summary:&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. The piece builds six layered
controls for Claude Code, from least-privilege credentials and permission
rules through CLAUDE.md conventions to hooks and sandboxing. Each layer
catches what the previous one missed, and the last two cover the tail
risks where agent incidents actually live.&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>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>devops-tooling</category><category>iac</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;Summary:&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. MCP servers give the agent real context about your
environment, which separates a guided migration from generated guesswork.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams still running container-shaped workloads on
EC2, 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;Summary:&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. Match the migration path to
your starting version; from 1.9.x there is a defined, reversible sequence.
Check provider and module compatibility first, and decide the rollback
plan before you migrate.&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.&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;Summary:&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, with AgentCore covering runtime,
memory and identity. Least privilege matters more for agents than for
humans, since they act faster and never get tired.&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.&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></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></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;Summary:&lt;/strong&gt; MCP became the default way to give agents tools, and the
mental model is small: hosts, clients and servers exposing tools,
resources and prompts. It complements APIs by standardizing how a model
discovers and calls capabilities. A working server takes an afternoon, so
build one before forming an opinion about the protocol.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; engineers wiring agents to real systems, 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></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></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></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;Summary:&lt;/strong&gt; A map of where AI concretely lands in platform work:
automation, self-service, reliability prediction, security and cost. The
near-term wins are unglamorous (better self-service interfaces, drift
explanations, policy suggestions) and the predictive work needs data your
platform may not collect yet. AI extends a working platform and rescues no
broken one.&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.&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></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;Summary:&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 pitfalls are quiet: manual steps around the pipeline,
state only one person understands, drift nobody measures. Closing the gap
starts with measuring outcomes instead of counting tools.&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.&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></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>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></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></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;Summary:&lt;/strong&gt; Drift is the gap between what your code says and what
actually runs, accumulating through reasonable actions like hotfixes and
console edits. The risk compounds silently: the next apply either reverts
someone’s fix or fails on state it does not expect. Detection is cheap
now, and continuous drift checks belong next to your other scheduled jobs.&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.&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>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></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></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>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>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>devops-tooling</category><category>aws</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>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>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></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></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>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>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>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;Summary:&lt;/strong&gt; GitHub Actions is the default answer when a team already
lives on GitHub and wants Terraform automated this week. The core loop is
plan on pull request and apply on merge, with the plan posted to the PR
and credentials through OIDC federation. State locking, drift and
multi-environment coordination remain your homework.&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.&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></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>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;Summary:&lt;/strong&gt; Atlantis does PR plan and apply well, and little else: you
host it, secure it and extend it. Terraform Cloud adds state management,
policy, variables and a UI, with pricing and lock-in to match. The
decision is mostly about operational appetite, run a tool or buy a
platform.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should read it:&lt;/strong&gt; teams choosing their first Terraform automation
layer, and Atlantis operators wondering what they are missing.&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>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></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></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>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;Summary:&lt;/strong&gt; Terraform gives you enough rope to build an estate you
regret, and this list collects the habits that keep repositories workable
as teams grow. Remote state with locking is table stakes, community
modules beat hand-rolling, and version everything you consume. Structure
decisions compound: small, composable configurations age better than one
repository that does everything.&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.&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>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>devops-tooling</category><category>iac</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>devops-tooling</category><category>iac</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></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></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></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></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>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>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>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>devops-tooling</category></item></channel></rss>