쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

AWS CLI를 사용한 Amazon EFS 예제

포커스 모드
AWS CLI를 사용한 Amazon EFS 예제 - AWS Command Line Interface

다음 코드 예제에서는 Amazon EFS에서 AWS Command Line Interface를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여 줍니다.

작업은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 관련 시나리오의 컨텍스트에 따라 표시되며, 개별 서비스 함수를 직접적으로 호출하는 방법을 보여줍니다.

각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.

주제

작업

다음 코드 예시에서는 create-file-system을 사용하는 방법을 보여 줍니다.

AWS CLI

암호화된 파일 시스템을 생성하는 방법

다음 create-file-system 예제에서는 기본 CMK를 사용하여 암호화된 파일 시스템을 생성합니다. 또한 태그 Name=my-file-system도 추가합니다.

aws efs create-file-system \ --performance-mode generalPurpose \ --throughput-mode bursting \ --encrypted \ --tags Key=Name,Value=my-file-system

출력:

{ "OwnerId": "123456789012", "CreationToken": "console-d7f56c5f-e433-41ca-8307-9d9c0example", "FileSystemId": "fs-c7a0456e", "FileSystemArn": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/fs-48499b4d", "CreationTime": 1595286880.0, "LifeCycleState": "creating", "Name": "my-file-system", "NumberOfMountTargets": 0, "SizeInBytes": { "Value": 0, "ValueInIA": 0, "ValueInStandard": 0 }, "PerformanceMode": "generalPurpose", "Encrypted": true, "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/a59b3472-e62c-42e4-adcf-30d92example", "ThroughputMode": "bursting", "Tags": [ { "Key": "Name", "Value": "my-file-system" } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서에서 Creating Amazon EFS file systems을 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조CreateFileSystem을 참조하세요.

다음 코드 예시에서는 create-file-system을 사용하는 방법을 보여 줍니다.

AWS CLI

암호화된 파일 시스템을 생성하는 방법

다음 create-file-system 예제에서는 기본 CMK를 사용하여 암호화된 파일 시스템을 생성합니다. 또한 태그 Name=my-file-system도 추가합니다.

aws efs create-file-system \ --performance-mode generalPurpose \ --throughput-mode bursting \ --encrypted \ --tags Key=Name,Value=my-file-system

출력:

{ "OwnerId": "123456789012", "CreationToken": "console-d7f56c5f-e433-41ca-8307-9d9c0example", "FileSystemId": "fs-c7a0456e", "FileSystemArn": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/fs-48499b4d", "CreationTime": 1595286880.0, "LifeCycleState": "creating", "Name": "my-file-system", "NumberOfMountTargets": 0, "SizeInBytes": { "Value": 0, "ValueInIA": 0, "ValueInStandard": 0 }, "PerformanceMode": "generalPurpose", "Encrypted": true, "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/a59b3472-e62c-42e4-adcf-30d92example", "ThroughputMode": "bursting", "Tags": [ { "Key": "Name", "Value": "my-file-system" } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서에서 Creating Amazon EFS file systems을 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조CreateFileSystem을 참조하세요.

다음 코드 예시에서는 create-mount-target을 사용하는 방법을 보여 줍니다.

AWS CLI

탑재 대상을 생성하는 방법

다음 create-mount-target 예제에서는 지정된 파일 시스템에 대한 탑재 대상을 생성합니다.

aws efs create-mount-target \ --file-system-id fs-c7a0456e \ --subnet-id subnet-02bf4c428bexample \ --security-groups sg-068f739363example

출력:

{ "OwnerId": "123456789012", "MountTargetId": "fsmt-f9a14450", "FileSystemId": "fs-c7a0456e", "SubnetId": "subnet-02bf4c428bexample", "LifeCycleState": "creating", "IpAddress": "10.0.1.24", "NetworkInterfaceId": "eni-02d542216aexample", "AvailabilityZoneId": "use2-az2", "AvailabilityZoneName": "us-east-2b", "VpcId": "vpc-0123456789abcdef0" }

자세한 내용은 Amazon Elastic File System 사용 설명서Creating mount targets을 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조CreateMountTarget을 참조하세요.

다음 코드 예시에서는 create-mount-target을 사용하는 방법을 보여 줍니다.

AWS CLI

탑재 대상을 생성하는 방법

다음 create-mount-target 예제에서는 지정된 파일 시스템에 대한 탑재 대상을 생성합니다.

aws efs create-mount-target \ --file-system-id fs-c7a0456e \ --subnet-id subnet-02bf4c428bexample \ --security-groups sg-068f739363example

출력:

{ "OwnerId": "123456789012", "MountTargetId": "fsmt-f9a14450", "FileSystemId": "fs-c7a0456e", "SubnetId": "subnet-02bf4c428bexample", "LifeCycleState": "creating", "IpAddress": "10.0.1.24", "NetworkInterfaceId": "eni-02d542216aexample", "AvailabilityZoneId": "use2-az2", "AvailabilityZoneName": "us-east-2b", "VpcId": "vpc-0123456789abcdef0" }

자세한 내용은 Amazon Elastic File System 사용 설명서Creating mount targets을 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조CreateMountTarget을 참조하세요.

다음 코드 예시에서는 delete-file-system을 사용하는 방법을 보여 줍니다.

AWS CLI

파일 시스템을 삭제하는 방법

다음 delete-file-system 예제에서는 지정된 파일 시스템을 삭제합니다.

aws efs delete-file-system \ --file-system-id fs-c7a0456e

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon Elastic File System 사용 설명서Deleting an Amazon EFS file system를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조DeleteFileSystem을 참조하세요.

다음 코드 예시에서는 delete-file-system을 사용하는 방법을 보여 줍니다.

AWS CLI

파일 시스템을 삭제하는 방법

다음 delete-file-system 예제에서는 지정된 파일 시스템을 삭제합니다.

aws efs delete-file-system \ --file-system-id fs-c7a0456e

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon Elastic File System 사용 설명서Deleting an Amazon EFS file system를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조DeleteFileSystem을 참조하세요.

다음 코드 예시에서는 delete-mount-target을 사용하는 방법을 보여 줍니다.

AWS CLI

탑재 대상을 삭제하는 방법

다음 delete-mount-target 예제에서는 지정된 탑재 대상을 삭제합니다.

aws efs delete-mount-target \ --mount-target-id fsmt-f9a14450

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon Elastic File System 사용 설명서Creating mount targets을 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조DeleteMountTarget을 참조하세요.

다음 코드 예시에서는 delete-mount-target을 사용하는 방법을 보여 줍니다.

AWS CLI

탑재 대상을 삭제하는 방법

다음 delete-mount-target 예제에서는 지정된 탑재 대상을 삭제합니다.

aws efs delete-mount-target \ --mount-target-id fsmt-f9a14450

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon Elastic File System 사용 설명서Creating mount targets을 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조DeleteMountTarget을 참조하세요.

다음 코드 예시에서는 describe-file-systems을 사용하는 방법을 보여 줍니다.

AWS CLI

파일 시스템을 설명하는 방법

다음 describe-file-systems 예제에서는 지정된 파일 시스템을 설명합니다.

aws efs describe-file-systems \ --file-system-id fs-c7a0456e

출력:

{ "FileSystems": [ { "OwnerId": "123456789012", "CreationToken": "console-d7f56c5f-e433-41ca-8307-9d9c0example", "FileSystemId": "fs-c7a0456e", "FileSystemArn": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/fs-48499b4d", "CreationTime": 1595286880.0, "LifeCycleState": "available", "Name": "my-file-system", "NumberOfMountTargets": 3, "SizeInBytes": { "Value": 6144, "Timestamp": 1600991437.0, "ValueInIA": 0, "ValueInStandard": 6144 }, "PerformanceMode": "generalPurpose", "Encrypted": true, "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/a59b3472-e62c-42e4-adcf-30d92example", "ThroughputMode": "bursting", "Tags": [ { "Key": "Name", "Value": "my-file-system" } ] } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서Managing Amazon EFS file systems를 참조하세요.

다음 코드 예시에서는 describe-file-systems을 사용하는 방법을 보여 줍니다.

AWS CLI

파일 시스템을 설명하는 방법

다음 describe-file-systems 예제에서는 지정된 파일 시스템을 설명합니다.

aws efs describe-file-systems \ --file-system-id fs-c7a0456e

출력:

{ "FileSystems": [ { "OwnerId": "123456789012", "CreationToken": "console-d7f56c5f-e433-41ca-8307-9d9c0example", "FileSystemId": "fs-c7a0456e", "FileSystemArn": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/fs-48499b4d", "CreationTime": 1595286880.0, "LifeCycleState": "available", "Name": "my-file-system", "NumberOfMountTargets": 3, "SizeInBytes": { "Value": 6144, "Timestamp": 1600991437.0, "ValueInIA": 0, "ValueInStandard": 6144 }, "PerformanceMode": "generalPurpose", "Encrypted": true, "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/a59b3472-e62c-42e4-adcf-30d92example", "ThroughputMode": "bursting", "Tags": [ { "Key": "Name", "Value": "my-file-system" } ] } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서Managing Amazon EFS file systems를 참조하세요.

다음 코드 예시에서는 describe-mount-targets을 사용하는 방법을 보여 줍니다.

AWS CLI

탑재 대상을 설명하는 방법

다음 describe-mount-targets 예제에서는 지정된 탑재 대상을 설명합니다.

aws efs describe-mount-targets \ --mount-target-id fsmt-f9a14450

출력:

{ "MountTargets": [ { "OwnerId": "123456789012", "MountTargetId": "fsmt-f9a14450", "FileSystemId": "fs-c7a0456e", "SubnetId": "subnet-02bf4c428bexample", "LifeCycleState": "creating", "IpAddress": "10.0.1.24", "NetworkInterfaceId": "eni-02d542216aexample", "AvailabilityZoneId": "use2-az2", "AvailabilityZoneName": "us-east-2b", "VpcId": "vpc-0123456789abcdef0" } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서Creating mount targets을 참조하세요.

다음 코드 예시에서는 describe-mount-targets을 사용하는 방법을 보여 줍니다.

AWS CLI

탑재 대상을 설명하는 방법

다음 describe-mount-targets 예제에서는 지정된 탑재 대상을 설명합니다.

aws efs describe-mount-targets \ --mount-target-id fsmt-f9a14450

출력:

{ "MountTargets": [ { "OwnerId": "123456789012", "MountTargetId": "fsmt-f9a14450", "FileSystemId": "fs-c7a0456e", "SubnetId": "subnet-02bf4c428bexample", "LifeCycleState": "creating", "IpAddress": "10.0.1.24", "NetworkInterfaceId": "eni-02d542216aexample", "AvailabilityZoneId": "use2-az2", "AvailabilityZoneName": "us-east-2b", "VpcId": "vpc-0123456789abcdef0" } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서Creating mount targets을 참조하세요.

다음 코드 예시에서는 describe-tags을 사용하는 방법을 보여 줍니다.

AWS CLI

파일 시스템의 태그를 설명하는 방법

다음 describe-tags 예제에서는 지정된 파일 시스템의 태그를 설명합니다.

aws efs describe-tags \ --file-system-id fs-c7a0456e

출력:

{ "Tags": [ { "Key": "Name", "Value": "my-file-system" }, { "Key": "Department", "Value": "Business Intelligence" } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서의 Managing file system tags를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조의 DescribeTags 섹션을 참조하세요.

다음 코드 예시에서는 describe-tags을 사용하는 방법을 보여 줍니다.

AWS CLI

파일 시스템의 태그를 설명하는 방법

다음 describe-tags 예제에서는 지정된 파일 시스템의 태그를 설명합니다.

aws efs describe-tags \ --file-system-id fs-c7a0456e

출력:

{ "Tags": [ { "Key": "Name", "Value": "my-file-system" }, { "Key": "Department", "Value": "Business Intelligence" } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서의 Managing file system tags를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조의 DescribeTags 섹션을 참조하세요.

다음 코드 예시에서는 list-tags-for-resource을 사용하는 방법을 보여 줍니다.

AWS CLI

리소스에 대한 태그를 검색하는 방법

다음 list-tags-for-resource 예제에서는 지정된 파일 시스템과 연결된 태그를 검색합니다.

aws efs list-tags-for-resource \ --resource-id fs-c7a0456e

출력:

{ "Tags": [ { "Key": "Name", "Value": "my-file-system" }, { "Key": "Department", "Value": "Business Intelligence" } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서의 Managing file system tags를 참조하세요.

다음 코드 예시에서는 list-tags-for-resource을 사용하는 방법을 보여 줍니다.

AWS CLI

리소스에 대한 태그를 검색하는 방법

다음 list-tags-for-resource 예제에서는 지정된 파일 시스템과 연결된 태그를 검색합니다.

aws efs list-tags-for-resource \ --resource-id fs-c7a0456e

출력:

{ "Tags": [ { "Key": "Name", "Value": "my-file-system" }, { "Key": "Department", "Value": "Business Intelligence" } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서의 Managing file system tags를 참조하세요.

다음 코드 예시에서는 tag-resource의 사용 방법을 보여줍니다.

AWS CLI

리소스에 태그를 지정하려면

다음 tag-resource 예제에서는 지정된 파일 시스템에 Department=Business Intelligence 태그를 추가합니다.

aws efs tag-resource \ --resource-id fs-c7a0456e \ --tags Key=Department,Value="Business Intelligence"

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon Elastic File System 사용 설명서의 Managing file system tags를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조TagResource를 참조하세요.

다음 코드 예시에서는 tag-resource의 사용 방법을 보여줍니다.

AWS CLI

리소스에 태그를 지정하려면

다음 tag-resource 예제에서는 지정된 파일 시스템에 Department=Business Intelligence 태그를 추가합니다.

aws efs tag-resource \ --resource-id fs-c7a0456e \ --tags Key=Department,Value="Business Intelligence"

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon Elastic File System 사용 설명서의 Managing file system tags를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조TagResource를 참조하세요.

다음 코드 예시에서는 untag-resource의 사용 방법을 보여줍니다.

AWS CLI

리소스에서 태그를 제거하는 방법

다음 untag-resource 예제에서는 지정된 파일 시스템에서 Department 태그 키가 있는 태그를 제거합니다.

aws efs untag-resource \ --resource-id fs-c7a0456e \ --tag-keys Department

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon Elastic File System 사용 설명서의 Managing file system tags를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조UntagResource를 참조하세요.

다음 코드 예시에서는 untag-resource의 사용 방법을 보여줍니다.

AWS CLI

리소스에서 태그를 제거하는 방법

다음 untag-resource 예제에서는 지정된 파일 시스템에서 Department 태그 키가 있는 태그를 제거합니다.

aws efs untag-resource \ --resource-id fs-c7a0456e \ --tag-keys Department

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon Elastic File System 사용 설명서의 Managing file system tags를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조UntagResource를 참조하세요.

이 페이지에서

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.