Cloud Tech by Victor

Search

30 results for “iam

Search results

DevOps

AWS IAM

How IAM users, roles, and policies control access in AWS, why roles with temporary credentials are preferred over long-lived access keys, and how policy evaluation actually decides allow versus deny.

DevOps

Cloud IAM Fundamentals

How identity, roles, and policies fit together across cloud providers, why least-privilege is a discipline rather than a one-time setup, and the difference between authentication and authorization.

AWS IAM

What is the difference between an IAM user and an IAM role?

An IAM user is a long-term identity with its own credentials, a password for console access, or access keys for programmatic access, typically representing a human or a legacy application that needs standing access. An IAM role has no long-term credentials of its own; it is assumed, by a user, an application, or an AWS service, and yields short-lived, automatically-expiring temporary credentials via AWS STS. Roles are the preferred identity for anything running on AWS compute (EC2, Lambda, ECS) precisely because there is no long-lived secret to leak or rotate.

AWS IAM

How does IAM decide whether a request is allowed, and what wins if there is a conflict between an Allow and a Deny?

IAM evaluation starts from an implicit deny, nothing is allowed unless some applicable policy explicitly allows it. It then checks every applicable policy for an explicit Deny; if one exists anywhere, identity-based, resource-based, a permission boundary, an SCP, or an RCP, the request is denied regardless of how many Allow statements also apply. Beyond that, identity-based and resource-based policies are the only policy types that actually grant permissions, an Allow from either is required. Permission boundaries, SCPs, and RCPs never grant anything themselves, they only cap what a grant can reach, so the request also needs every applicable one of those to independently allow the action; any one of them failing to allow it denies the request even with a valid Allow in place. An explicit Deny always wins over an explicit Allow, no matter which policy or how specific the Allow is.

AWS IAM

Why are IAM roles preferred over long-lived access keys for workloads running on EC2 or Lambda?

A long-lived access key is a static secret that must be stored somewhere, an environment variable, a config file, a secrets manager, and rotated manually or via automation; if it leaks, it remains valid until someone notices and revokes it. An IAM role attached to an EC2 instance profile or a Lambda execution role is assumed automatically by the AWS SDK, yielding short-lived credentials that are rotated transparently and expire on their own even if never explicitly revoked. This removes the entire class of "leaked long-lived credential" risk for workloads that run on AWS compute, which is why roles are the default recommendation over access keys whenever the workload runs inside AWS.

Cloud IAM Fundamentals

What is the difference between authentication and authorization in a cloud IAM context?

Authentication answers "who is making this request", verifying an identity via credentials, a token, or a federated login. Authorization answers "is this identity allowed to do this specific action on this specific resource", evaluated after authentication succeeds, by checking the identity's attached policies against the requested action. A request can be perfectly authenticated (the caller genuinely is who they claim) and still be denied, because authorization is a separate check against what that identity is actually permitted to do.

Cloud IAM Fundamentals

What is the difference between a role and a policy in most cloud IAM systems?

A policy is a document that defines a set of permissions, which actions are allowed or denied on which resources, sometimes under which conditions. A role is an identity that policies get attached to, and which something (a user, or more commonly a workload like a compute instance or function) can assume to gain those permissions temporarily. The distinction matters operationally: policies are the reusable permission logic, while roles are how that logic gets bound to something that actually makes requests, separating "what is allowed" from "who currently has it."

Cloud IAM Fundamentals

What does the principle of least privilege mean in practice, and why is it hard to maintain over time?

Least privilege means granting an identity only the specific permissions it needs to do its job, nothing broader "to be safe" or "to save time." It's hard to maintain because permissions tend to accumulate, someone gets a broad role to unblock a one-time task and it's never revoked, or a service starts with wildcard permissions during initial development and nobody narrows them before shipping. Maintaining least privilege requires ongoing review (access audits, unused-permission detection), not just a careful initial setup, because the natural drift over time is always toward more access, not less.

AWS Organizations & Account Structure

What is a Service Control Policy (SCP), and what is the one thing it does not do?

An SCP is a policy attached to an AWS Organizations root, organizational unit, or member account that defines the maximum available permissions for every identity in that account, including that account's own administrators and its root user. What an SCP does not do is grant any permission by itself, it only sets a ceiling; an identity still needs an actual IAM allow (from an identity-based or resource-based policy) within that ceiling to do anything. An SCP with no matching IAM allow underneath it results in access denied, not access granted, which is the most common misunderstanding of how SCPs work. One exception worth knowing: SCPs never apply to the organization's management account itself, only to member accounts.

AWS Organizations & Account Structure

Why would an organization use multiple AWS accounts instead of one account holding all resources?

Separate accounts per environment (production, staging, development) or per team give a hard isolation boundary that a single account with tags or naming conventions cannot: a mistake or compromised credential in a development account cannot reach production resources at all, rather than merely being restricted by IAM policy within the same account. It also gives cleaner cost attribution (billing rolls up per account), independent service quotas, and a natural blast-radius limit for security incidents. AWS Organizations, and patterns built on top of it like a landing zone, exist specifically to make many accounts manageable, centralized billing, centralized logging, and org-wide SCPs, without losing that isolation.

Cloud Service Models

What is the cloud shared responsibility model, and why does it matter for security?

It's the explicit division of security obligations between the cloud provider and the customer, and where that line falls depends on the service model. The provider is always responsible for "security of the cloud", physical data centers, host infrastructure, and (for managed services) the underlying platform. The customer is always responsible for "security in the cloud", for IaaS, that includes OS patching, network configuration, and IAM; for PaaS, it narrows to application code, data, and access control; for SaaS, it's mostly just access control and data. Misunderstanding this line is one of the most common causes of real cloud security incidents, assuming the provider handles something they explicitly don't.

Secrets Management

What does it mean for a secret to be "dynamic" or "short-lived," and why does that reduce risk compared to a long-lived static credential?

A dynamic secret is issued on demand, scoped to a single application instance or session, and expires automatically after a defined lease, a database credential minted when a service starts and revoked automatically when it stops, rather than a password typed in once and left valid indefinitely. If a short-lived secret leaks, its usefulness to an attacker is bounded by its remaining lease time, often minutes, instead of remaining valid until someone notices and manually rotates it. This is the same underlying idea as preferring IAM roles over long-lived access keys in a cloud provider, temporary credentials shrink the blast radius of a leak by construction, not by better hiding the secret.

Blog

Automating Azure Infrastructure with Bicep: A Hands-On IaC Lab Using VS Code

Deploying VNets, VMs, IAM, Policies, Monitoring, and Governance using Infrastructure as Code.

Azure Active Directory (Entra ID)

What is a managed identity, and what problem does it solve compared to a service principal with a client secret?

A managed identity is an Entra ID identity automatically managed by Azure for a resource (a VM, an App Service, a Function), with credentials that Azure handles entirely, no client secret is ever stored, retrieved, or rotated by the application. A traditional service principal with a client secret requires that secret to be stored somewhere (a config file, a key vault) and rotated manually or via automation, which is itself a credential-management burden and a leak risk. Managed identities remove that burden for the common case of "this Azure resource needs to authenticate to another Azure service," which is why they're preferred whenever the workload runs on Azure compute.

Azure Fundamentals

What is Azure Resource Manager (ARM) and why does every Azure operation go through it?

ARM is the deployment and management layer that every Azure operation, whether from the Portal, CLI, PowerShell, or an ARM/Bicep template, ultimately goes through. It provides a consistent API surface, handles authentication and authorization checks against Azure RBAC, and is what enables declarative deployment (submit a template describing desired resources, ARM figures out what to create/update). Because every path converges on ARM, access control and activity logging are consistent regardless of which tool was used to make a change.

Azure Monitor

What is the difference between a metric alert and a log alert in Azure Monitor?

A metric alert evaluates near-real-time numeric metrics (CPU percentage, request count) against a threshold, with low latency, typically triggering within a minute or so of the threshold being crossed. A log alert runs a KQL query against Log Analytics on a schedule (e.g., every 5 minutes) and alerts based on the query's results, which supports much richer conditions (joining multiple data sources, complex filtering) but has higher latency, bounded by both the query schedule and log ingestion delay. Choose metric alerts for fast-reacting, simple threshold conditions, and log alerts for anything requiring more complex logic than a single metric can express.

LLM Fundamentals: Tokens, Context Windows & Sampling

A request's input already exceeds the model's context window before generation even starts. What happens, versus a request that only exceeds the limit once output is generated?

If the input alone already exceeds the context window, the API rejects the request upfront with a 400 error, generation never starts at all. If the input fits but input tokens plus the requested max output tokens could exceed the window, current models accept the request and generate as far as they can; if generation actually reaches the window limit before finishing, it stops early with a specific stop reason indicating the context window was exhausted, rather than silently truncating or erroring out mid-response. The distinction matters operationally: the first case is a fixable request-construction bug, the second is a signal to reduce the requested output length or the accumulated conversation history.

Platform Engineering Fundamentals

What is a "golden path" and why does it matter more than giving teams unlimited flexibility?

A golden path is an opinionated, well-supported, self-service way to accomplish a common task, spinning up a new service, provisioning a database, setting up a CI pipeline, that comes with sane defaults for security, observability, and reliability already wired in. Unlimited flexibility sounds appealing but means every team re-solves the same problems (how do we get logs flowing, how do we handle secrets) slightly differently, multiplying the platform team's support burden and creating inconsistent security/reliability posture across the organization. A golden path trades some flexibility for consistency and speed, while still allowing teams to go off-path when they have a genuine reason to.

Python Syntax Fundamentals

Why is using a mutable object (like a list) as a default argument value a common bug in Python?

Default argument values are evaluated exactly once, when the function is defined, not on every call, so a mutable default like `def f(items=[])` creates one list object that is shared across every call that doesn't explicitly pass its own `items`. Appending to it in one call leaves those items present the next time the function is called with the default, which looks like inexplicable state leaking between unrelated calls. The fix is defaulting to `None` and creating a new list inside the function body when `items is None`, so every call that needs the default gets its own fresh object.

Python Virtual Environments & Packaging

What is the difference between requirements.txt and a lockfile, and why does it matter for reproducibility?

A typical `requirements.txt` often specifies loose version ranges (`requests>=2.28`), which means two installs at different times can resolve to different actual versions as new releases come out, not truly reproducible. A lockfile (like `poetry.lock` or `uv.lock`) pins the exact resolved version of every dependency and transitive dependency, so installing from it produces the identical dependency tree every time, on any machine. The distinction matters because a subtle bug caused by a transitive dependency's patch version can be nearly impossible to reproduce without a lockfile guaranteeing everyone has the exact same versions.

Sorting Algorithms & Stability

An O(n^2) sort can be faster than an O(n log n) sort for small inputs. Why, and why doesn't that matter for a general-purpose sort function?

Big O describes asymptotic growth, not actual runtime, and O(n^2) algorithms often have smaller constant factors and simpler inner loops (no recursion or merge-buffer overhead) that make them genuinely faster in wall-clock time for small n, even though the more sophisticated O(n log n) algorithm would eventually win as n grows. This is exactly why production sort implementations, including Timsort, special-case small subarrays with a simple insertion sort internally rather than using the full merge-sort machinery on tiny inputs, getting the best of both regimes instead of picking one algorithm for every input size.

The JavaScript Event Loop

If a microtask itself queues another microtask while it's running, does that new microtask wait for the next event loop iteration, or does it still run before the next macrotask?

It still runs before the next macrotask. The rule isn't "run the microtasks that were queued when this iteration started", it's "drain the microtask queue completely," and if executing a microtask adds another one, that new one is still part of the queue being drained. This means a chain of microtasks that keep scheduling more microtasks can, in principle, starve the event loop from ever reaching the next macrotask (a real, documented way to accidentally block timers and rendering), which is different from a single flat batch of microtasks all queued up front.

Tool Use & Agents

What is the difference between a client tool and a server tool, and why does that distinction matter for what your application has to do?

A client tool executes in your own application, the model only returns the structured request to call it; your code is responsible for actually running it (hitting your database, calling your API) and returning the result. A server tool, like a web search or code execution tool a provider offers, executes on the provider's own infrastructure, so your application sees the final result directly without ever writing execution code for it. The distinction determines how much you have to build: every client tool needs your own execution and error-handling code, while server tools need none, just declaring them in the request.

Web Accessibility Fundamentals

What is the "first rule of ARIA," and why does a native <button> beat a <div role="button"> even though both can be made accessible?"

The W3C's own first rule of ARIA use is direct: if a native HTML element or attribute already provides the semantics and behavior you need, use it instead of re-purposing a different element with ARIA. A native `<button>` comes with keyboard interaction (Enter/Space activates it, Tab reaches it), focus management, and correct semantics built into the browser for free. A `<div role="button">` requires manually replicating every one of those behaviors with JavaScript and additional ARIA attributes, tabindex, keydown handlers for both Enter and Space, and it is easy to miss an edge case a real button never had in the first place. ARIA can make a div accessible in theory; a native element already is, with less code and less risk.

Web Performance & Core Web Vitals

What do LCP, INP, and CLS each measure, and why are all three needed instead of one overall "speed" number?

LCP (Largest Contentful Paint) measures loading performance, specifically how quickly the largest visible element renders, "good" is 2.5 seconds or less. INP (Interaction to Next Paint) measures interactivity/responsiveness, the delay between a user interaction and the browser's next visual response, "good" is 200 milliseconds or less. CLS (Cumulative Layout Shift) measures visual stability, how much content unexpectedly shifts around during the page's lifecycle, "good" is a score of 0.1 or less. A single overall number couldn't distinguish a page that loads fast but jumps around from one that's stable but slow to interact with, three separate metrics are needed because loading, interactivity, and stability are genuinely different failure modes.

AWS CloudWatch & CloudTrail

What is the difference between CloudTrail management events and data events, and why does it matter?

Management events record control-plane operations, creating a role, launching an instance, changing a security group, and every CloudTrail trail logs these by default. Data events record data-plane operations on the resources themselves, an individual S3 GetObject or Lambda Invoke call, and are not logged by default; they have to be explicitly enabled per resource and typically cost extra given their much higher volume. This matters because an investigation into "who read this specific S3 object" will come up completely empty if only the default management events were ever being logged, a genuinely common gap discovered only during an actual incident.

AWS Compute

What does an EC2 Auto Scaling Group actually manage, and why does the scaling metric choice matter?

An Auto Scaling Group keeps a fleet of EC2 instances at a desired size, launching or terminating instances automatically based on configured scaling policies, and replacing instances that fail health checks, so nobody is manually adding or removing servers as load changes. The scaling metric determines whether that automation actually tracks the real bottleneck: scaling purely on CPU utilization looks like "autoscaling is working" on a dashboard while a memory-bound or queue-depth-bound workload keeps falling behind, because the metric driving the scaling policy never reflected the actual constraint. Choosing a metric (or combination of metrics, including custom CloudWatch metrics) that matches the workload's real bottleneck is what makes the automation actually correct rather than just present.

AWS Storage

What is the difference between durability and availability in S3, and why does it matter when picking a storage class?

Durability is the probability that a stored object is not lost over a year, and S3 Standard, Standard-IA, and every Glacier class are all designed for the same 99.999999999% (11 nines) durability. Availability is how often the object can actually be successfully retrieved on demand, and that number does vary by class, 99.99% for Standard down to 99.5% for One Zone-IA. It matters because a cheaper class is not automatically a less durable one, S3 One Zone-IA is exactly as durable as Standard-IA per object, but it is not resilient to the loss of its single Availability Zone at all, since it isn't replicated across multiple zones the way every multi-AZ class is.

Azure Compute

When would you choose Azure App Service over a Virtual Machine for hosting a web application?

App Service is a fully managed PaaS; it handles OS patching, runtime installation, and built-in scaling and deployment slots, so you only manage application code and configuration. A Virtual Machine is IaaS, full control over the OS and everything installed on it, but you own patching, scaling configuration, and availability yourself. Choose App Service when the workload is a standard web app/API in a supported runtime and the team wants to minimize operational burden; choose a VM when you need OS-level control, unsupported runtimes/dependencies, or specific compliance requirements that mandate managing the host directly.

Azure Compute

What is an Azure VM Scale Set, and how does it differ from manually managing a group of VMs?

A VM Scale Set manages a group of identical, load-balanced VMs as a single logical unit, with built-in autoscaling based on metrics (CPU, custom metrics) and automated instance replacement on failure. Manually managing individual VMs means each scaling or patching action has to be repeated per instance, with no built-in mechanism to keep the fleet at a consistent size or to react automatically to load. Scale Sets are the IaaS-level building block that makes "run N identical VMs that scale with load" a supported, declarative configuration instead of a hand-rolled script.

Search results for “iam” | Cloud Tech by Victor