Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosfreeCodeCamp.org: TimescaleDB Course – PostgreSQL for Time-Series Data(23.09.2026 um 12:30 Uhr)
Windows Tipps & SecurityAndroid 17: Rollout auf Samsung-Galaxy-Smartphones verzögert sich(23.09.2026 um 11:42 Uhr)
Unix & Linux ServerUSN-8733-2: Gzip vulnerabilities(22.09.2026 um 18:04 Uhr)
Sichere ProgrammierungHow to Build Custom PowerPoint Add-Ins for Enterprise Teams(23.09.2026 um 11:25 Uhr)
Sichere ProgrammierungSearch Google Jobs in Real-Time with Go and SerpApi 🚀(23.09.2026 um 12:13 Uhr)
Sichere ProgrammierungA Psychological State is a Coefficient Vector(23.09.2026 um 12:16 Uhr)
YouTube Security VideosfreeCodeCamp.org: TimescaleDB Course – PostgreSQL for Time-Series Data(23.09.2026 um 12:30 Uhr)
Windows Tipps & SecurityAndroid 17: Rollout auf Samsung-Galaxy-Smartphones verzögert sich(23.09.2026 um 11:42 Uhr)
Unix & Linux ServerUSN-8733-2: Gzip vulnerabilities(22.09.2026 um 18:04 Uhr)
Sichere ProgrammierungHow to Build Custom PowerPoint Add-Ins for Enterprise Teams(23.09.2026 um 11:25 Uhr)
Sichere ProgrammierungSearch Google Jobs in Real-Time with Go and SerpApi 🚀(23.09.2026 um 12:13 Uhr)
Sichere ProgrammierungA Psychological State is a Coefficient Vector(23.09.2026 um 12:16 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

S3 Bucket Regional Namespaces with CDK

So you learned about the new S3 bucket account regional namespace feature and you're thinking "this is amazing, let me try in CDK." Well... This is where you'll learn that the L2 Bucket construct has not yet been updated to allow for…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

So you learned about the new S3 bucket account regional namespace feature and you're thinking "this is amazing, let me try in CDK."



Well... This is where you'll learn that the L2 Bucket construct has not yet been updated to allow for this.



Currently there are the following items which are tracking the long term fix.





You should give both of these a 👍 to help them get prioritized and shipped.






Workaround



Good news there is a workaround! By using the L1 construct as an escape hatch we can then pass in bucketNamePrefix and bucketNamespace.




import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as s3 from 'aws-cdk-lib/aws-s3';

export class Cdk101Stack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);

// WORKAROUND: use the L1 bucket construct
new s3.CfnBucket(this, "ConfigBucket", {
bucketNamePrefix: "config",
bucketNamespace: "account-regional",
});
}
}





After deploying this you'll see your new bucket with {name}-{account}-{region}-an (the an suffix indicates account namespace).





That will work if you only need to deploy the bucket. But if you need an L2 reference (IBucket), use s3.Bucket.fromCfnBucket to convert it.



Full code demo:



import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as s3 from 'aws-cdk-lib/aws-s3';
import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment';
import * as path from 'path';

export class Cdk101Stack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);

// NOTE: workaround for the following CDK issues
// https://github.com/aws/aws-cdk/issues/37760
// https://github.com/aws/aws-cdk/pull/37386
const cfnBucket = new s3.CfnBucket(this, "ConfigBucket", {
bucketNamePrefix: "config",
bucketNamespace: "account-regional",
});

const bucket = s3.Bucket.fromCfnBucket(cfnBucket);

// Upload a config file to the bucket on deploy
new s3deploy.BucketDeployment(this, 'DeployConfig', {
sources: [s3deploy.Source.asset(path.join(__dirname, '../config'))],
destinationBucket: bucket,
});

}
}







Hope this blog helped you get a workaround for now and once aws-cdk-lib is patched I'll update this blog.



Happy coding 😃!



Follow AWS for more articles like this


Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten S3 Bucket Regional Namespaces with CDK

Thematisch verwandte Begriffe: Bucket, Regional, Namespaces, with · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-96258 | A vulnerability has been found in onSite internet GmbH Auktion NG Auktio…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick