What is @aws-cdk/aws-efs?
@aws-cdk/aws-efs is an AWS CDK library that allows you to define and manage Amazon Elastic File System (EFS) resources in your AWS infrastructure as code. It provides constructs for creating and configuring EFS file systems, access points, and mount targets.
What are @aws-cdk/aws-efs's main functionalities?
Create an EFS File System
This code sample demonstrates how to create an EFS file system with specific lifecycle policies, performance mode, and throughput mode.
const efs = require('@aws-cdk/aws-efs');
const cdk = require('@aws-cdk/core');
const app = new cdk.App();
const stack = new cdk.Stack(app, 'EfsStack');
const fileSystem = new efs.FileSystem(stack, 'MyEfsFileSystem', {
vpc: vpc,
lifecyclePolicy: efs.LifecyclePolicy.AFTER_14_DAYS,
performanceMode: efs.PerformanceMode.GENERAL_PURPOSE,
throughputMode: efs.ThroughputMode.BURSTING,
});
app.synth();
Create an EFS Access Point
This code sample demonstrates how to create an EFS access point with specific POSIX user and ACL settings.
const efs = require('@aws-cdk/aws-efs');
const cdk = require('@aws-cdk/core');
const app = new cdk.App();
const stack = new cdk.Stack(app, 'EfsStack');
const fileSystem = new efs.FileSystem(stack, 'MyEfsFileSystem', {
vpc: vpc,
});
const accessPoint = new efs.AccessPoint(stack, 'MyAccessPoint', {
fileSystem: fileSystem,
path: '/export/lambda',
posixUser: {
uid: '1001',
gid: '1001'
},
createAcl: {
ownerUid: '1001',
ownerGid: '1001',
permissions: '755'
},
});
app.synth();
Create an EFS Mount Target
This code sample demonstrates how to create an EFS mount target in a specific subnet with a security group.
const efs = require('@aws-cdk/aws-efs');
const cdk = require('@aws-cdk/core');
const app = new cdk.App();
const stack = new cdk.Stack(app, 'EfsStack');
const fileSystem = new efs.FileSystem(stack, 'MyEfsFileSystem', {
vpc: vpc,
});
const mountTarget = new efs.CfnMountTarget(stack, 'MyMountTarget', {
fileSystemId: fileSystem.fileSystemId,
subnetId: vpc.privateSubnets[0].subnetId,
securityGroups: [securityGroup.securityGroupId],
});
app.synth();
Other packages similar to @aws-cdk/aws-efs
@aws-cdk/aws-s3
@aws-cdk/aws-s3 is a CDK library for defining Amazon S3 buckets and related resources. While it focuses on object storage rather than file storage, it provides similar infrastructure-as-code capabilities for managing storage resources in AWS.
@aws-cdk/aws-ec2
@aws-cdk/aws-ec2 is a CDK library for defining Amazon EC2 instances, VPCs, and related networking resources. It can be used in conjunction with @aws-cdk/aws-efs to set up the necessary networking infrastructure for EFS file systems.
@aws-cdk/aws-rds
@aws-cdk/aws-rds is a CDK library for defining Amazon RDS databases and related resources. While it focuses on relational databases rather than file storage, it provides similar infrastructure-as-code capabilities for managing database resources in AWS.
Amazon Elastic File System Construct Library
This is a developer preview (public beta) module. Releases might lack important features and might have
future breaking changes.
This API is still under active development and subject to non-backward
compatible changes or removal in any future version. Use of the API is not recommended in production
environments. Experimental APIs are not subject to the Semantic Versioning model.
This module is part of the AWS Cloud Development Kit project.
1.0.0 (2019-07-09)
General Availability of the AWS Cloud Development Kit!! πππ₯π₯πΎπΎ
We are excited to announce the 1.0.0 release of the AWS CDK β
including GA support for TypeScript, JavaScript, and Python!
We want to thank all of our early customers, and the hundreds of contributors,
for all the help and support in making this release a reality.
Thank you for the patience to deal with the many, many breaking changes that happened along the way.
This product would not be what it is today if it weren't for all the feedback,
diligent issue reporting (bugs, missing features, unclear documentation, etc.),
and code contributions from the community.
Special thanks go out to a few of our most prolific contributors who went above and beyond to help improve the CDK:
1.0.0 is a huge milestone for us, but it's still only the beginning!
We are excited to continue evolving the CDK, to introduce support for new languages and capabilities,
and to continue working closely with the open-source community.
Bug Fixes
- cli: output message when successfully synthesizing multiple stacks (#3259) (0c30f12)
- python: Make sure stack name in the init template does not contain illegal characters (#3261) (7d22b2c)