Skip to content

Instantly share code, notes, and snippets.

View khoa-tran-hds's full-sized avatar

khoa-tran-hds

View GitHub Profile
@ottokruse
ottokruse / cdk-snippet.ts
Created May 25, 2022 07:55
Create an AWS Lambda Layer that includes pandas and pyarrow
// Creating an AWS Lambda Layer with pandas and pyarrow is harder than it might seem,
// as simply `pip install pandas pyarrow` will lead to a deployment package that is > 250 MB
// which is not allowed by AWS Lambda.
// In this snippet, that deployment package is trimmed down, to make it fit (and still work)
import * as lambda from "aws-cdk-lib/aws-lambda";
const layerInstallCommand = [
"bash",
"-c",