You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Management-Utilities/auto_set_fsxn_auto_grow/README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ The Lambda function doesn't leverage that many AWS services, so only a few permi
27
27
| Allow:logs:CreateLogGroup| arn:aws:logs:<LAMBDA_REGION>:<ACCOUNT_ID>:*| This is required so you can get logs from the Lambda function. |
28
28
| Allow:logs:CreateLogStream<BR>Allow:logs:PutLogEvents| arn:aws:logs:<LAMBDA_REGION>:<ACCOUNT_ID>:/aws/lambda/<LAMBDA_FUNCTION_NAME>:*| This is required so you can get logs from the Lambda function. |
29
29
| Allow:secretsmanager:GetSecretValue| <ARN_OF_SECRET_WITHIN_SECRETS_MANAGER> | This is required so the Lambda function can get the credentials for the FSxN file system. |
30
+
| Allow:dynamodb:Scan| <ARN_OF_DYNAMODB_TABLE> | This is optional, depending on if you put your secretsTable in a DynamoDB. |
30
31
| Allow:fsx:DescribeFileSystems<BR>Allow:fsx:DescribeVolumes| * | You can't limit these API. They are required to get information regarding the file system and volumes. |
31
32
| Allow:ec2:CreateNetworkInterface<BR>Allow:ec2:DeleteNetworkInterface<BR>Allow:ec2:DescribeNetworkInterfaces| * | Since the Lambda function is going to run within your VPC, it has to be able to create a network interface to communicate with the FSxn file system API. |
32
33
@@ -40,6 +41,7 @@ FSxN file system is attached to.
40
41
41
42
- FSx
42
43
- SecretsManager
44
+
- DynamoDB - You only need this one if you are going to store you secrtsTable in DynamoDB. It can be a Gateway endpoint.
43
45
44
46
### Create the Lambda Function
45
47
Create a Lambda function with the following parameters:
@@ -60,6 +62,12 @@ is a dictionary with the following keys:
60
62
- secretName - The name of the secret in Secrets Manager.
61
63
- usernameKey - The name of the key in the secret that contains the username.
62
64
- passwordKey - The name of the key in the secret that contains the password.
65
+
66
+
**NOTE:** Instead of defining the secretsTable in the script, you can define
67
+
dynamodbSecretsTableName and dynamodbRegion and the script will read in the
68
+
secretsTable information from the specified DynamoDB table. The table should have
69
+
the same fields as the secretsTable defined above.
70
+
63
71
- secretsManagerRegion - Defines the region where your secrets are stored.
64
72
- autoSizeMode - Defines the auto size mode you want to set the volume to. Valid values are:
65
73
- grow - The volume will automatically grow when it reaches the grow threshold.
raiseException('Error, you must either define the secretsTable array at the top of this script, or define dynamodbRegion and dynamodbSecretsTableName.')
0 commit comments