Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-cdk/aws-efs

Package Overview
Dependencies
Maintainers
4
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-efs

The CDK Construct Library for AWS::EFS

  • 1.167.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
118K
decreased by-2.22%
Maintainers
4
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 02 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc