Skip to content

Commit

Permalink
chore(lambda-nodejs): unescaped whitespace in props.bundling.inject b…
Browse files Browse the repository at this point in the history
…reaks 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*
  • Loading branch information
bombguy authored Apr 16, 2024
1 parent 8e2cbae commit 72b6d8e
Show file tree
Hide file tree
Showing 11 changed files with 443 additions and 185 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,64 @@
"jshandlerServiceRole781AF366"
]
},
"jshandlerbundlingpathServiceRole827F7127": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
]
}
]
}
},
"jshandlerbundlingpath4B2FEE93": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "ff5094dcce664452d1dae905962ca26807cc309e15cee9e168a256ad019ef379.zip"
},
"Environment": {
"Variables": {
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
}
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"jshandlerbundlingpathServiceRole827F7127",
"Arn"
]
},
"Runtime": "nodejs18.x"
},
"DependsOn": [
"jshandlerbundlingpathServiceRole827F7127"
]
},
"Vpc8378EB38": {
"Type": "AWS::EC2::VPC",
"Properties": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 72b6d8e

Please sign in to comment.