Skip to content

Instantly share code, notes, and snippets.

@rehanvdm
rehanvdm / glue-script.py
Created March 27, 2024 03:18
AWS PTA Meetup: Automate your Event Driven data lake/warehouse ingestion - Glue Script
# The meetup video https://youtu.be/lbbevQPK3D8
import datetime
import sys
from awsglue.context import GlueContext
from awsglue.dynamicframe import DynamicFrame
from awsglue.job import Job
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
@rehanvdm
rehanvdm / EsbuildFunction.ts
Last active March 15, 2023 04:10
EsbuildFunction
/*
# The `EsbuildFunction` CDK component
Located at `stacks/constructs/EsbuildFunction.ts`. This component is using the
["unsafe"](https://joecreager.com/5-reasons-to-avoid-deasync-for-node-js/) `desync` [npm library](https://www.npmjs.com/package/deasync).
The TL;DR is that it is using an option in the V8 that is not really supported. That said this library has been around
from early Node versions and seems to have continued support.
We accept the risk for now, this is okay as we really want to the ability to run async code within the Bundling
function the CDK exposes for assets. The benefit of this is approach is that we no longer have to maintain a separate