|

AWS lambda and layers

How to add a layer made with numpy and pandas and allow your lambda to call it. Create a package #!/bin/bash # đź”§ Configurable variables LAYER_NAME=”pandas-layer” PYTHON_VERSION=”3.10″ PACKAGE_DIR=”python” ZIP_NAME=”${LAYER_NAME}.zip”  mkdir -p $PACKAGE_DIR python$PYTHON_VERSION -m pip install pandas numpy -t $PACKAGE_DIR echo ” Creating zip file…” zip -r $ZIP_NAME $PACKAGE_DIR echo ” Layer package created: $ZIP_NAME” Add this package to your lambda layer Create a lambda…

C4

Let’s talk today about C4 in action, the framework that allows you to diagram architectures. We use it to diagram system  with a hierarchy of four levels of description: C1: Context C2: Containers C3: Components C4: Code To clarify, C4 diagrams are not commonly created in most cases.. too heavy and useless. Here, we want…

S3 and Lambda

  Today, a small use case: A user uploads a file to an S3 bucket, triggering an event that launches a Python Lambda function. This Lambda function makes some minor modifications to the file, creates a new version, and stores it in another bucket. The entire setup was implemented using Terraform.   Python file import…