This example contains the different ways to invoke AWS Lambda functions with using Python and boto3. You can check out the blog post about this project at https://www.sufle.io/blog/lambda-invocation-types
- python >= 3.7
- pip
After cloning the project, in the main directory:
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
To perform a synchronous invocation, run the command below;
python test_lambda.py --name <your-function-name> --type sync
For asynchronous invocation;
python test_lambda.py --name <your-function-name> --type async
For event-source mapping with DynamoDB Streams, run;
python test_lambda.py --name <your-dynamodb-streams-function-name> --payload records.json --type sync