A bucket is a storage resource declared in an infrastructure DSL and created in AWS through the SDK. The smallest declaration gives the bucket a name: `iac! { bucket unique }`. The DSL aims to report misspelled or unsupported resource declarations before deployment rather than waiting for cloud-side failures. section 9.2 section 9.5
iac! {
bucket unique
}
This minimal declaration expresses a named bucket as infrastructure code. section 9.2
During parsing, `bucket` is a custom `syn` keyword for a resource declaration. A `Bucket` stores its required name and whether it requests an event connection. Parsing consumes `bucket`, requires an identifier name, and recognizes `=>` as an event marker when followed by a lambda declaration. Unknown resources and missing names become span-aware compiler errors. section 9.3.2
Connect bucket events to a function
A bucket may request event delivery to a lambda, letting object creation or changes trigger work such as database updates or business workflows. The parsed input requires a lambda whenever the bucket has an event connection; infrastructure creation then creates the lambda, creates the bucket, and links them. section 9.2 section 9.3.2 section 9.5
Treat generated bucket creation as production infrastructure, not a one-shot demo:
- Add retries for bucket-to-lambda linking, since AWS may briefly report a newly created resource as missing. section 9.5
- Make creation idempotent by checking names or maintaining state; reruns otherwise fail when resources already exist. section 9.5
- Prevent IDE macro expansion from creating resources during completion, because it can claim a bucket name unexpectedly. section 9.5








