{"id":8859,"library":"aws-cdk-aws-efs","title":"AWS CDK EFS Construct Library (v1)","description":"The AWS CDK Construct Library for AWS EFS (Amazon Elastic File System) provides constructs to create and manage EFS resources as infrastructure-as-code. This package is part of the AWS CDK v1 ecosystem (version 1.204.0), which is currently in maintenance mode. AWS CDK v1 typically sees infrequent updates, primarily for critical bug fixes or security patches.","status":"maintenance","version":"1.204.0","language":"python","source_language":"en","source_url":"https://github.com/aws/aws-cdk.git","tags":["aws","cdk","efs","infrastructure-as-code","cloud","v1"],"install":[{"cmd":"pip install aws-cdk.aws-efs aws-cdk.core","lang":"bash","label":"Install for AWS CDK v1"}],"dependencies":[{"reason":"Required for core CDK constructs and app definition in v1.","package":"aws-cdk.core","optional":false}],"imports":[{"note":"In AWS CDK v1, construct libraries are typically imported as submodules of 'aws_cdk' (e.g., 'aws_cdk.aws_efs'), not directly from 'aws_cdk.aws_efs' which is more common in v2.","wrong":"from aws_cdk.aws_efs import FileSystem","symbol":"FileSystem","correct":"from aws_cdk import aws_efs"},{"note":"Ensure the full submodule name 'aws_efs' is used, not a shorthand 'efs'.","wrong":"from aws_cdk import efs","symbol":"AccessPoint","correct":"from aws_cdk import aws_efs"}],"quickstart":{"code":"import os\nfrom aws_cdk import (\n    core as cdk,\n    aws_ec2 as ec2,\n    aws_efs as efs,\n)\n\nclass EfsStack(cdk.Stack):\n    def __init__(self, scope: cdk.Construct, construct_id: str, **kwargs) -> None:\n        super().__init__(scope, construct_id, **kwargs)\n\n        # Create a VPC for the EFS File System\n        vpc = ec2.Vpc(self, \"EfsVpc\", max_azs=2)\n\n        # Create an EFS File System\n        file_system = efs.FileSystem(self, \"MyEfsFileSystem\",\n            vpc=vpc,\n            performance_mode=efs.PerformanceMode.GENERAL_PURPOSE,\n            throughput_mode=efs.ThroughputMode.BURSTING,\n            encrypted=True\n        )\n\n        # Optional: Create an Access Point for granular access control\n        efs.AccessPoint(self, \"MyEfsAccessPoint\",\n            file_system=file_system,\n            path=\"/mydata\",\n            create_acl=efs.Acl(owner_uid=\"1001\", owner_gid=\"1001\", permissions=\"755\"),\n            posix_user=efs.PosixUser(uid=\"1001\", gid=\"1001\")\n        )\n\n        cdk.CfnOutput(self, \"FileSystemId\", value=file_system.file_system_id)\n\napp = cdk.App()\nEfsStack(app, \"EfsQuickstartStack\",\n         env=cdk.Environment(account=os.environ.get(\"CDK_DEFAULT_ACCOUNT\", \"\"), \n                             region=os.environ.get(\"CDK_DEFAULT_REGION\", \"\"))\n)\napp.synth()","lang":"python","description":"This quickstart demonstrates how to create an AWS EFS File System within a new VPC, including an optional Access Point for POSIX-compliant access. It's designed for AWS CDK v1 projects. Remember to configure your AWS credentials and default region/account for `cdk deploy`."},"warnings":[{"fix":"For new projects, prefer AWS CDK v2 (`pip install aws-cdk-lib`). For existing v1 projects, ensure `aws-cdk.core` is pinned to a v1 version compatible with `aws-cdk.aws-efs`.","message":"This package is for AWS CDK v1. Using it with an AWS CDK v2 application (which uses the `aws-cdk-lib` package) will cause `TypeError` or `AttributeError` due to incompatible types and API differences. The v2 equivalent constructs are part of the `aws-cdk-lib` package.","severity":"breaking","affected_versions":"All v1.x versions when used with v2 CDK projects."},{"fix":"Plan a migration to AWS CDK v2 (`aws-cdk-lib`). The migration guide provides details on necessary code changes.","message":"AWS CDK v1 is in maintenance mode and no longer receives new feature development. Users are strongly encouraged to migrate to AWS CDK v2 for new projects to benefit from active development, consolidated packages, and improved features.","severity":"deprecated","affected_versions":"All v1.x versions."},{"fix":"Always provide a `vpc` property when creating `efs.FileSystem`. Ensure that the security group attached to the EFS mount targets allows inbound TCP port 2049 from the security groups of your EC2 instances.","message":"EFS File Systems require a VPC and correctly configured security groups for EC2 instances to mount them. Failing to specify a VPC or providing inadequate security group rules will prevent instances from accessing the EFS share.","severity":"gotcha","affected_versions":"All versions."}],"env_vars":null,"search_vec":"'1.204.0':43 'amazon':15 'aw':1,8,13,38,50,65 'bug':60 'cdk':2,9,39,51,66 'cloud':72 'code':31,71 'construct':4,10,20 'creat':22 'critic':59 'current':46 'ecosystem':41 'ef':3,14,25,67 'elast':16 'file':17 'fix':61 'infrastructur':29,69 'infrastructure-as-cod':28,68 'infrequ':55 'librari':5,11 'mainten':48 'manag':24 'mode':49 'packag':33 'part':35 'patch':64 'primarili':57 'provid':19 'resourc':26 'secur':63 'see':54 'system':18 'typic':53 'updat':56 'v1':6,40,52,73 'version':42","created_at":"2026-04-16T18:47:12.536312+00:00","updated_at":"2026-04-16T18:47:12.536312+00:00","problems":{"verify_error":"error: Failed to parse: `aws-cdk.aws-efs aws-cdk.core`\n  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `a`\naws-cdk.aws-efs aws-cdk.core\n                ^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.204.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/aws/aws-cdk","docs":null,"changelog":null,"pypi":"https://pypi.org/project/aws-cdk-aws-efs/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"install_fail","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}