Work
26 May 2026#aws#cdk#iac#s3 1 min read
Two stacks, one bucket notification
Two CDK stacks configuring one bucket overwrite each other silently.
Two stacks each declared a notification on the same bucket. Each deploy overwrote the other's configuration, and nothing failed; the loader simply stopped being told about uploads.
flowchart LR
A[Stack A deploy] -->|writes the whole config| N[Bucket notifications]
B[Stack B deploy] -->|writes the whole config| N
N -.last deploy wins.-> L[Loader]The fix was ownership: one stack owns the bucket's notifications and exports what the other needs. The hard part was noticing.
Takeaway
A configuration that is replaced rather than merged does not raise an error, so the check has to be in the deploy, not in the logs.
Client engagement, 2021 to 2026. Names, identifiers and internals are generalised.