Skip to content

Instantly share code, notes, and snippets.

@youngsoul
Last active March 7, 2022 19:49
Show Gist options
  • Save youngsoul/2b835f3d922eb326210b13925e66e2d2 to your computer and use it in GitHub Desktop.
Save youngsoul/2b835f3d922eb326210b13925e66e2d2 to your computer and use it in GitHub Desktop.
CDK example setting up EFS
fs = efs.FileSystem(self, f'{resources_prefix}-FileSystem',
vpc=self.vpc,
security_group=self.efs_access_sg,
removal_policy=RemovalPolicy.DESTROY)
access_point = fs.add_access_point(f'{resources_prefix}-LambdaAccessPoint',
create_acl=efs.Acl(owner_gid='1000', owner_uid='1000', permissions='755'),
path="/export/lambda",
posix_user=efs.PosixUser(gid="1000", uid="1000"))
fs.connections.allow_default_port_from(self.bastion_host)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment