aws / aws/aws-cdk

aws-lambda-python-alpha: Default Bundling File Access is not correct.

Open
#27,352 1 comment 1 reaction 0 assignees View on GitHub
@aws-cdk/aws-lambda-python bug effort/medium p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

The problem is simple. The default BundlingFileAccess is NOT set to BundlingFileAccess.VOLUME_COPY. Instead, it is set to BIND_MOUNT.

I understand this was done for performance, but compatability beats performance. Everyone using docker-in-docker via vscode .devcontainers gets errors during the build process. That is a lot of people spending hours trying to figure out strange file permission errors.

### Expected Behavior

The default should be set to BundlingFileAccess.VOLUME_COPY.

### Current Behavior

The default is set to BIND_MOUNT which does not cover many developers dev environment.

### Reproduction Steps

This problem occurs in any docker-in-docker. It is even mentioned in a README.md somewhere.

### Possible Solution

Change the default in bundling.ts, or even in core.

### Additional Information/Context

In essence, docker-in-docker is a popular way to work via vscode. It is popular enough that the BundleFileAccess option default needs to be changed.

### CDK CLI Version

2.96.2 (build 3edd240)

### Framework Version

_No response_

### Node.js Version

v20.7.0

### OS

CentOS

### Language

Python

### Language Version

Python 3.10

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in bundling.ts and inspect where the default BundlingFileAccess value is selected. Confirm the current behavior for docker-in-docker users, change the default to VOLUME_COPY, and run the relevant AWS CDK bundling tests to verify the default and existing explicit options.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker, typescript
Domain
build-system, cloud, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.