AWS Lambda layer for psycopg2
make PYTHON=3.12 ARCH=x86_64 # or ARCH=arm64
https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html#configuration-layers-create
aws lambda publish-layer-version \
--layer-name psycopg2-2.9.9-python3.12-x86_64 \
--zip-file fileb://psycopg2-2.9.9-python3.12-x86_64.zip \
--compatible-runtimes python3.12
import psycopg2
def handler(event, context):
return psycopg2.__version__