Category : aws-lambda

mouthful title but the point is this, I have some data science pipelines with these requirements (python based): are orchestrated with an "internal" orchestrator based off on a server are run across a number of users/products /etc where N could be relatively high the "load" of this jobs I want to distribute and not be ..

Read more

I’m looking to execute a python script on AWS Lambda using a Docker container loaded on AWS ECR. I’ve managed to create a docker container starting from the amazon image they recommend using for a python script. This is the Dockerfile: # Copy function code COPY app.py ${LAMBDA_TASK_ROOT} COPY config.py ${LAMBDA_TASK_ROOT} COPY abort_occurrance.txt ${LAMBDA_TASK_ROOT} COPY ..

Read more

I’m trying to implement APM Serverless for AWS Lambda in a Python function. The function is deployed via a container image, so the extension is built as a layer in the Dockerfile. Firstly, in case someone is trying to auto instrument this process; The extension must be unzipped into /opt/extensions/ not to /opt/ like suggested ..

Read more

I am trying to mock an AWS lambda function, below is my sample code def get_lambda_resp(arn: str, input: str) -> str: lambda_client = boto3.client("lambda") response = lambda_client.invoke( FunctionName=arn, LogType="None", Payload=json.dumps({"param": input}).encode("utf-8") ) output = json.loads(response["Payload"].read().decode("utf-8")) return output["value"] and below is my test case import io import zipfile import boto3 from moto import mock_lambda @mock_lambda def ..

Read more