Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungI wanted the diff, not a screenshot: a small URL-change API(24.09.2026 um 06:05 Uhr)
Sichere ProgrammierungFreeze Object Identity Before One Mutator Extract(24.09.2026 um 06:06 Uhr)
Sichere ProgrammierungRun an n8n workflow when a page's text changes(24.09.2026 um 06:12 Uhr)
Sichere ProgrammierungThe Spreadsheet That Runs Your Company (And Why That Should Worry You)(24.09.2026 um 06:12 Uhr)
Sichere ProgrammierungArchitecting an Enterprise Network on AWS Cloud WAN(24.09.2026 um 06:31 Uhr)
Sichere ProgrammierungI wanted the diff, not a screenshot: a small URL-change API(24.09.2026 um 06:05 Uhr)
Sichere ProgrammierungFreeze Object Identity Before One Mutator Extract(24.09.2026 um 06:06 Uhr)
Sichere ProgrammierungRun an n8n workflow when a page's text changes(24.09.2026 um 06:12 Uhr)
Sichere ProgrammierungThe Spreadsheet That Runs Your Company (And Why That Should Worry You)(24.09.2026 um 06:12 Uhr)
Sichere ProgrammierungArchitecting an Enterprise Network on AWS Cloud WAN(24.09.2026 um 06:31 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How to Speedup Your CDK Test Feedback

When you deploy lambda functions using CDK and a test-driven approach, you might have noticed that the test feedback takes longer each time you add a new function. That’s because each function will be bundled with its own set of d…

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

When you deploy lambda functions using CDK and a test-driven approach, you might have noticed that the test feedback takes longer each time you add a new function. That’s because each function will be bundled with its own set of dependencies. These dependencies need to be downloaded before CDK can bundle them into a single package.






CDK Synth



Before you can deploy your infrastructure you need to synthesize your code. This will transform your code into a CloudFormation template plus some assets. When you have a lambda function the content of this function will be bundled into one of these assets.



This all makes sense when you deploy your code. You need to ship the actual lambda code to AWS in the correct format with the correct dependencies. Otherwise, your solution will not work.



But the synth step is also used when you test your infrastructure code. The process is like the deploy step. Instead of deploying your templates, you will inspect the outcome. For example, you are expecting a Lambda function. This function will use a certain runtime. And, for production environments, you want to confirm that the backup tags are applied.






Skip the bundling when you run the tests!



It might be an obvious answer. Skip the bundling when you run the tests! Assume we use the following code to create a Lambda function:




const sampleFunction = new lambda.Function(this, 'SampleFunction', {
code: lambda.Code.fromAsset('./sample_function/', {
bundling: {
command: ['bash', '-c', 'pip install --target /asset-output -r ./requirements.txt && cp -au . /asset-output'],
image: lambda.Runtime.PYTHON_3_12.bundlingImage,
},
}),
runtime: lambda.Runtime.PYTHON_3_12,
handler: 'index.handler',
timeout: cdk.Duration.seconds(60),
memorySize: 1024,
});







You can see that we are loading the code from a folder called sample_function. Then we pass the options on how CDK needs to bundle the function:




  • First, the dependencies will be downloaded and installed.

  • Next, the content from the sample_function is copied.

  • The content of the asset_output folder will be the bundled function.



Now, these steps will become part of the test. You can skip the bundling by defining the test as followed:




import * as cdk from 'aws-cdk-lib';
import { Template } from 'aws-cdk-lib/assertions';
import { AppStack } from './AppStack';

test('Sample unit test on how to skip bundling', () => {
// Setup the application
const app = new cdk.App({
context: {
'aws:cdk:bundling-stacks': [],
},
});

// Setup the CDK stack
const stack = new AppStack(app, 'MyTestStack', {
backups: true, // For production we enable backups
});

// Synth the code
const template = Template.fromStack(stack);

// Confirm that the Lambda function uses python 3.12 runtime
template.hasResourceProperties('AWS::Lambda::Function', {
Runtime: 'python3.12',
});

// Confirm that the DynamoDB table has the Backup tag
template.hasResourceProperties('AWS::DynamoDB::Table', {
Tags: [
{
Key: 'Backup',
Value: 'YES',
},
],
});
});







A few things are happening in this example:




  • When the app object is being created, some specific context is supplied. This context will overwrite the aws:cdk:bundling-stacks option. This means that the bundling options are overwritten with nothing.

  • Then the stack object is created and a template is synthesized.

  • We will confirm that we have a lambda function with the Python 3.12 runtime.

  • We will also confirm that the DynamoDB table has the Backup tag with the value YES.



Because we skipped the bundling the test will execute immediately. Giving you instant feedback on the code that you have been writing. You can now run the test after each change. This enables you to create a nice development cycle:




  1. Adding a test implementation.

  2. Adding the business logic.

  3. Running the tests to confirm the implementation.

  4. Repeat






Why is it ok to skip the bundling?



When you write tests you should confirm your business logic. The bundling logic has already been tested by the team that is maintaining CDK. So you don’t need to test it and it’s safe to skip the bundling.



You could argue that the options in the bundling need validation too. And yes, that is now skipped. Yet the bundling of these functions is usually always the same for each runtime. And when you deploy you will catch any bundling mistakes anyway. Next to that, you have tests for your lambda code as well. These tests are not executed against the bundled version of your code. These are executed against the source version of your code. So there is no need to bundle them from a testing perspective.






Conclusion



When it takes too long to run tests, you will run them less. This has a negative impact on your quality and efficiency. You can solve this by excluding heavy operations. Operations like downloading dependencies and bundling your lambda functions. This also helps with focussing on the tests that matter. The tests that actually confirm your business value.



Follow me if you want to learn more about improving your efficiency and code quality.



Photo by Pixabay



The post How to Speedup Your CDK Test Feedback appeared first on Xebia.

SOC Incident Playbook: Remote Code Execution (RCE) Defense
title: Detect Exploitation - How to Speedup Your CDK Test Feedback
id: 73a0646a-1e16-4ba6-af6d-e3068a711976
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "How to Speedup Your CDK Test F" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich How to Speedup Your CDK Test Feedback.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Speedup Your CDK Test Feedback

Thematisch verwandte Begriffe: Speedup, Your, Test, Feedback · 6 Treffer

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 ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-96676 | A vulnerability was identified in Fast FAC1900R 20190827_2.0.2. The impa…
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 TTP ⏱️ 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