bucket!() { /* proc-macro */ }Expand description
Creates a validated Bucket wrapper for existing AWS S3 bucket references at compile time.
This macro ensures that the input string refers to an existing S3 bucket in your AWS account. It queries S3 to verify the bucket exists.
§Validation Rules
- Value must not be an ARN (cannot start with “arn:”)
- Value must not include the “s3:” prefix
- Bucket must exist in your AWS account (verified at compile time)
§Environment Variables
rusty_cdk_NO_REMOTE: Set totrueto skip remote AWS checks (for offline development)rusty_cdk_RECHECK: Set totrueto force revalidation of cached bucket names
§Note
This macro caches validation results to improve compile times. The first compilation will
query AWS to verify the bucket exists. Later compilations will use the cached result unless rusty_cdk_RECHECK is set to true.
§Override
You can avoid this verification by using the wrapper directly, but you lose all the above compile time guarantees by doing so.