Cross-cloud migration and vendor-lock-in escape
The Problem
Step-by-Step Deployment Recommendations
3
Wire your backend client to Flashback
# fb_s3_client.py
import boto3
from botocore.client import Config
def s3_client_for(endpoint, key_id, key_secret):
session = boto3.session.Session(
aws_access_key_id=key_id, aws_secret_access_key=key_secret
)
return session.client("s3", endpoint_url=endpoint, config=Config(signature_version="s3v4"))// fbS3Client.ts
import { S3Client } from "@aws-sdk/client-s3";
const clients = new Map<string, S3Client>();
export function s3ClientFor(endpoint: string, keyId: string, secret: string) {
if (!clients.has(endpoint)) {
clients.set(endpoint, new S3Client({
endpoint, region: "us-east-1",
credentials: { accessKeyId: keyId, secretAccessKey: secret },
forcePathStyle: true
}));
}
return clients.get(endpoint)!;
}4
Implement the migration routine
A. Native copy (fast path, usually lowest cost)
from config_flashback_s3 import s3
def copy_native_s3(src_bucket: str, src_key: str, dst_bucket: str, dst_key: str):
s3.copy_object(
Bucket=dst_bucket,
Key=dst_key,
CopySource=f"{src_bucket}/{src_key}", # URL-encode if needed
)import { CopyObjectCommand } from "@aws-sdk/client-s3";
import { s3 } from "./configFlashbackS3";
export async function copyNativeS3(srcBucket: string, srcKey: string, dstBucket: string, dstKey: string) {
await s3.send(new CopyObjectCommand({
Bucket: dstBucket,
Key: dstKey,
CopySource: `${srcBucket}/${encodeURIComponent(srcKey)}`
}));
}B. Emulated copy (cross-provider or when native is disallowed)
5
Configure quotas & alerts
const H = { Accept: "application/json", Authorization: `Bearer ${process.env.FB_JWT}` };
const daily = await fetch("https://backend.flashback.tech/stats/daily", { headers: H }).then(r=>r.json());
const minute = await fetch("https://backend.flashback.tech/stats/minute", { headers: H }).then(r=>r.json());PreviousCredit-aware multi-cloud storage behind one endpointNextDisaster recovery (DR) / cold-tier backup to DePIN
Last updated
Was this helpful?