Skip to content

Commit 72b6d8e

Browse files
authored
chore(lambda-nodejs): unescaped whitespace in props.bundling.inject breaks esbuild (#29561)
### Issue # (if applicable) Closes #29559 . ### Reason for this change NodejsFunction fails to build in projects with spaces in path ### Description of changes Updated how it maps esbuild arguments from bundling props ### Description of how you validated changes Tried building the NodejsFunction ### 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*
1 parent 8e2cbae commit 72b6d8e

File tree

11 files changed

+443
-185
lines changed

11 files changed

+443
-185
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.ff5094dcce664452d1dae905962ca26807cc309e15cee9e168a256ad019ef379/index.js

+42
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.assets.json

+16-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.template.json

+58
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,64 @@
174174
"jshandlerServiceRole781AF366"
175175
]
176176
},
177+
"jshandlerbundlingpathServiceRole827F7127": {
178+
"Type": "AWS::IAM::Role",
179+
"Properties": {
180+
"AssumeRolePolicyDocument": {
181+
"Statement": [
182+
{
183+
"Action": "sts:AssumeRole",
184+
"Effect": "Allow",
185+
"Principal": {
186+
"Service": "lambda.amazonaws.com"
187+
}
188+
}
189+
],
190+
"Version": "2012-10-17"
191+
},
192+
"ManagedPolicyArns": [
193+
{
194+
"Fn::Join": [
195+
"",
196+
[
197+
"arn:",
198+
{
199+
"Ref": "AWS::Partition"
200+
},
201+
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
202+
]
203+
]
204+
}
205+
]
206+
}
207+
},
208+
"jshandlerbundlingpath4B2FEE93": {
209+
"Type": "AWS::Lambda::Function",
210+
"Properties": {
211+
"Code": {
212+
"S3Bucket": {
213+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
214+
},
215+
"S3Key": "ff5094dcce664452d1dae905962ca26807cc309e15cee9e168a256ad019ef379.zip"
216+
},
217+
"Environment": {
218+
"Variables": {
219+
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
220+
}
221+
},
222+
"Handler": "index.handler",
223+
"Role": {
224+
"Fn::GetAtt": [
225+
"jshandlerbundlingpathServiceRole827F7127",
226+
"Arn"
227+
]
228+
},
229+
"Runtime": "nodejs18.x"
230+
},
231+
"DependsOn": [
232+
"jshandlerbundlingpathServiceRole827F7127"
233+
]
234+
},
177235
"Vpc8378EB38": {
178236
"Type": "AWS::EC2::VPC",
179237
"Properties": {

packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.function.js.snapshot/integ.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.function.js.snapshot/manifest.json

+14-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)