(aws-s3files): Support S3 Files
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Description
### Describe the feature
AWS recently introduced [S3 Files](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files.html), a new capability that allows mounting S3 buckets as file systems on EC2 instances. This feature enables file system operations directly on S3 buckets through mount targets and access points.
Currently, there is no L2 construct support in AWS CDK for creating and managing S3 Files resources, including:
- File systems
- Mount targets
- Access points specific to S3 Files
### Use Case
As a CDK user, I want to programmatically create and configure S3 Files infrastructure using CDK constructs so that I can:
- Define S3 file systems with proper IAM roles for bucket access
- Create mount targets across multiple Availability Zones
- Configure security groups and network access
- Integrate S3 Files with EC2 instances in my CDK stacks
- Manage the entire infrastructure as code with type safety and best practices
Currently, I have to manually create these resources through the AWS Console or AWS CLI, which breaks the infrastructure-as-code workflow.
### Proposed Solution
Create L2 constructs in the `@aws-cdk/aws-s3files` module (or extend `@aws-cdk/aws-s3`) with classes such as:
```ts
new s3files.FileSystem(this, 'MyFileSystem', {
bucket: myBucket,
role: fileSystemRole,
vpc: myVpc
});
new s3files.MountTarget(this, 'MountTarget', {
fileSystem: myFileSystem,
subnet: mySubnet,
securityGroups: [mySg]
});
```
The constructs should handle:
- Automatic creation of required IAM roles and policies
- Mount target creation across specified Availability Zones
- Security group configuration
- Integration with existing VPC and EC2 constructs
### Other Information
- S3 Files is currently available and documented in the [AWS S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files-getting-started.html)
- The AWS CLI already supports `s3files` commands (`create-file-system`, `create-mount-target`, etc.)
- This would complement existing S3 deployment constructs like `@aws-cdk/aws-s3-deployment`
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.248.0
### AWS CDK CLI version
2.1118.0
### Environment details (OS name and version, etc.)
AL2
Contributor guide
Research direction
Start with the linked AWS S3 Files documentation and the existing AWS CDK construct patterns; the issue names no repository files or tests. Define L2 support for file systems, mount targets, and S3 Files access points, including IAM, VPC, subnet, security-group, and Availability Zone configuration, then verify the constructs integrate with EC2 and existing CDK infrastructure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100