(@aws-cdk/aws-glue-alpha): New Prefix check logic is not follow normal S3 prefix format #27396
Labels
@aws-cdk/aws-glue
Related to AWS Glue
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Describe the bug
The latest version of job.ts in @aws-cdk/aws-glue-alpha package added check on prefix, and require prefix must begin with "/" and not end with "/"
https://github.com/aws/aws-cdk/blame/0bb49b42406b9b3692063537e6194af80d65c7f9/packages/%40aws-cdk/aws-glue-alpha/lib/job.ts#L847
But, normally for S3 prefix, it should not start with "/" and for the folder, it should end with "/",
https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html
Expected Behavior
The prefix validation should check prefix must end with "/" not start with "/"
Current Behavior
Error: Invalid prefix format (value: sparkHistoryLogs/CxRfMtrc_RefinementMetric/)
Prefix must begin with '/'
Prefix must not end with '/'
at Job.validatePrefix (/Volumes/workplace/MarcaGlueDataProcessing/src/MarcaGlueDataProcessingCDK/node_modules/@aws-cdk/aws-glue-alpha/lib/job.js:451:19)
Reproduction Steps
Create Job construct with "/' ended sparkHistoryLogs parameter
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.99.0-alpha.0
Framework Version
No response
Node.js Version
18.0
OS
Macos
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: