aws / aws/aws-cdk

[aws-s3-deployment] support for empty folder deployement

Open
#9,666 9 comments 9 reactions 0 assignees View on GitHub
@aws-cdk/aws-s3-deployment effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Description

With the following assets folder:

assets/
|----> FolderA/

Instantiate BucketDeployement has no effect.
```
new BucketDeployment(this, "DeployWebsite", {
sources: [Source.asset("./assets")],
destinationBucket: myBucket
}); // no effect
```
What would be expected?

A bucket with the following structure:

Mybucket:
|----> FolderA/

### Use Case

required to generate folder-level access bucket policies

### Proposed Solution

As a workaround, i use empty file to force BucketDeployement to render the folder structures
And delete the empty file afterwards

assets/
|----> FolderA/ ---->emptyFiles.txt

### Other

* [ ] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change

---

This is a :rocket: Feature Request

Contributor guide

Open the contributing guide

Research direction

Start by tracing the BucketDeployment construct and Source.asset handling in the aws-cdk repository. Check how assets are enumerated before deployment and identify where empty directories are discarded. Done means an assets folder containing only FolderA produces a corresponding FolderA/ structure in the destination bucket, with coverage for the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.