-
Notifications
You must be signed in to change notification settings - Fork 4.1k
aws-s3-deployment: DeployTimeSubstitutedFile
doesn't keep original file name
#28450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Seems like a deliberate design choice as opposed to a bug. This would probably make more sense as a feature request. |
@garysassano , thanks for reporting this. Agree with @gshpychka , this might be a feature request. |
Any update on this issue? This is complicating our deployment because we have to do another step to rename the file via S3 API. |
There will not be any updates unless someone from the community implements this (since this is a feature request and it's marked as P2). If there are updates, you will see them here |
…itution (#29029) ### Issue # (if applicable) Closes #28450 ### Reason for this change Currently, the filename is automatically generated based on its fingerprint. There's no way to override the resulting filename. ### Description of changes Added an optional `destinationKey` parameter. If this is provided, the construct would use the `destinationKey` when uploading the resulting processed file to S3. If the `destinationKey` is not provided, the current approach would be the default. ### Description of how you validated changes Added a unit test to confirm that the correct filename is being used. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…itution (#29029) ### Issue # (if applicable) Closes #28450 ### Reason for this change Currently, the filename is automatically generated based on its fingerprint. There's no way to override the resulting filename. ### Description of changes Added an optional `destinationKey` parameter. If this is provided, the construct would use the `destinationKey` when uploading the resulting processed file to S3. If the `destinationKey` is not provided, the current approach would be the default. ### Description of how you validated changes Added a unit test to confirm that the correct filename is being used. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
When using DeployTimeSubstitutedFile, it might seem logical to assume that the uploaded file name, where substitutions are made, remains unchanged. However, this is not the case. Surprisingly, the system utilizes the file's fingerprint as the object key, rather than retaining the original file name. This approach can be quite unintuitive and unhelpful.
Expected Behavior
see above
Current Behavior
see above
Reproduction Steps
see above
Possible Solution
Use the original file name as the object key.
Additional Information/Context
No response
CDK CLI Version
2.115.0
Framework Version
No response
Node.js Version
18.18.2
OS
Windows 11 23H2
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: