{"library":"mypy-boto3-efs","title":"mypy-boto3-efs Type Annotations","description":"mypy-boto3-efs provides type annotations for the boto3 EFS service, generated using the `mypy-boto3-builder`. These stubs enhance type checking for `boto3` code, allowing tools like MyPy to catch type-related errors before runtime. The current version is 1.42.3, and it follows the frequent release cadence of its builder.","language":"python","status":"active","last_verified":"Thu May 14","install":{"commands":["pip install boto3 mypy-boto3-efs"],"cli":null},"imports":["from mypy_boto3_efs.client import EFSClient","from mypy_boto3_efs.type_defs import CreateFileSystemRequestRequestTypeDef"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import boto3\nfrom mypy_boto3_efs.client import EFSClient\nfrom mypy_boto3_efs.type_defs import CreateFileSystemRequestRequestTypeDef\nimport os\n\n# Ensure boto3 can find credentials (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, or ~/.aws/credentials)\n# This example does not explicitly set credentials, relying on default boto3 behavior.\n\ndef create_efs_filesystem(token: str) -> None:\n    client: EFSClient = boto3.client(\n        \"efs\", \n        region_name=os.environ.get('AWS_REGION', 'us-east-1')\n    )\n\n    request_params: CreateFileSystemRequestRequestTypeDef = {\n        \"CreationToken\": token,\n        \"PerformanceMode\": \"generalPurpose\",\n        \"Encrypted\": False  # Set to True for encryption\n    }\n\n    try:\n        response = client.create_file_system(**request_params)\n        print(f\"Created EFS File System with ID: {response['FileSystemId']}\")\n        print(f\"ARN: {response['FileSystemArn']}\")\n    except client.exceptions.FileSystemAlreadyExists as e:\n        print(f\"File system with token '{token}' already exists: {e}\")\n    except Exception as e:\n        print(f\"Error creating file system: {e}\")\n\n# Example usage (replace with a unique token for actual creation)\n# create_efs_filesystem(\"my-unique-efs-token\")\nprint(\"Run 'create_efs_filesystem(\"my-unique-efs-token\")' to test\")","lang":"python","description":"This example demonstrates how to use `mypy-boto3-efs` to get type hints for `boto3.client('efs')`. It defines a function to create an EFS file system, explicitly typing the client and the request parameters. Note that `mypy-boto3-efs` provides *only* type stubs; `boto3` must be installed and configured for actual AWS interactions.","tag":null,"tag_description":null,"last_tested":"2026-04-25","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-14","installed_version":"1.43.0","pypi_latest":"1.43.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":3.9,"avg_import_s":0.6,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.57,"mem_mb":13,"disk_size":"51.2M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.55,"mem_mb":12.9,"disk_size":"51.0M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.2,"import_time_s":0.46,"mem_mb":13,"disk_size":"52M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.47,"mem_mb":12.9,"disk_size":"52M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.72,"mem_mb":14.7,"disk_size":"54.2M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.82,"mem_mb":14.6,"disk_size":"54.1M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4,"import_time_s":0.67,"mem_mb":14.7,"disk_size":"55M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.64,"mem_mb":14.6,"disk_size":"55M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.63,"mem_mb":14,"disk_size":"45.4M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.67,"mem_mb":13.9,"disk_size":"45.3M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.3,"import_time_s":0.66,"mem_mb":14,"disk_size":"46M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.7,"mem_mb":13.9,"disk_size":"46M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.62,"mem_mb":15,"disk_size":"45.2M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.63,"mem_mb":14.8,"disk_size":"44.9M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.1,"import_time_s":0.65,"mem_mb":15,"disk_size":"46M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.64,"mem_mb":14.8,"disk_size":"45M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.51,"mem_mb":12.2,"disk_size":"50.5M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.46,"mem_mb":12.2,"disk_size":"50.5M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.7,"import_time_s":0.43,"mem_mb":12.2,"disk_size":"51M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"boto3","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.43,"mem_mb":12.2,"disk_size":"51M"}]}}