Skip to content

junguo/lamda-runtime-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Lambda Runtime Updater

Automate updating Lambda runtimes at scale with safety features.

Setup

pip install -r requirements.txt

Ensure AWS credentials are configured:

aws configure
# or use environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY

Usage

Dry Run (Preview Changes)

python update_lambda_runtimes.py \
  --old-runtime python3.8 \
  --new-runtime python3.11 \
  --dry-run

Update Functions

python update_lambda_runtimes.py \
  --old-runtime python3.8 \
  --new-runtime python3.11 \
  --region us-east-1

Advanced Options

python update_lambda_runtimes.py \
  --old-runtime python3.8 \
  --new-runtime python3.11 \
  --region us-west-2 \
  --batch-size 20 \
  --delay 1.0

Parameters

  • --old-runtime: Current runtime to find (required)
  • --new-runtime: Target runtime to update to (required)
  • --region: AWS region (default: us-east-1)
  • --dry-run: Preview without making changes
  • --batch-size: Concurrent updates (default: 10)
  • --delay: Delay between updates in seconds (default: 0.5)

Supported Runtimes

  • Python: python3.8, python3.9, python3.10, python3.11, python3.12
  • Node.js: nodejs16.x, nodejs18.x, nodejs20.x
  • Java: java11, java17, java21
  • .NET: dotnet6, dotnet8
  • Ruby: ruby3.2, ruby3.3
  • Go: provided.al2, provided.al2023

IAM Permissions Required

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "lambda:ListFunctions",
        "lambda:UpdateFunctionConfiguration"
      ],
      "Resource": "*"
    }
  ]
}

Best Practices

  1. Always run with --dry-run first
  2. Test on non-production environments first
  3. Update in batches during low-traffic periods
  4. Monitor CloudWatch Logs after updates
  5. Have a rollback plan ready

About

Script to update Lambda runtime versions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages