https://github.com/janritter/aws-lambda-live-tuner
Tool to optimize Lambda functions on real incoming events
https://github.com/janritter/aws-lambda-live-tuner
aws aws-lambda lambda
Last synced: 3 months ago
JSON representation
Tool to optimize Lambda functions on real incoming events
- Host: GitHub
- URL: https://github.com/janritter/aws-lambda-live-tuner
- Owner: janritter
- License: mit
- Created: 2022-08-03T17:34:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-15T17:52:02.000Z (3 months ago)
- Last Synced: 2025-03-15T18:32:04.099Z (3 months ago)
- Topics: aws, aws-lambda, lambda
- Language: Go
- Homepage:
- Size: 408 KB
- Stars: 25
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS Lambda Live Tuner
[](https://circleci.com/gh/janritter/aws-lambda-live-tuner/tree/main)
> **Warning**
> AWS Lambda Live Tuner is still in very early development, functionality might change between releases until version 1.0.0.
> Ideas and feedback are very welcomeAWS Lambda Live Tuner tests memory configurations based on real incoming events instead of a single test event.
Let's imagine we are testing a Lambda function that processes a queue, since the Lambda function is idempotent, messages that have already been processed will be successfully processed again. Using the same test event on all invocations might falsify the results because all subsequent invocations after the initial one might be way faster (event was already processed before). Using different incoming events instead helps you test the actual behavior of the Lambda.
This project is heavily inspired by the open source tool [aws-lambda-power-tuning](https://github.com/alexcasalboni/aws-lambda-power-tuning)
## Prerequisites
- Configured AWS credentials
## Installation
### Via Homebrew (For Mac / Linux)
#### Get the formula
```bash
brew tap janritter/aws-lambda-live-tuner https://github.com/janritter/aws-lambda-live-tuner
```#### Install formula
```bash
brew install aws-lambda-live-tuner
```### Via download of pre-build binaries
1. Open the [latest release page](https://github.com/janritter/aws-lambda-live-tuner/releases/latest)
2. Download the archive with the pre-build binary for your operating system and architecture
- For Linux with amd64 architecture this would be `aws-lambda-live-tuner__linux_amd64.tar.gz`
3. Unzip the downloaded archive
4. Start using aws-lambda-live-tuner### Via local build
This option requires go to be installed
#### Clone the repo
```bash
git clone [email protected]:janritter/aws-lambda-live-tuner.git
```#### Build
```make
make build
```The binary is saved in `bin` inside the project folder
## Usage
### Check help
```text
aws-lambda-live-tuner --help
```### Test Lambda
```bash
aws-lambda-live-tuner --lambda-arn arn:aws:lambda:eu-central-1:1234567890:function:my-lambda-name
```## Limitations
- Lambda@Edge functions are currently not supported
- Lambda function aliases are currently not supported
- Lambda tiered pricing is not considered
- Because we can't know in which Lambda pricing tier you are operating, we will always use Tier 1. Since higher tiers just reduce the GB/second price, the lowest price results will still be valid for you.## Development
### Regenerate AWS SDK mocks for testing
```bash
mockery
```## License and Author
Author: Jan Ritter
License: MIT