UNPKG

1.56 kBTypeScriptView Raw
1import { Connections } from '@aws-cdk/aws-ec2';
2import * as efs from '@aws-cdk/aws-efs';
3import * as iam from '@aws-cdk/aws-iam';
4import { IDependable } from '@aws-cdk/core';
5/**
6 * FileSystem configurations for the Lambda function
7 */
8export interface FileSystemConfig {
9 /**
10 * mount path in the lambda runtime environment
11 */
12 readonly localMountPath: string;
13 /**
14 * ARN of the access point
15 */
16 readonly arn: string;
17 /**
18 * array of IDependable that lambda function depends on
19 *
20 * @default - no dependency
21 */
22 readonly dependency?: IDependable[];
23 /**
24 * connections object used to allow ingress traffic from lambda function
25 *
26 * @default - no connections required to add extra ingress rules for Lambda function
27 */
28 readonly connections?: Connections;
29 /**
30 * additional IAM policies required for the lambda function
31 *
32 * @default - no additional policies required
33 */
34 readonly policies?: iam.PolicyStatement[];
35}
36/**
37 * Represents the filesystem for the Lambda function
38 */
39export declare class FileSystem {
40 readonly config: FileSystemConfig;
41 /**
42 * mount the filesystem from Amazon EFS
43 * @param ap the Amazon EFS access point
44 * @param mountPath the target path in the lambda runtime environment
45 */
46 static fromEfsAccessPoint(ap: efs.IAccessPoint, mountPath: string): FileSystem;
47 /**
48 * @param config the FileSystem configurations for the Lambda function
49 */
50 protected constructor(config: FileSystemConfig);
51}