aws / aws/aws-cdk

aws-lambda-nodejs: build locally with `/bin/sh` instead of or in addition to `bash`

Open
#27,926 2 comments 3 reactions 0 assignees View on GitHub
@aws-cdk/aws-lambda-nodejs effort/medium feature-request p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

Currently `bash` is required, when building locally.
It would be better if the shell, where the `esbuild` should be run can be chosen.

It would be needed for machines, which don't have `bash` installed.

### Use Case

Especially useful for continuous deployment runners, which don't have `bash` installed.

### Proposed Solution

Seems like `bash` is hardcoded in the Bundling class.
The shell can be made configurable instead or as a quick solution `bash` could be replaced by `/bin/sh`, assuming that `/bin/sh` is available on almoust all linux systems.

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.104.0

### Environment details (OS name and version, etc.)

linux

Contributor guide

Open the contributing guide

Research direction

Start by locating the aws-lambda-nodejs Bundling class and trace where the local esbuild shell is selected. Check the existing bundling tests or entry points around that class, then verify that the shell can be chosen or that /bin/sh works for local builds without requiring bash.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
build-system, cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.