Fast iteration for Go Lambdas.
Important
Flint is designed for local development only. It should not be used for production deployments.
Flint replaces the slow "edit-deploy-test" loop with rapid updates. It watches your Go files, recompiles changes, and live reloads your Lambda's execution environment, bypassing deployment pipelines and cold starts.
Flint acts as a custom runtime for your Lambda environment.
When you save a file, Flint cross-compiles your Go binary and uploads it to your S3 bucket. The Flint runtime running inside your Lambda detects the new binary, downloads it to the temporary directory, and hot-swaps the running process.
Download the latest binary for your OS from the Releases Page.
go install github.com/vaijab/flint/cmd/flint@latestFlint requires a custom runtime to receive updates.
- Download the runtime zip for your architecture (
amd64orarm64) from the Releases Page. - Upload the zip to your Lambda function.
- Set the runtime handler to
bootstrapand add aFLINT_BUCKETenvironment variable pointing to a development S3 bucket.
# Example configuration
aws lambda update-function-code --function-name my-function --zip-file fileb://flint_runtime.zip
aws lambda update-function-configuration --function-name my-function \
--handler bootstrap \
--environment "Variables={FLINT_BUCKET=my-dev-bucket}"Run flint init in your project root. This scans for main packages and maps them to your AWS Lambdas.
flint initRun the watcher.
flint devAny change to a .go file will now trigger a rebuild and hot-swap the Lambda on next invocation.
The flint.toml file stores your project mapping.
[project]
name = "my-service"
[[lambdas]]
name = "my-service-api-handler" # AWS Lambda Function Name
path = "./cmd/api" # Local path to main packageTerraform Configuration
To use Flint with Terraform, configure your Lambda to use the custom runtime and set the FLINT_BUCKET environment variable.
resource "aws_lambda_function" "example" {
function_name = "my-function"
role = aws_iam_role.lambda_exec.arn
handler = "bootstrap"
runtime = "provided.al2023" # or provided.al2
# Upload the Flint runtime (downloaded from releases)
filename = "flint_runtime_linux_arm64.zip"
source_code_hash = filebase64sha256("flint_runtime_linux_arm64.zip")
environment {
variables = {
# The bucket where Flint will upload hot-swapped binaries
FLINT_BUCKET = aws_s3_bucket.dev_bucket.id
}
}
}What happens if I change shared code?
Flint detects changes in shared directories (like pkg/ or internal/) and automatically rebuilds all configured Lambdas.
My Lambda isn't updating?
Check the CloudWatch logs for the bootstrap runtime. Ensure the FLINT_BUCKET variable is set and the Lambda execution role has s3:GetObject permissions.
