I need to pass a configuration value from one CDK stack to another and use that value in the second stack's construct code bundling step. E.g. first stack is S3 bucket and the second stack is Lambda@Edge function which doesn't support environment variables and needs to embed S3 bucket name in code during bundling in a custom construct. When I do this I get values like ${Token[TOKEN.214]}
instead of a real bucket name.
let bucket: Bucket
// This function builds and bundles the code for Lambda@Edge
buildLambdaCode(..., { env: { S3_BUCKET: bucket.bucketName } })