s3: CorsRule not setting exposeHeaders due to a mis-spelled property name #30230
Labels
@aws-cdk/aws-s3
Related to Amazon S3
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
The
s3.CorsRule
interface contains a typo in theexposeHeaders
CORS property (hasexposedHeaders
instead,"d"
being the difference), which in turn preventsexposeHeaders
to be actually set on an S3 bucket.Expected Behavior
sets this CORS policy on a bucket:
Current Behavior
The above code is effectively setting the CORS policy to this:
Reproduction Steps
Set CORS policy on an S3 Bucket with CDK, that contains settings for exposing headers.
Possible Solution
Use the correct key name here:
aws-cdk/packages/aws-cdk-lib/aws-s3/lib/bucket.ts
Line 2328 in 7624c62
exposeHeaders
, that is recognized by S3).Note that the parameter name in CDK can possibly stay the same, similar to what is being done here in a Lambda URL:
aws-cdk/packages/aws-cdk-lib/aws-lambda/lib/function-url.ts
Line 268 in 7624c62
Additional Information/Context
No response
CDK CLI Version
2.118.0 (build a40f2ec)
Framework Version
No response
Node.js Version
v18.18.0
OS
any
Language
Python
Language Version
3.12
Other information
No response
The text was updated successfully, but these errors were encountered: