Skip to content

Commit 9df0843

Browse files
committed
revamp efs
1 parent acbee58 commit 9df0843

File tree

1 file changed

+16
-17
lines changed
  • src/content/docs/aws/services

1 file changed

+16
-17
lines changed

src/content/docs/aws/services/efs.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "Elastic File System (EFS)"
3-
linkTitle: "Elastic File System (EFS)"
43
description: Get started with Elastic File System (EFS) on LocalStack
54
tags: ["Ultimate"]
65
---
@@ -12,7 +11,7 @@ EFS offers scalable and shared file storage that can be accessed by multiple EC2
1211
EFS utilizes the Network File System protocol to allow it to be used as a data source for various applications and workloads.
1312

1413
LocalStack allows you to use the EFS APIs in your local environment to create local file systems, lifecycle configurations, and file system policies.
15-
The supported APIs are available on our [API coverage page]({{< ref "coverage_efs" >}}), which provides information on the extent of EFS's integration with LocalStack.
14+
The supported APIs are available on our [API coverage page](), which provides information on the extent of EFS's integration with LocalStack.
1615

1716
## Getting started
1817

@@ -26,13 +25,13 @@ We will demonstrate how to create a file system, apply an IAM resource-based pol
2625
To create a new, empty file system you can use the [`CreateFileSystem`](https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem) API.
2726
Run the following command to create a new file system:
2827

29-
{{< command >}}
30-
$ awslocal efs create-file-system \
28+
```bash
29+
awslocal efs create-file-system \
3130
--performance-mode generalPurpose \
3231
--throughput-mode bursting \
3332
--encrypted \
3433
--tags Key=Name,Value=my-file-system
35-
{{< /command >}}
34+
```
3635

3736
The following output would be retrieved:
3837

@@ -58,9 +57,9 @@ The following output would be retrieved:
5857
You can also describe the locally available file systems using the [`DescribeFileSystems`](https://docs.aws.amazon.com/efs/latest/ug/API_DescribeFileSystems.html) API.
5958
Run the following command to describe the local file systems available:
6059

61-
{{< command >}}
62-
$ awslocal efs describe-file-systems
63-
{{< /command >}}
60+
```bash
61+
awslocal efs describe-file-systems
62+
```
6463

6564
You can alternatively pass the `--file-system-id` parameter to the `describe-file-system` command to retrieve information about a specific file system in AWS CLI.
6665

@@ -69,19 +68,19 @@ You can alternatively pass the `--file-system-id` parameter to the `describe-fil
6968
You can apply an EFS `FileSystemPolicy` to an EFS file system using the [`PutFileSystemPolicy`](https://docs.aws.amazon.com/efs/latest/ug/API_PutFileSystemPolicy.html) API.
7069
Run the following command to apply a policy to the file system created in the previous step:
7170

72-
{{< command >}}
73-
$ awslocal efs put-file-system-policy \
71+
```bash
72+
awslocal efs put-file-system-policy \
7473
--file-system-id <FILE_SYSTEM_ID> \
7574
--policy "{\"Version\":\"2012-10-17\",\"Id\":\"ExamplePolicy01\",\"Statement\":[{\"Sid\":\"ExampleStatement01\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"*\"},\"Action\":[\"elasticfilesystem:ClientMount\",\"elasticfilesystem:ClientWrite\"],\"Resource\":\"arn:aws:elasticfilesystem:us-east-1:000000000000:file-system/fs-34feac549e66b814\"}]}"
76-
{{< /command >}}
75+
```
7776

7877
You can list the file system policies using the [`DescribeFileSystemPolicy`](https://docs.aws.amazon.com/efs/latest/ug/API_DescribeFileSystemPolicy.html) API.
7978
Run the following command to list the file system policies:
8079

81-
{{< command >}}
82-
$ awslocal efs describe-file-system-policy \
80+
```bash
81+
awslocal efs describe-file-system-policy \
8382
--file-system-id <FILE_SYSTEM_ID>
84-
{{< /command >}}
83+
```
8584

8685
Replace `<FILE_SYSTEM_ID>` with the ID of the file system you want to list the policies for.
8786
The output will return the `FileSystemPolicy` for the specified EFS file system.
@@ -91,11 +90,11 @@ The output will return the `FileSystemPolicy` for the specified EFS file system.
9190
You can create a lifecycle configuration for an EFS file system using the [`PutLifecycleConfiguration`](https://docs.aws.amazon.com/efs/latest/ug/API_PutLifecycleConfiguration.html) API.
9291
Run the following command to create a lifecycle configuration for the file system created in the previous step:
9392

94-
{{< command >}}
95-
$ awslocal efs put-lifecycle-configuration \
93+
```bash
94+
awslocal efs put-lifecycle-configuration \
9695
--file-system-id <FILE_SYSTEM_ID> \
9796
--lifecycle-policies "{\"TransitionToIA\":\"AFTER_30_DAYS\"}"
98-
{{< /command >}}
97+
```
9998

10099
The following output would be retrieved:
101100

0 commit comments

Comments
 (0)