
Testing a Node.js App for AWS and Azure Lock-In While EU Cloud Rules Are Still Pending
The EU cloud gatekeeper story is still waiting on a decision nobody has published, but the engineering question is already actionable: how long would it take to move a Node.js workload off Amazon S3 and SQS, or off Azure Blob Storage and Queue Storage, and what changes semantically when you try? This walkthrough shows how to test a Node.js app for AWS and Azure lock-in with a bounded portability lab—inventory, adapters, contract tests, identity tests, a measured transfer, and a costed cutover—so the exit path becomes a number you can defend in a planning meeting instead of an assumption.
That gap is worth closing no matter what Brussels does next. The walkthrough builds a bounded portability lab—inventory, adapters, contract tests, identity tests, a measured transfer, and a costed cutover—so the exit path becomes a number you can defend in a planning meeting instead of an assumption.
On this page
The engineering problem is an untested exit path, not a pending designation
Lead with the consequence: replacing a Node.js SDK does not migrate permissions, delivery guarantees, data, or operational procedures
The seductive version of cloud portability is "we use the SDK behind an interface, so we could swap it." That claim survives contact with reality about as long as it takes to hit the first AccessDenied.
Replacing @aws-sdk/client-s3 with @azure/storage-blob changes a package import. It does not change:
- Authorization. An IAM role with
s3:GetObjecton a prefix becomes an Entra ID principal with a data-plane role assignment scoped to a container. Different evaluation model, different denial error, different blast radius. - Delivery guarantees. SQS has a native dead-letter queue with a redrive policy and
maxReceiveCount. Azure Queue Storage has no equivalent native feature; poison handling becomes application logic you have to write and test. - Data. Object counts, byte volumes, checksums, and stored metadata all have to be re-established at the destination and verified, not asserted.
- Operational procedure. Runbooks, alerts, dashboards, on-call dashboards, quota requests, and the retention policy your auditor already reviewed all belong to the provider you are leaving.
The last item is the one that quietly blows up exit timelines. A migration plan that budgets for code and bandwidth but not for rebuilding observability and incident response is not a plan.
State the technical position: retain useful managed services, but measure the time, cost, and semantic changes required to leave them
My position, stated plainly: do not rewrite to a lowest-common-denominator abstraction, and do not treat "we're portable" as an architecture goal in itself. Managed services earn their price. A queue with native redrive, an object store with strong read-after-write consistency, and a managed identity system are genuinely less work than the alternative.
What you owe your organisation is not portability. It is a measured exit cost. Two numbers, ideally:
- Elapsed wall-clock time to move a representative dataset and cut over.
- Money, itemised, including the parts that surprise people (API request charges during listing, retrieval tiers, temporary duplicate storage).
Add a third, qualitative but well-documented: the list of semantic gaps that require application changes. That list is where the schedule risk lives.
If the exit cost is acceptable, keep the managed services and stop worrying. If it is not, you now know which specific coupling to reduce—and you can reduce it surgically rather than rewriting everything.
Define the walkthrough: a small Node.js document-processing app, two cloud implementations, and a repeatable portability report
The lab has three parts:
- A synthetic document workflow: upload bytes, enqueue a job, process, write back a checksum result.
- Two adapter implementations behind one application-level contract.
- A report generator that turns test output, inventory matches, and transfer metrics into a dated portability report.
Nothing here touches customer data. Everything runs against isolated, budgeted, disposable resources.
What the supplied report establishes—and what it does not
Attribute the event precisely: the supplied Reuters seed dated 30 November 2026 reports, citing sources, an expected gatekeeper designation for Amazon's and Microsoft's cloud units
The supplied material is a Reuters report dated 30 November 2026, which—citing unnamed sources—describes an expected designation of Amazon's and Microsoft's cloud units under EU gatekeeper rules. Two secondary aggregations dated the same day repeat the same anticipated outcome rather than adding independent reporting.
That is the whole evidentiary base: one original report, unnamed sources, an expectation. It is a credible signal from a credible outlet. It is not a legal instrument.
Separate evidence levels: the excerpt reports anticipated action; it does not establish a completed designation, affected service boundaries, compliance deadlines, or specific remedies
Concretely, the supplied text does not tell you:
- Whether a Commission decision has been adopted, or is merely expected.
- Which specific services fall inside the boundary. "Amazon's cloud unit" is not a legal category, and a designation names services, not org charts.
- What obligations attach, or their implementation dates.
- What remedies or behavioural commitments providers offered during any regulatory dialogue.
- Whether any of this survives the inevitable legal challenge.
Anyone who tells you "AWS and Azure will be gatekeepers by Q3, plan accordingly" is extrapolating past the evidence. The correct internal summary is: Reuters reports an expected designation; no adopted decision has been published in the supplied material.
Distinguish existing EU law from pending cloud-specific decisions: explain the DMA designation process separately from the Data Act's cloud-switching provisions
This is where most commentary muddles two separate instruments.
The Digital Markets Act, Regulation (EU) 2022/1925, is the gatekeeper regime. It works by designation: the Commission designates a provider of a core platform service as a gatekeeper, and the designation—not the regulation—creates the per-service obligations. Crucially, "cloud computing service" already appears in the DMA's list of core platform services in Article 2(2). So the legal route to designating a cloud service exists today; what does not exist in the supplied material is an adopted designation naming these providers' cloud services. Designation also involves quantitative thresholds and, in practice, a market investigation and a dialogue about remedies. It is a process with dates, not a light switch.
The Data Act, Regulation (EU) 2023/2854, is the other instrument, and it is already applicable—its switching and cloud provisions in Chapter VI apply from 12 September 2025. Those provisions push in the direction engineers care about: contractual terms, switching assistance, export formats, notice periods, and gradual withdrawal of switching charges. Unlike the DMA, this is not waiting on a designation to bite.
The practical upshot: if you want a regulatory forcing function for portability work today, the Data Act is the one that already exists. The DMA reporting is interesting context, not a trigger.
Identify what would change the analysis: an official Commission decision, its named services, applicable obligations, implementation dates, and provider responses
Watch for these five things, in this order, and re-run the analysis when any of them lands:
| Signal | Why it changes the engineering answer |
|---|---|
| Commission decision text | Establishes that designation happened at all |
| Named services | Determines whether your services are in scope |
| Obligations list | Turns "maybe portable" into "must support export format X by date Y" |
| Implementation dates | Sets your deadline; compliance dates are usually phased |
| Provider response / compliance report | Often where concrete export and switching mechanics appear |
Until a decision is published, treat the reporting as input to your risk register entry—not to your sprint board.
Build a bounded portability lab before touching production
Define the sample workflow: upload a synthetic document, enqueue processing, and retrieve a checksum result without private customer data
The workflow is deliberately boring:
POST /documentsaccepts synthetic bytes, computes SHA-256, stores the object with that checksum as metadata.- The handler enqueues a job message containing only the object key and expected checksum.
- A worker leases the message, reads the object, recomputes SHA-256, and writes a small result object.
- The client polls
GET /documents/:key/resultuntil the checksum result appears.
Four operations, each of which maps to a real cloud primitive on both sides. That is enough surface to expose every interesting difference without building a product.
Map the implementations: Amazon S3 and SQS versus Azure Blob Storage and Queue Storage, without claiming their semantics are interchangeable
| Application operation | AWS implementation | Azure implementation |
|---|---|---|
| Store bytes with checksum | PutObject + ChecksumSHA256, user metadata | BlockBlobClient.upload + Content-MD5 / metadata |
| Retrieve bytes | GetObject | BlobClient.download |
| Submit work | SendMessage | QueueClient.sendMessage |
| Lease work | ReceiveMessage + VisibilityTimeout | receiveMessages({ visibilityTimeout }) |
| Acknowledge | DeleteMessage with ReceiptHandle | deleteMessage with popReceipt |
| Failure redelivery | Visibility timeout expiry | Visibility timeout expiry |
| Poison handling | Native redrive policy to DLQ | Application-level dequeueCount handling |
Those rows look symmetrical. They are not. maxReceiveCount is a service-side counter that moves messages to a DLQ automatically; dequeueCount is a field you read and act on yourself. The abstraction will hide that difference in code, and the test suite must surface it in behaviour.
Establish prerequisites and guardrails: a supported Node.js LTS release, locked dependencies, isolated cloud resources, least-privilege test identities, budgets, and explicit cleanup
Minimum bar before you run anything:
- Node.js on a supported LTS line. Pin it in
.nvmrcandengines; record the exact version in every report. Behaviour differences inAbortSignal, timers, andfetchhave burned people comparing runs across majors. - Locked dependencies.
npm ciwith a committed lockfile. A test suite whose SDK minor version drifts between runs produces unreproducible evidence. - Isolated resources. A dedicated account/subscription or at minimum a dedicated resource group with a naming prefix like
portlab-, plus a hard budget alert. - Least-privilege test identities. A role and a principal scoped to exactly two lab resources: the one you use, and one you deliberately deny.
- A cleanup script that actually runs. Write it before you create anything. Orphaned storage is the most common way these labs quietly cost money.
Run the lab against a disposable account or subscription, never a shared one. Several tests here deliberately attempt denied operations, and a misconfigured policy on a shared account is exactly how a synthetic exercise turns into a real incident.
Define evidence collection: record runtime and package versions, regions, configuration, workload size, timestamps, and whether each result comes from a mock, emulator, or live service
Every row in your final report needs an environment stamp. I use this shape:
{
"runId": "portlab-2026-12-02T09-15Z",
"node": "v22.x",
"lockfileSha256": "…",
"region": { "aws": "eu-west-1", "azure": "swedencentral" },
"source": "live-service",
"workload": { "objects": 2000, "bytes": 52428800, "concurrency": 8 },
"startedAt": "2026-12-02T09:15:03Z",
"finishedAt": "2026-12-02T09:41:47Z"
}
The source field matters more than people expect. mock, emulator, and live-service produce three different kinds of evidence, and only the last one tells you anything reliable about throughput, throttling, or error codes. Mixing them in a single results table without labelling is how portability reports become fiction.
Find Node.js SDK coupling before designing an abstraction
Inspect package.json, the lockfile, imports, and configuration with reproducible commands that locate AWS and Azure dependencies
Start with the cheap greps. They take a minute and they bound the problem.
## Direct dependencies, both providers
node -e "const p=require('./package.json');const a={...p.dependencies,...p.devDependencies};
for(const [k,v] of Object.entries(a)) if(/^@aws-sdk\/|^aws-sdk$|^@azure\/|^azure-/.test(k)) console.log(k,v)"
## Everything the lockfile actually resolved, including transitive SDK packages
grep -o '"node_modules/@aws-sdk/[^"]*"' package-lock.json | sort -u | head -40
grep -o '"node_modules/@azure/[^"]*"' package-lock.json | sort -u | head -40
## Source-level import sites
grep -rn --include='*.ts' --include='*.js' --include='*.mjs' \
-E "from ['\"](@aws-sdk|aws-sdk|@azure)/" src/
The lockfile grep is the one people skip, and it is the one that finds the surprise: a transitive dependency pulling in a provider SDK you never imported, typically through an observability or auth library.
Build a small Node.js source-inventory script that reports provider imports, resource identifiers, credential-chain initialization, and provider-specific error handling
Greps find imports. They miss resource identifiers baked into config, credential-chain calls, and error-name string comparisons. A short script covers all four categories.
import { readdir, readFile } from "node:fs/promises";
const ROOT = process.cwd();
const SKIP = new Set(["node_modules", ".git", "dist", "build", ".next", "coverage"]);
const RULES = [
{ kind: "sdk", id: "aws-sdk-v3", re: /@aws-sdk\/[a-z0-9-]+/g },
{ kind: "sdk", id: "aws-sdk-v2", re: /\baws-sdk\b/g },
{ kind: "sdk", id: "azure-sdk", re: /@azure\/[a-z0-9-]+/g },
{ kind: "resource-id", id: "aws-arn", re: /arn:aws[a-z-]*:[a-z0-9-]+:[a-z0-9-]*:\d{0,12}:[^\s"'`)]+/g },
{ kind: "resource-id", id: "azure-blob", re: /https:\/\/[a-z0-9-]+\.blob\.core\.windows\.net[^\s"'`)]*/g },
{ kind: "resource-id", id: "azure-queue", re: /https:\/\/[a-z0-9-]+\.queue\.core\.windows\.net[^\s"'`)]*/g },
{ kind: "credential", id: "aws-chain", re: /\b(fromIni|fromNodeProviderChain|fromEnv|fromInstanceMetadata|fromContainerMetadata)\b/g },
{ kind: "credential", id: "azure-chain", re: /\b(DefaultAzureCredential|ManagedIdentityCredential|ClientSecretCredential|AzureCliCredential)\b/g },
{ kind: "error-handling", id: "aws-errors", re: /\b(NoSuchKey|QueueDoesNotExist|ThrottlingException|ConditionalRequestConflict)\b/g },
{ kind: "error-handling", id: "azure-errors",re: /\b(BlobNotFound|QueueNotFound|AuthorizationPermissionMismatch|RestError)\b/g },
];
async function* walk(dir) {
for (const entry of await readdir(dir, { withFileTypes: true })) {
if (SKIP.has(entry.name)) continue;
const full = path.join(dir, entry.name);
if (entry.isDirectory()) yield* walk(full);
else if (/\.(m?[jt]sx?|json|ya?ml)$/.test(entry.name)) yield full;
}
}
const hits = new Map(); // "kind|id|file" -> count
for await (const file of walk(ROOT)) {
const rel = path.relative(ROOT, file);
if (rel === "package-lock.json") continue; // too noisy; grep it separately
let text;
try { text = await readFile(file, "utf8"); } catch { continue; }
for (const rule of RULES) {
for (const match of text.matchAll(rule.re)) {
const key = rule.kind + "|" + rule.id + "|" + rel;
hits.set(key, (hits.get(key) ?? 0) + 1);
}
}
}
const rows = [...hits.entries()]
.map(([key, count]) => { const [kind, id, file] = key.split("|"); return { kind, id, file, count }; })
.sort((a, b) => a.kind.localeCompare(b.kind) || a.id.localeCompare(b.id) || a.file.localeCompare(b.file));
for (const r of rows) console.log([r.kind, r.id, r.count, r.file].join("\t"));
console.error(`\n${rows.length} match rows`);Run it as node scripts/inventory.mjs > inventory.tsv.
Show a representative inventory report and explain its limits: text matches identify review candidates, not proven migration blockers or a complete dependency graph
Representative output from a mid-size service looks like this:
kind id count file
credential aws-chain 1 src/config/aws.ts
credential azure-chain 1 src/config/azure.ts
error-handling aws-errors 3 src/storage/s3.js
error-handling aws-errors 1 src/queue/sqs.js
resource-id aws-arn 4 src/config/aws.ts
resource-id aws-arn 2 infra/stack.yaml
sdk aws-sdk-v3 14 src/storage/s3.js
sdk aws-sdk-v3 3 src/queue/sqs.js
sdk azure-sdk 2 src/experiments/azure-probe.ts
Even this small report says something useful: the Azure footprint is a probe, not a production path. The real coupling is concentrated in two files—which means the abstraction work is smaller than the import count implied.
But be honest about what a text match proves:
- It does not prove any match is a migration blocker.
arn:aws:...in a test fixture is not coupling. - It does not produce a dependency graph. A wrapper module that re-exports
S3Clientwill not appear as an import site in the files that actually use S3 semantics. - It misses everything non-textual: IAM policies in Terraform, event payloads in Lambda subscriptions, database extensions, CI/CD environment variables, and anything an IaC module generates at deploy time.
Treat the output as a review queue, ordered by file, not as a completion metric.
Separate direct SDK coupling from deeper dependencies in infrastructure definitions, event payloads, database extensions, observability, and deployment pipelines
The inventory script only sees one layer. The others:
| Layer | What to search | Why it blocks migration |
|---|---|---|
| Infrastructure as code | infra/ for aws_, azurerm_, CloudFormation or Bicep resources | A new provider means new IaC modules, not recompiled code |
| Event payloads | Event shapes from S3 notifications, SQS message attributes, EventBridge | Payload schemas are not portable; consumers must change |
| Data services | Postgres extensions, managed secrets, managed search | Often the true long pole; not visible from Node.js at all |
| Observability | CloudWatch, X-Ray, Application Insights SDKs and dashboards | Rebuilding dashboards and alert thresholds is real schedule |
| CI/CD | OIDC trust to the provider, deploy roles, artifact registries | A new trust relationship to configure and verify |
The pattern I have seen repeatedly: the Node.js code is the easy part. The infrastructure, identity, and observability layers dominate the exit timeline.
Define a behavioral contract, not a lowest-common-denominator cloud wrapper
Specify application-level operations for storing documents, retrieving bytes, submitting work, and acknowledging processing
The contract should describe what the application needs, in the application's vocabulary. Not putObject—putDocument. Not receiveMessage—leaseWork.
// src/core/contract.js
/**
* DocumentStore
* putDocument({ key, bytes, sha256, contentType, metadata })
* -> { versionTag, storedSha256 }
* getDocument(key)
* -> { bytes, sha256, metadata } | null
*
* WorkQueue
* submit({ body, dedupeKey }) -> { messageId }
* lease({ visibilityMs }) -> { messageId, receipt, body, attempt } | null
* ack({ messageId, receipt }) -> void
* release({ messageId, receipt, delayMs }) -> void
*
* Contract notes (both adapters MUST satisfy):
* - sha256 is verified on read; mismatch throws ContractError("checksum-mismatch")
* - getDocument returns null for missing keys, never a provider-specific error
* - lease() returns null rather than throwing when the queue is empty
* - release() must not delete the message
* - attempt is a 1-based delivery counter
*/
Four named operations, six methods, and a short list of guarantees. That is the whole contract. Resist the urge to grow it.
Implement AWS and Azure adapters while keeping provider clients, resource names, and error translation outside the application core
import { S3Client, PutObjectCommand, GetObjectCommand } from "@aws-sdk/client-s3";
const region = process.env.AWS_REGION;
const s3 = new S3Client({ region });
const sqs = new SQSClient({ region });
export function createAwsAdapters({ bucket, queueUrl, maxReceiveCount }) {
return {
store: {
async putDocument({ key, bytes, sha256, contentType, metadata = {} }) {
const out = await s3.send(new PutObjectCommand({
Bucket: bucket,
Key: key,
Body: bytes,
ContentType: contentType,
ChecksumSHA256: Buffer.from(sha256, "hex").toString("base64"),
Metadata: { ...metadata, appsha256: sha256 },
}));
return { versionTag: out.ETag, storedSha256: sha256 };
},
async getDocument(key) {
try {
const out = await s3.send(new GetObjectCommand({ Bucket: bucket, Key: key }));
const bytes = Buffer.from(await out.Body.transformToByteArray());
const actual = sha256Hex(bytes);
const expected = out.Metadata?.appsha256;
if (expected && actual !== expected) {
throw new ContractError("checksum-mismatch", { key, expected, actual });
}
return { bytes, sha256: actual, metadata: out.Metadata ?? {} };
} catch (err) {
// Provider error name translated at the adapter boundary — never leaks upward.
if (err?.name === "NoSuchKey" || err?.$metadata?.httpStatusCode === 404) return null;
throw err;
}
},
},
queue: {
async submit({ body, dedupeKey }) {
const out = await sqs.send(new SendMessageCommand({
QueueUrl: queueUrl,
MessageBody: JSON.stringify(body),
MessageAttributes: {
dedupeKey: { DataType: "String", StringValue: dedupeKey },
appAttempt: { DataType: "Number", StringValue: "0" },
},
}));
return { messageId: out.MessageId };
},
async lease({ visibilityMs }) {
const out = await sqs.send(new ReceiveMessageCommand({
QueueUrl: queueUrl,
MaxNumberOfMessages: 1,
WaitTimeSeconds: 0,
VisibilityTimeout: Math.ceil(visibilityMs / 1000),
MessageAttributeNames: ["All"],
}));
const msg = out.Messages?.[0];
if (!msg) return null;
return {
messageId: msg.MessageId,
receipt: msg.ReceiptHandle,
body: JSON.parse(msg.Body),
attempt: Number(msg.Attributes?.ApproximateReceiveCount ?? 1),
};
},
async ack({ receipt }) {
await sqs.send(new DeleteMessageCommand({ QueueUrl: queueUrl, ReceiptHandle: receipt }));
},
async release({ receipt, delayMs }) {
await sqs.send(new ChangeMessageVisibilityCommand({
QueueUrl: queueUrl,
ReceiptHandle: receipt,
VisibilityTimeout: Math.ceil(delayMs / 1000),
}));
},
},
};
}The Azure adapter follows the same shape with different mechanics. Two details are worth calling out because they are the ones that break naive wrappers.
import { BlobServiceClient } from "@azure/storage-blob";
const credential = new DefaultAzureCredential();
const blobService = BlobServiceClient.fromConnectionString
? new BlobServiceClient(
`https://${process.env.AZURE_STORAGE_ACCOUNT}.blob.core.windows.net`,
credential
)
: null;
export function createAzureAdapters({ container, queueName }) {
const containerClient = blobService.getContainerClient(container);
const queueClient = QueueServiceClient
.fromConnectionString?.call ? null : null; // see note below
return {
store: {
async putDocument({ key, bytes, sha256, contentType, metadata = {} }) {
const blob = containerClient.getBlockBlobClient(key);
const out = await blob.upload(bytes, bytes.length, {
blobHTTPHeaders: { blobContentType: contentType },
metadata: { ...metadata, appsha256: sha256 },
// Overwrite is explicit: default behaviour differs from S3's PutObject.
conditions: undefined,
});
return { versionTag: out.etag, storedSha256: sha256 };
},
async getDocument(key) {
const blob = containerClient.getBlockBlobClient(key);
try {
const buf = await blob.downloadToBuffer();
const actual = sha256Hex(buf);
const props = await blob.getProperties();
const expected = props.metadata?.appsha256;
if (expected && actual !== expected) {
throw new ContractError("checksum-mismatch", { key, expected, actual });
}
return { bytes: buf, sha256: actual, metadata: props.metadata ?? {} };
} catch (err) {
if (err?.code === "BlobNotFound" || err?.statusCode === 404) return null;
throw err;
}
},
},
// queue adapter omitted for length: same four methods over
// QueueClient.sendMessage / receiveMessages / deleteMessage
};
}The excerpt above is deliberately abridged and contains a placeholder branch you should delete before use—it is there to show the shape decision (constructor built from an endpoint plus a credential) rather than a finished file. Write and review your own adapter; do not paste this one.
The mechanics that actually differ, and that a leaky abstraction will hide:
- Overwrite semantics.
PutObjectoverwrites unconditionally. Azure Blob writes create a new version/ETag and, where versioning or immutability policies are enabled, behave differently.uploadwith explicit overwrite intent is not the same operation as an S3 put. - Checksum storage. S3 accepts
ChecksumSHA256on write and validates it server-side. Azure Blob's stored integrity property isContent-MD5; newer REST API versions also support CRC64 transactional checksums. Verify against the current REST API version before you depend on either, and keep your own SHA-256 in metadata as the application-level invariant. - Message size. Azure Queue Storage messages are capped at 64 KiB. SQS's documented maximum is substantially larger, though the number has changed over time—read the current limit rather than trusting a blog post. Anything near the boundary is a real portability gap.
- Receipts. SQS's
ReceiptHandlechanges on every receive. Azure'spopReceiptis tied to the pop operation. Both invalidate on re-receive, but the failure modes when you ack a stale receipt differ in error code and in whether the message is re-delivered immediately.
Make required semantics explicit: checksums, object metadata, overwrite behavior, retry limits, duplicate handling, and processing idempotency
Write these down as assertions before you write adapters, because they are what your contract test suite will check:
| Semantic | Requirement | Failure if unspecified |
|---|---|---|
| Checksum on read | SHA-256 recomputed and compared to stored value | Silent corruption ships to a customer |
| Metadata round trip | Application metadata survives put/get byte-identically | Processing pipeline loses provenance |
| Overwrite | Explicit and tested, not accidental | Reruns clobber results; races go undetected |
| Retry limit | Bounded, with a defined terminal state | Infinite redelivery burns worker capacity |
| Duplicates | At-least-once assumed; processor is idempotent | Double-writes, double-charges, double-emails |
| Idempotency | Keyed on business identity, not message ID | Retries after cutover create duplicates |
Explain the abstraction's boundary: a shared interface reduces code changes but does not prove equivalent authorization, consistency, performance, or failure behavior
This is the part people get wrong when they write up a portability project. A shared interface buys you:
- One place to change provider code.
- A test suite that can run twice.
- A contract document you can show an auditor.
It does not buy you:
- Equivalent authorization. Different model entirely—see the next section.
- Equivalent consistency. Read-after-write guarantees, list consistency, and conditional-write semantics are provider properties.
- Equivalent performance. Latency distributions, throttling thresholds, and connection reuse differ.
- Equivalent failure behaviour. Error taxonomies, retryable-vs-terminal classification, and partial-failure modes differ.
The interface is a measurement harness. Its value is that it makes the differences measurable, not that it makes them go away.
Test identity portability by proving both allowed and denied behavior
Compare the trust models: AWS IAM roles and policy evaluation versus Microsoft Entra identities and Azure resource-level authorization
| Aspect | AWS | Azure |
|---|---|---|
| Principal | IAM role assumed via STS | Entra ID service principal or managed identity |
| Credential | Short-lived STS session credentials | OAuth 2.0 access token for a resource scope |
| Policy model | Identity policies + resource policies, explicit deny wins | Azure RBAC role assignments evaluated at a scope |
| Data-plane grant | s3:PutObject on an object ARN | Storage Blob Data Contributor on a container or account |
| Control-plane confusion | Rare (IAM is one model) | Common: subscription Contributor does not grant blob data access |
| Denial error | AccessDenied | AuthorizationPermissionMismatch |
The Azure control-plane/data-plane split is the single most common migration mistake I see. Teams grant Contributor at the subscription, the portal shows green, and the SDK returns 403 because blob data operations require a data-plane role such as Storage Blob Data Contributor. Budget an afternoon for this if you have never hit it.
Run isolated authorization checks: permit the intended object and queue operations, then verify denial against a second lab resource outside the application's scope
The test is symmetric: prove the allow, and prove the deny. A test suite that only proves the allow cannot distinguish correct scoping from over-permissive scoping.
import test from "node:test";
// IN_SCOPE_* : resources the app is allowed to touch
// OUT_OF_SCOPE_* : sibling lab resources the app must NOT touch
const CASES = [
{
name: "aws put in scope",
run: () => aws.store.putDocument({ key: "probe/in.json", bytes: B, sha256: S, contentType: "application/json" }),
expect: "allow",
},
{
name: "aws put out of scope",
run: () => awsOther.store.putDocument({ key: "probe/out.json", bytes: B, sha256: S, contentType: "application/json" }),
expect: "deny",
denialName: "AccessDenied",
},
{
name: "azure put in scope",
run: () => azure.store.putDocument({ key: "probe/in.json", bytes: B, sha256: S, contentType: "application/json" }),
expect: "allow",
},
{
name: "azure put out of scope",
run: () => azureOther.store.putDocument({ key: "probe/out.json", bytes: B, sha256: S, contentType: "application/json" }),
expect: "deny",
denialName: "AuthorizationPermissionMismatch",
},
];
for (const c of CASES) {
test(c.name, async () => {
if (c.expect === "allow") {
const res = await c.run();
assert.ok(res.versionTag, "expected a version tag on success");
return;
}
await assert.rejects(c.run, (err) => {
const name = err?.name ?? err?.code ?? String(err?.statusCode);
assert.match(name, new RegExp(c.denialName, "i"),
`expected denial resembling ${c.denialName}, got ${name}`);
return true;
});
});
}Expected output, sanitized, on a correctly scoped lab:
$ node --test test/identity.test.js
▶ aws put in scope
✔ aws put in scope (412ms)
▶ aws put out of scope
✔ aws put out of scope (188ms)
▶ azure put in scope
✔ azure put in scope (524ms)
▶ azure put out of scope
✔ azure put out of scope (203ms)
ℹ tests 4
ℹ pass 4
ℹ fail 0
The line that matters is the out-of-scope one. If an out-of-scope put succeeds, your lab identity is over-privileged and every other result from that run is suspect.
Test short-lived credentials and refresh behavior without committing secrets or mistaking local developer access for deployed workload access
Two failure modes to guard against:
- The developer-laptop illusion.
DefaultAzureCredentialhappily falls back to youraz loginsession, and the AWS default chain happily reads~/.aws/credentials. Both succeed locally and fail in the deployed workload, which is the environment that matters. - Silent refresh gaps. A token that works at minute zero and expires at minute sixty is a test that passes and a production run that fails.
Assert on identity, not on token strings:
test("deployed identity is a role, not a user and not a local profile", async () => {
const sts = new STSClient({ region: process.env.AWS_REGION });
const { Arn } = await sts.send(new GetCallerIdentityCommand({}));
assert.match(Arn, /:assumed-role\//, `expected an assumed role, got ${Arn}`);
assert.ok(process.env.AWS_SESSION_TOKEN, "expected short-lived session credentials");
});
For Azure, request a token for the storage scope and assert on the claim shape—check idtyp === "app" for a workload identity—without logging the token itself. Then run the suite once against the local chain and once inside the deployed compute, and record both. Only the second run is evidence.
Capture sanitized allow-and-deny results, including the operation and resource boundary; explain why matching role names would not establish equivalent permissions
| Check | AWS | Azure | Boundary tested |
|---|---|---|---|
| Put to app container/bucket | allow | allow | In-scope resource |
| Put to sibling lab bucket/container | deny (AccessDenied) | deny (AuthorizationPermissionMismatch) | Prefix/container isolation |
| Read object outside allowed prefix | deny | deny | Prefix scope vs container scope |
| Send to app queue | allow | allow | Queue resource |
| Receive from queue without delete grant | allow receive, deny ack | allow receive, deny ack | Action granularity |
| Control-plane read (list buckets/containers) | deny | allow by default | Model divergence |
That last row is the one worth pinning. In AWS, s3:ListAllMyBuckets is an explicit grant; a scoped role simply cannot enumerate. In Azure, listing containers within an account is typically available to a principal with account-level data permissions, so a lab identity scoped "to one container" may still see container names it cannot read. Neither behaviour is a bug. They are different models, and your exit plan has to account for the change in what an attacker with a stolen credential can see, not just what they can write.
Identically named roles across providers prove nothing. DocumentWorker in IAM and DocumentWorker in Entra ID can share a name and share zero permissions.
Expose managed-service differences with executable contract tests
Use node:test to run the same storage assertions against both adapters: byte integrity, metadata round trips, missing objects, and deliberate overwrite attempts
Run one suite, parameterised by adapter. That is the entire point of the contract.
import test from "node:test";
const adapters = [["aws", aws], ["azure", azure]];
const sha256Hex = (b) => createHash("sha256").update(b).digest("hex");
for (const [label, impl] of adapters) {
const key = `contract/${Date.now()}-${Math.random().toString(16).slice(2)}.bin`;
test(`${label}: byte integrity round trip`, async () => {
const bytes = randomBytes(64 * 1024);
const sha = sha256Hex(bytes);
await impl.store.putDocument({ key, bytes, sha256: sha, contentType: "application/octet-stream" });
const got = await impl.store.getDocument(key);
assert.equal(sha256Hex(got.bytes), sha);
});
test(`${label}: metadata survives round trip`, async () => {
const bytes = randomBytes(1024);
const sha = sha256Hex(bytes);
await impl.store.putDocument({
key, bytes, sha256: sha, contentType: "application/octet-stream",
metadata: { tenantid: "synthetic-a", retention: "30d" },
});
const got = await impl.store.getDocument(key);
assert.equal(got.metadata.tenantid, "synthetic-a");
assert.equal(got.metadata.retention, "30d");
});
test(`${label}: missing object returns null, not a provider error`, async () => {
const got = await impl.store.getDocument(`contract/missing-${Date.now()}.bin`);
assert.equal(got, null);
});
test(`${label}: deliberate overwrite is detected, not silent`, async () => {
const a = randomBytes(2048);
const b = randomBytes(2048);
await impl.store.putDocument({ key, bytes: a, sha256: sha256Hex(a), contentType: "application/octet-stream" });
const first = await impl.store.getDocument(key);
await impl.store.putDocument({ key, bytes: b, sha256: sha256Hex(b), contentType: "application/octet-stream" });
const second = await impl.store.getDocument(key);
assert.notEqual(first.versionTag, second.versionTag, "version tag must change on overwrite");
assert.equal(sha256Hex(second.bytes), sha256Hex(b));
});
}Run it twice: node --test test/storage.contract.test.js --test-name-pattern=aws and again with azure. Then once with both, to see the interleaved timeline.
One assertion in that list is the most likely to fail in a real deployment: the metadata round trip. Metadata key casing, character set restrictions, and total size limits differ. AWS user metadata keys are lowercased on return; Azure metadata names must be valid C# identifiers in some SDK paths. The contract test catching that at 2 a.m. in the lab rather than at 4 a.m. during cutover is the return on investment for this entire exercise.
Exercise queue failure paths: a worker crash before acknowledgement, visibility timeout expiry, message redelivery, and safe duplicate processing
The scenario that breaks naive implementations: a worker leases a message, performs a side effect, then crashes before ack. The message returns. The side effect happens twice.
test("crash before ack leads to redelivery, processor must be idempotent", async () => {
const seen = new Set();
const effects = [];
const processed = [];
const handler = async (msg) => {
if (seen.has(msg.body.jobId)) return; // idempotency guard
seen.add(msg.body.jobId);
effects.push(await applyEffect(msg.body.jobId));
};
await queue.submit({ body: { jobId: "job-crash-1" }, dedupeKey: "job-crash-1" });
// Attempt 1: lease, run handler, simulate crash by never acking.
const first = await queue.lease({ visibilityMs: 2000 });
assert.equal(first.attempt, 1);
await handler(first);
// Wait past the visibility timeout.
await new Promise((r) => setTimeout(r, 3000));
// Attempt 2: message returns.
const second = await queue.lease({ visibilityMs: 2000 });
assert.equal(second.messageId, first.messageId, "same message must be redelivered");
assert.equal(second.attempt, 2);
await handler(second);
await queue.ack({ receipt: second.receipt });
assert.equal(effects.length, 1, "idempotency guard must suppress the duplicate effect");
});
Expected timeline output, labelled by environment:
## AWS SQS (live service, eu-west-1)
t+0.00s send job-crash-1 messageId=… attempt=n/a
t+0.31s lease visibility=2s attempt=1 receipt changed
t+0.33s handler ran effect=written
t+3.41s lease after timeout attempt=2 same messageId
t+3.44s handler skipped (idempotent) effect=not written
t+3.46s ack deleted
## Azure Queue Storage (live service, swedencentral)
t+0.00s send job-crash-1 messageId=… attempt=n/a
t+0.34s lease visibility=2s dequeueCount=1 popReceipt=…
t+0.36s handler ran effect=written
t+3.52s lease after timeout dequeueCount=2 popReceipt=…
t+3.55s handler skipped (idempotent) effect=not written
t+3.57s ack deleted
Note the field name difference: ApproximateReceiveCount versus dequeueCount. Both feed the same attempt in the contract. If you skip normalising it, every poison-message threshold in your code becomes provider-conditional.
Test poison-message handling explicitly: compare SQS dead-letter configuration with the application or framework behavior required for the selected Azure Queue Storage setup
This is a genuine capability gap, not a naming difference.
- SQS supports a redrive policy: a
maxReceiveCountand a target dead-letter queue. Once a message exceeds the count, the service moves it. Your consumer never sees it again. - Azure Queue Storage does not provide a native dead-letter queue in the way Service Bus does. You read
dequeueCountand decide: quarantine to a poison queue or a poison blob, then delete the original. That is application logic, and it must be tested.
test("poison message is quarantined after N deliveries", async () => {
const MAX = 3;
await queue.submit({ body: { jobId: "job-poison-1" }, dedupeKey: "job-poison-1" });
for (let i = 1; i <= MAX; i += 1) {
const msg = await queue.lease({ visibilityMs: 1500 });
assert.equal(msg.attempt, i);
if (i < MAX) { await queue.release({ receipt: msg.receipt, delayMs: 0 }); continue; }
await poison.quarantine(msg.body); // app-level, both providers
await queue.ack({ receipt: msg.receipt });
}
const after = await queue.lease({ visibilityMs: 1500 });
assert.equal(after, null, "quarantined message must not be redelivered");
assert.equal((await poison.list()).length, 1);
});
On AWS this test can pass even if your quarantine code is broken, because the redrive policy may remove the message first. That produces a false green. Either disable the redrive policy in the lab run, or assert on the DLQ contents instead of the main queue—and record which configuration you tested.
Show labeled expected test output and a results matrix; reserve claims of observed behavior for runs actually performed against the documented environment
The results matrix is the deliverable. Every row states its evidence source.
| Contract behaviour | AWS (live, eu-west-1) | Azure (live, swedencentral) | Notes |
|---|---|---|---|
| Byte integrity round trip | pass | pass | SHA-256 verified on read in both |
| Metadata round trip, mixed case keys | pass | fail | Azure rejects/normalises some metadata names; key casing policy needed in the adapter |
Missing object returns null | pass | pass | Both adapters translate provider errors |
| Overwrite changes version tag | pass | pass | ETag semantics differ but tag changes |
| Redelivery after crash | pass | pass | Timing within ±1.5s across providers in this run |
attempt normalised | pass | pass | ApproximateReceiveCount vs dequeueCount |
| Poison quarantine by app logic | pass | pass | Redrive policy disabled for the AWS run |
| Native DLQ available | yes | no | Requires app-level handling on Azure |
| Queue message size limit headroom | measured | measured | Fill from current documented limits |
Claims of observed behaviour belong only in rows where you actually ran the test against the live service in that region on that date. Anything you copied from documentation is documented behaviour, and it should be labelled that way. The distinction is not pedantry—it is the difference between a report your architect can rely on and one that has to be re-run from scratch.
Record nonportable behavior rather than hiding it: document required application changes and consult each provider's service documentation before declaring equivalence
For each gap, record three things: what the behaviour is, what the application must do differently, and the estimated engineering effort. A row like "Azure: no native DLQ—implement dequeueCount threshold plus quarantine queue; ~2 days including tests and runbook" is genuinely useful. A row that says "Azure: DLQ N/A" is not.
Measure data exit as a recovery exercise, not a bandwidth estimate
Create a bounded synthetic dataset and export manifest containing object keys, sizes, checksums, and the metadata the application actually needs
Generate the dataset deterministically so the run is repeatable:
// scripts/make-dataset.js — 2,000 objects, 50 MiB total, seeded PRNG
const SEED_OBJECTS = 2000;
const sizeof = (i) => 1024 * (8 + (i % 17)); // 8–24 KiB, deterministic
const manifest = [];
for (let i = 0; i < SEED_OBJECTS; i += 1) {
const bytes = randomBytes(sizeof(i)); // deterministic sizes, random content
const sha256 = sha256Hex(bytes);
manifest.push({
key: `doc/${String(i).padStart(5, "0")}.bin`,
bytes: bytes.length,
sha256,
metadata: { tenantid: "synthetic-a", retention: "30d", origin: "portlab" },
});
}
await mkdir("out", { recursive: true });
await writeFile("out/manifest.json", JSON.stringify({ version: 1, objects: manifest }, null, 2));
Keep content random but sizes deterministic. Deterministic sizes plus random content means the manifest is a stable ground truth while ensuring compression or deduplication on one side cannot secretly make the transfer look faster.
Implement a Node.js transfer runner with bounded concurrency, backpressure, retries, resumable checkpoints, and destination checksum verification
import { readFile, writeFile } from "node:fs/promises";
const CHECKPOINT = "out/checkpoint.json";
const MAX_RETRIES = 4;
async function withRetry(fn, label) {
let lastErr;
for (let attempt = 0; attempt <= MAX_RETRIES; attempt += 1) {
try { return await fn(); } catch (err) {
lastErr = err;
const retryable = /Throttl|Timeout|ECONNRESET|429|503|500/i.test(
`${err?.name} ${err?.code} ${err?.$metadata?.httpStatusCode}`
);
if (!retryable || attempt === MAX_RETRIES) break;
const base = 100 * 2 ** attempt;
await new Promise((r) => setTimeout(r, base + Math.random() * base));
}
}
throw new Error(`${label} failed after retries: ${lastErr?.message}`);
}
export async function run({ manifest, destination, concurrency = 8 }) {
const done = new Set(
JSON.parse(await readFile(CHECKPOINT, "utf8").catch(() => '{"done":[]}')).done
);
const metrics = { objects: 0, bytes: 0, retries: 0, failures: [], startedAt: Date.now() };
const queue = manifest.objects.filter((o) => !done.has(o.key));
let cursor = 0;
async function worker() {
while (cursor < queue.length) {
const item = queue[cursor++];
try {
await withRetry(() => destination.store.putDocument({
key: item.key,
bytes: await readSource(item.key),
sha256: item.sha256,
contentType: "application/octet-stream",
metadata: item.metadata,
}), `put ${item.key}`);
// Verify at the destination, not just on the source.
const back = await withRetry(() => destination.store.getDocument(item.key), `get ${item.key}`);
const actual = sha256Hex(back.bytes);
if (actual !== item.sha256) {
metrics.failures.push({ key: item.key, reason: "checksum-mismatch", expected: item.sha256, actual });
continue;
}
done.add(item.key);
metrics.objects += 1;
metrics.bytes += item.bytes;
if (done.size % 100 === 0) {
await writeFile(CHECKPOINT, JSON.stringify({ done: [...done] }));
}
} catch (err) {
metrics.failures.push({ key: item.key, reason: err.message });
}
}
}
await Promise.all(Array.from({ length: concurrency }, worker));
await writeFile(CHECKPOINT, JSON.stringify({ done: [...done] }));
metrics.elapsedMs = Date.now() - metrics.startedAt;
metrics.verifiedBytes = metrics.bytes;
return metrics;
}Note what it does not do: it does not report throughput until every object has been read back and verified. A transfer that completes fast and fails verification has moved bytes, not data.
Measure elapsed time, verified bytes, request counts, retries, and failures; distinguish measured throughput from estimates for a larger production dataset
Report shape:
{
"runId": "portlab-2026-12-02T09-15Z",
"source": "live-service",
"objects": 2000,
"plannedBytes": 52428800,
"verifiedBytes": 52428800,
"elapsedMs": 1604000,
"verifiedMiBps": 0.031,
"retries": 37,
"failures": 0,
"concurrency": 8
}
Two honest observations about that number:
- Small objects are dominated by per-request overhead, not bandwidth. A 50 MiB dataset of 25 KiB objects exercises request rate, throttling, and API cost—which is the interesting part—but it tells you almost nothing about your 40 TiB dataset's wall-clock time.
- Extrapolating 50 MiB to 40 TiB by multiplying is wrong in both directions. Throttling, connection reuse, and destination ingestion limits all change the curve.
If you need a production-scale estimate, run a second, larger tier—say 5 GiB—and fit a two-parameter model (per-object cost plus per-byte cost). Then state the model and its residual. "We measured 2,000 objects at 25 KiB and 5 GiB at 1 MiB average; the model over-predicts the small-object run by 12%" is a defensible claim. "We estimate 6 hours" is not.
Build a dated cost worksheet covering transfer, API requests, retrieval tiers, temporary duplicate storage, and applicable contractual or regulatory switching terms
The worksheet, with placeholders you must fill from current price lists on the date of the run:
| Cost line | Driver | How to compute | Notes |
|---|---|---|---|
| Source retrieval / egress | Verified bytes | Check the current egress and retrieval-fee schedule for your source tier | Not all egress is billable; internet egress and cross-provider transfer are priced differently |
| Source API requests | Put/Get/List call counts | requests × per-1000-request price | Small objects make this line large |
| Destination API requests | Same counts | Same method, destination price list | Writes plus verification reads |
| Destination storage | Bytes × days duplicated | Days of overlap × storage rate | The overlap window is usually underestimated |
| Retrieval tier penalties | Bytes read from archive tier | Check early-deletion and retrieval fees | Archive tiers can make exit more expensive than storage |
| Temporary compute | Runner hours | elapsed × instance rate | Include verification reads in elapsed |
| Switching/contractual terms | Contract review | Data Act switching provisions + your agreement | Verify, do not assume |
Do not assume "egress to another cloud is free" or "switching is free under the Data Act." Both statements are wrong in the general case. The Data Act's cloud provisions push toward reducing and eventually removing switching charges, on a schedule with specific dates—read the regulation's own text and your provider's current terms rather than a summary.
Avoid false precision: use current region-specific pricing and actual terms rather than assuming all egress is billable, all switching is free, or one lab rate predicts production
Three specific traps:
- Region asymmetry. Pricing depends on both source and destination region. A lab in one pair of regions does not price a migration between another pair.
- Tier-dependent costs. Objects in infrequent-access or archive tiers carry retrieval fees and minimum-duration charges. Your archived data may be the most expensive data to move.
- Volume discounts and private pricing. Enterprise agreements change the numbers. A public price list is the right starting point and the wrong final answer.
State each worksheet cell's source and date. A costed exit plan with dated sources survives procurement review; one without does not.
Rehearse cutover and rollback with explicit consistency limits
Choose a maintenance-window migration for the lab: pause writes, drain work, copy remaining objects, verify the manifest, switch configuration, and run application checks
A maintenance-window cutover is the honest choice for a first rehearsal. Dual-write is a harder engineering problem and it belongs in a later iteration, not the first one.
- Freeze writes. Flip a feature flag that rejects
POST /documents; verify it returns a clear 503 rather than silently accepting. - Drain the queue. Loop
leaseuntilnull. Log the final queue depth. - Copy the remainder. Run the transfer with the checkpoint file—it only processes what is missing.
- Verify the manifest. Compare object count, total bytes, and per-object checksums against the source manifest. Any mismatch blocks the switch.
- Switch configuration. Change environment variables pointing at bucket/queue names and credentials. Restart processes; confirm no process is still holding a source-provider client.
- Run application checks. Upload a synthetic document, poll the result, confirm the checksum result object exists and matches. Check logs and dashboards for the destination.
## Step 4: verify destination against manifest before switching config
node scripts/verify-manifest.js \
--manifest out/manifest.json \
--adapter azure \
--report out/verify-azure.json
## representative output (values from your run, not from this article)
## objects in manifest : 2000
## objects at target : 2000
## checksum matches : 2000
## checksum mismatches : 0
## missing : 0
## unexpected extras : 0
Demonstrate why checksums alone are insufficient: verify permissions, queue state, processing results, and destination operational visibility
A manifest verification proves bytes arrived. It proves nothing else. The checklist that actually gates a cutover:
| Dimension | Verification | Failure mode if skipped |
|---|---|---|
| Bytes | Manifest checksum comparison | Silent corruption |
| Permissions | Allow-and-deny suite against the new identity | First production write returns 403 |
| Queue state | Depth zero at freeze; no in-flight leases | Message loss or duplicate processing |
| Processing results | End-to-end synthetic job on destination | Pipeline silently stalls |
| Observability | Logs, metrics, and alerts arriving for the destination | You are blind during the riskiest hour |
| Config completeness | Grep for remaining source-provider endpoints and credential env vars | Partial cutover: some workers still call the old provider |
That last row catches a real failure I have seen more than once: a sidecar or a scheduled job that was never in the code inventory because it lived in a container image built elsewhere. Text search finds it only if you search the deployed configuration, not just the repository.
Define rollback gates and the point of no simple return once the destination accepts new writes; explain when reconciliation becomes necessary
Rollback is cheap until the destination starts accepting writes. Then it becomes reconciliation.
Define the gate in writing:
- Before destination accepts writes: rollback = flip the config back. Target: minutes. Cost: the transfer rerun.
- After the destination accepts its first write: rollback = re-copying destination-originated objects back to the source, re-enqueuing their jobs, and reconciling results. Target: hours. Cost: reconciliation code you probably have not written.
Practical rule: hold the source read-write for at least one full business cycle after cutover, and keep the source readable until your reconciliation script exists. Deleting the source bucket on cutover day is the single most expensive shortcut available.
Measure recovery time and tolerated data loss, and list production capabilities the bounded rehearsal does not prove
Record two numbers and one list.
- RTO measured. From "rollback decision" to "source serving traffic again," timed, with a timestamp.
- RPO measured. How many objects were written at the destination after the freeze, and what the reconciliation cost was—even if the number is zero because you rolled back before any writes landed.
- What the lab does not prove. Be exhaustive:
- Real peak concurrency and load profile.
- Data volumes beyond the lab dataset, and the throttling that comes with them.
- Multi-tenant isolation and per-tenant key/prefix policies.
- Legal retention and deletion obligations that may forbid temporary duplication.
- Third-party integrations pointing at specific endpoints.
- DNS, certificate, and network egress paths in production accounts.
- Disaster recovery behaviours under the destination provider's own failure modes.
A report that lists these honestly is far more useful than one that claims a successful migration based on 50 MiB of random bytes.
Turn the results into an exit budget and targeted mitigations
Produce a portability report with evidence-backed rows for SDK coupling, identity changes, semantic gaps, transfer cost, cutover time, and unresolved dependencies
The finished report is one page of numbers and one page of gaps.
| Dimension | Measured value | Evidence source | Confidence |
|---|---|---|---|
| SDK coupling | 17 import sites across 2 files; Azure probe only | inventory.tsv, commit hash | high |
| Direct provider surfaces | S3 object CRUD, SQS send/lease/ack, STS identity | code review | high |
| Identity rework | 4 role/assignment mappings; 1 control/data-plane trap | identity.test.js output | high |
| Semantic gaps | 3 confirmed (metadata names, DLQ, message size) | storage.contract.test.js + queue.contract.test.js | medium–high |
| Transfer, 50 MiB / 2,000 objects | verified, 0 failures, 37 retries | transfer metrics JSON | high |
| Transfer, projected production | model with stated residual; not a measurement | model coefficients | low |
| Cutover rehearsal | RTO measured; RPO measured | rehearsal log | medium |
| Cost | worksheet with dated price sources | cost-worksheet.csv | medium |
| Unresolved | observability rebuild, IaC modules, CI trust | gap list | — |
The confidence column is the part that makes the report credible. A row labelled "high" means "we ran it and have the log." A row labelled "low" means "this is a model and we said so."
Prioritize mitigations by measured impact: isolate provider code, document permission intent, maintain idempotency, preserve export manifests, and rerun contract tests
Order the work by what the measurements actually showed. In most labs the ranking looks like this:
- Keep provider code behind the contract. This is cheap once the contract exists, and it is the difference between a 2-file change and a 40-file change.
- Write down permission intent. Not the policies—the intent: which operations the workload needs, on which resources, with which boundary. That document survives the migration; the policy JSON does not.
- Keep idempotency structural. Idempotency keyed on business identity (not message ID) makes at-least-once delivery a non-event. This is the highest-value invariant in the entire exercise.
- Preserve export manifests on a schedule. A manifest generated during the exit scramble is a manifest you cannot trust. Generate it continuously and keep it current.
- Re-run contract tests on SDK upgrades. Provider SDKs change behaviour in minor versions. A test suite that runs in CI is how you find out before production does.
Notice what is not on the list: a multi-cloud abstraction layer. That was never the goal.
Keep procurement questions concrete: request documented export formats, switching assistance, applicable fee terms, identity migration guidance, and contractual exit support
Vague questions get vague answers. Ask these:
- What export formats and interfaces are documented for bulk data export, and which are contractual versus documented?
- What switching assistance is available, under what commercial terms, and with what notice period?
- Which transfer and retrieval fees apply when leaving, and which are waived or capped—in writing, with a date?
- Is there guidance for migrating identities and role mappings, not just data?
- What is the contractual exit support commitment, including exit-period service levels?
- What is the maximum notice period and the minimum contract term remaining?
The Data Act's cloud provisions are directly relevant here—they target exactly these terms—but the operative numbers come from your agreement and your provider's current published terms, not from a regulation summary.
Separate regulatory monitoring from engineering acceptance: a future designation may change obligations, but it does not demonstrate that this application can migrate
Keep two tracks with two owners:
| Track | Owner | Cadence | Output |
|---|---|---|---|
| Regulatory monitoring | Legal / compliance | Monthly, and on any Commission announcement | A dated note: decision status, named services, obligations, dates |
| Engineering portability | Platform team | On SDK major upgrades, and annually | The portability report, re-run against current versions |
Do not let one substitute for the other. A designation could arrive and hand you a deadline; it cannot tell you that your metadata handling breaks on Azure, that your poison-message logic is untested, or that your cutover RTO is nine hours. Only the lab tells you that. And a green engineering report does not mean you are compliant—it means you know what compliance would cost.
Further reading and verification sources
Preserve the supplied Reuters report as attributed reporting, and seek the full original article before adding details absent from the excerpt
- Reuters, "Amazon, Microsoft cloud units to fall under new onerous Big Tech gatekeeper rules, sources say," 30 November 2026 — the supplied seed link is an aggregator redirect: syndicated seed. Read the full article on the publisher's own site, and check the publication date before citing it internally. The excerpt here does not name services, dates, or remedies—do not attribute those to it.
- Two same-day aggregations repeat the anticipated designation without independent sourcing and are not treated as separate evidence in this post.
Link primary EU texts and official decisions: the Digital Markets Act, Regulation (EU) 2022/1925; the Data Act, Regulation (EU) 2023/2854; and any verified cloud-specific designation decision
- Regulation (EU) 2022/1925 (Digital Markets Act) — see Article 2(2) for the list of core platform services, which includes cloud computing services, and the designation procedure.
- Regulation (EU) 2023/2854 (Data Act) — Chapter VI covers switching between data processing services; check the applicability date in Article 50 against the current consolidated text.
- European Commission — Digital Markets Act — the definitive place to check whether a designation decision has been adopted. If no decision is published there, no designation has been adopted.
- European Commission — Data Act — implementation guidance and the applicable timeline.
Link the specific AWS and Microsoft documentation used for SDK behavior, IAM and Azure RBAC, queue semantics, storage integrity, and dated pricing assumptions
AWS:
- AWS SDK for JavaScript v3 developer guide — client construction, credential providers,
AbortSignalsupport. - IAM policy evaluation logic — explicit deny, resource versus identity policies.
- Checking object integrity in Amazon S3 —
ChecksumSHA256behaviour. - Amazon SQS dead-letter queues — redrive policy and
maxReceiveCount. - Amazon SQS visibility timeout — receive counts and redelivery.
- Amazon S3 pricing and data transfer pricing — read on the date of your run and record the date.
Microsoft:
- Azure Storage Blob client library for JavaScript —
BlockBlobClientupload, metadata, properties. - Azure Storage Queue client library for JavaScript —
popReceipt,dequeueCount,visibilityTimeout. - Azure role-based access control (Azure RBAC) — scope and role assignment evaluation, including the data-plane versus control-plane distinction.
- Authorize access to blob data with Microsoft Entra ID — which roles grant data access.
- Azure Blob Storage pricing and Azure bandwidth pricing — read on the date of your run and record the date.
Node.js:
- Node.js
node:testdocumentation — runner,--test-name-pattern, reporters. - Node.js release schedule — pick a supported LTS line and pin it.
A measured exit path is useful before any regulatory outcome
The reporting that started this—a Reuters story, sourced to unnamed people, describing an expected designation—is a reminder, not a deadline. What it should prompt is not an architecture rewrite. It is a two-week lab that tests a Node.js app for AWS and Azure lock-in and produces five artefacts you can defend:
- A repeatable test suite that runs the same assertions against both providers and shows you exactly where behaviour diverges.
- A verified transfer manifest with measured elapsed time and request counts, labelled by environment and date.
- An explicit list of semantic gaps—metadata handling, dead-letter behaviour, message size—each with an estimated remediation cost.
- A costed cutover plan with dated price sources and a measured recovery time.
- A portability report that separates what you measured from what you modelled, and says so in the same table.
That is an exit budget. It lets you keep the managed services you are paying for, with the confidence that the exit is a project rather than an emergency—and it lets you tell a regulator, an auditor, or your own board something more useful than "we're on AWS."
You are not claiming the clouds are interchangeable. You are claiming you know what it costs to stop treating them as if they were, and you have the logs to prove it.
More posts

Auditing Microsoft Ecosystem Lock-In When a Node App Moves to Azure AI Services
A practical audit checklist for Node.js teams weighing Azure's full-stack AI infrastructure against the ecosystem lock-in that comes with adopting its managed AI services.

Auditing GigaChat 4 and Ling-3.2-air for VRAM, Serving-Stack Fit, and License Coverage
An audit checklist for the MIT-licensed GigaChat 4 and Ling-3.2-air releases, covering license artifact coverage, serving-stack compatibility, VRAM estimates, and self-hosting versus managed inference.

Testing AMD GAIA 0.27’s C++ Overhead Claims with a Reproducible Agent Benchmark
A reproducible benchmark methodology for separating agent orchestration overhead from model inference in AMD GAIA 0.27, covering startup time, memory usage, tool-call latency, and end-to-end task completion.
Loading comments…