Last active
March 7, 2022 19:58
-
-
Save youngsoul/2035c89295d10efad49a5ea2a98e49a9 to your computer and use it in GitHub Desktop.
Lambda CDK Example using V2 API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lb1 = lambda_alpha_.PythonFunction(self, f"{resources_prefix}-heartfailure-function", | |
entry="./ml_lambda", | |
index="heart_failure_lambda.py", | |
handler="lambda_handler", | |
runtime=_lambda.Runtime.PYTHON_3_7, | |
vpc=self.vpc, | |
security_groups=[ | |
self.efs_access_sg | |
], | |
timeout=Duration.seconds(300), | |
allow_public_subnet=True, | |
filesystem=_lambda.FileSystem.from_efs_access_point(access_point,'/mnt/model'), | |
environment={ | |
"PYTHONPATH": "/mnt/model/venv" | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment