If you're a developer based in Europe running scheduled Python scripts on AWS Lambda, you've probably noticed a pattern: the AWS bill is rarely the problem. The time bill is.
Setting up Lambda for a cron job requires wiring together Lambda, EventBridge, CloudWatch, IAM, and SNS — a stack of five services to do what amounts to running a Python script once per day. Then you maintain that infrastructure forever.
This post breaks down the real cost of Lambda for European developers, what a production-ready Python cron job actually costs across alternatives, and how to migrate in under 10 minutes — including an AI assistant that writes the script for you.
The Real Cost of AWS Lambda Cron Jobs
Let's talk honestly about what AWS Lambda + EventBridge costs a European developer or small business.
Compute Costs (Lower Than You Think)
For a lightweight daily Python script, Lambda is nearly free. The AWS free tier includes 1 million requests and 400,000 GB-seconds per month. A 10-second Python script running once daily uses roughly:
365 runs/year × 10 seconds × 128MB = ~46,000 GB-seconds/year
That's well within the free tier. Lambda compute is not your cost problem.
The Hidden Costs (Higher Than You Think)
| Cost Item | Details | Monthly Estimate |
|---|---|---|
| CloudWatch Logs ingestion | $0.57/GB (EU-West-1) | €1–5 depending on log verbosity |
| CloudWatch Log storage | $0.025/GB/month | Small but accumulates |
| EventBridge | $1.00 per million events | Negligible at low volume |
| Your engineering time | Setup + ongoing maintenance | €80–150/month at typical EU rates |
| Data transfer out | €0.08–0.09/GB to internet | Relevant if fetching large payloads |
The real cost is not compute. It's complexity.
A senior developer in Berlin, Amsterdam, or London billing at €80–120/hour spends 3–5 hours initially setting up a Lambda cron job. That's €240–600 in engineering time for infrastructure that a specialised tool can replace in 5 minutes.
What You Have to Build to Run a Cron Job on AWS Lambda
Here's the full list — not the sales pitch version:
1. Write the Lambda function
def lambda_handler(event, context):
# Your logic here
return {"statusCode": 200, "body": "Done"}
2. Package your dependencies
You can't just pip install requests and deploy. Your options:
- Build a Lambda Layer with your packages
- Create a Docker container image
- Use only AWS's built-in runtime packages (very limited)
For anything beyond the standard library, you need a packaging workflow:
pip install requests pandas -t ./package/
cd package && zip -r ../deployment.zip .
cd .. && zip -g deployment.zip lambda_function.py
...and then re-upload that zip every time you update a dependency.
3. Create an EventBridge rule
The cron expression lives in EventBridge, not Lambda. You need a separate AWS console screen, a separate resource, and a trigger that points at your Lambda function.
Note: EventBridge uses its own cron syntax — cron(0 9 * * ? *) instead of standard 0 9 * * *. The ? replaces * for day-of-week when day-of-month is set. This catches everyone at least once.
4. Wire the IAM permissions
EventBridge needs a resource-based policy to invoke your Lambda function:
{
"Effect": "Allow",
"Principal": { "Service": "events.amazonaws.com" },
"Action": "lambda:InvokeFunction",
"Resource": "arn:aws:lambda:eu-west-1:123456789:function:my-cron-job",
"Condition": {
"ArnLike": {
"AWS:SourceArn": "arn:aws:events:eu-west-1:123456789:rule/my-schedule"
}
}
}
5. Set up CloudWatch Logs
Lambda logs to CloudWatch automatically, but default retention is never expires — logs accumulate indefinitely. You need to set a retention policy per log group. And CloudWatch's log viewer is notoriously difficult for debugging scripts.
6. Set up failure alerts
Lambda doesn't email you when your script fails. You need:
- A CloudWatch alarm on the Errors metric
- An SNS topic with your email subscription
- Another IAM policy connecting them
Total: 6 services, 15+ console actions, 2–4 hours of setup time — for a script that runs once per day.
A Cheaper Alternative: Purpose-Built Python Cron Hosting
LiteLambda is built specifically for this use case — running scheduled Python scripts without managing infrastructure.
Here's the same Stripe-to-Slack revenue report, deployed in 5 minutes:
import os
import stripe
import slack_sdk
def handler(event, context):
"""
Daily revenue report: fetches from Stripe, posts to Slack.
Runs every day at 09:00 UTC.
"""
stripe_client = stripe.StripeClient(os.environ.get('STRIPE_SECRET_KEY'))
charges = stripe_client.charges.list(limit=100)
total = sum(c.amount for c in charges.data) / 100
sc = slack_sdk.WebClient(os.environ.get('SLACK_BOT_TOKEN'))
sc.chat_postMessage(
channel='#revenue',
text=f"Yesterday's revenue: €{total:.2f}"
)
return {"status": "success", "revenue_eur": total}
What you get without any additional setup:
- ✅ pip packages installed automatically — just list
stripeandslack-sdk - ✅ Environment variables in a secure key-value editor
- ✅ Execution logs per run, visible immediately in the same view
- ✅ Email failure alerts built in
- ✅ Standard cron syntax —
0 9 * * *, notcron(0 9 * * ? *) - ✅ No IAM, no CloudWatch, no EventBridge
Direct Comparison
| Capability | AWS Lambda + EventBridge | LiteLambda |
|---|---|---|
| Setup time | 2–4 hours | 5 minutes |
| Dependency management | Lambda Layers or Docker | List package names |
| Cron syntax | EventBridge format cron(...) |
Standard 5-field cron |
| Execution logs | CloudWatch (separate console) | Per-run, in the same view |
| Failure alerts | SNS + alarm (manual setup) | Built-in, email included |
| AI code writing | ❌ | ✅ Built-in AI assistant |
| GDPR compliance | Configure per-service | GDPR compliant |
| Monthly pricing | ~€0 compute + your time | From €4.99/month |
The Feature That Changes Everything: AI-Assisted Script Writing
Most cron hosting platforms assume you already have a working Python script. LiteLambda includes a built-in AI assistant that writes the script for you from a plain English description.
This matters especially for European business operators who need automation but aren't deep Python developers.
You type:
"Fetch my Shopify orders from yesterday, calculate total revenue in EUR, and send me a WhatsApp message via Twilio every morning at 8 AM."
The AI produces a complete, production-ready handler:
import os
import requests
from datetime import datetime, timedelta
from twilio.rest import Client
def handler(event, context):
"""
Fetches yesterday's Shopify revenue and sends a WhatsApp summary via Twilio.
Schedule: 0 8 * * * (every day at 08:00 UTC)
"""
shop = os.environ.get('SHOPIFY_STORE')
token = os.environ.get('SHOPIFY_ACCESS_TOKEN')
yesterday = (datetime.utcnow() - timedelta(days=1)).strftime('%Y-%m-%d')
url = f"https://{shop}.myshopify.com/admin/api/2024-01/orders.json"
params = {
"created_at_min": f"{yesterday}T00:00:00Z",
"created_at_max": f"{yesterday}T23:59:59Z",
"status": "any",
"financial_status": "paid"
}
res = requests.get(url, params=params,
headers={"X-Shopify-Access-Token": token})
orders = res.json().get('orders', [])
total_eur = sum(float(o['total_price']) for o in orders)
client = Client(
os.environ.get('TWILIO_ACCOUNT_SID'),
os.environ.get('TWILIO_AUTH_TOKEN')
)
client.messages.create(
from_='whatsapp:+14155238886',
to=f"whatsapp:{os.environ.get('MY_PHONE')}",
body=f"Yesterday's Shopify revenue: €{total_eur:.2f} across {len(orders)} orders."
)
return {"status": "sent", "orders": len(orders), "revenue_eur": total_eur}
It also suggests the pip packages (requests, twilio) and pre-fills the cron schedule (0 8 * * *). You click Apply, then Save. The job is live.
For a European freelancer, agency, or small business, this replaces a task that would otherwise require a Python developer or a long afternoon fighting AWS documentation.
The EU Data & GDPR Angle
European developers and businesses under GDPR need to think carefully about which services touch their data, where it's processed, and how long it's retained.
AWS Lambda in eu-west-1 (Ireland) or eu-central-1 (Frankfurt) keeps compute within the EU. But your CloudWatch logs, EventBridge rules, and IAM configurations each have their own data retention settings — settings you need to configure and audit separately to meet your specific GDPR obligations.
With LiteLambda:
- Execution logs are retained for a configurable period and then purged
- Your code and environment variables are encrypted at rest
- You're not dispersing execution data across five different AWS services, each requiring separate compliance checks
For small teams, fewer services to audit often means better compliance in practice.
Pricing Comparison: Real European Numbers
Scenario: A Berlin-based e-commerce operator wants to run 3 automated Python scripts:
1. Daily Shopify revenue report → Slack (once per day)
2. Weekly inventory sync from supplier API → database (every Monday)
3. Hourly competitor price tracker (every hour, 24 checks/day)
AWS Lambda True Cost
| Item | Cost |
|---|---|
| Lambda compute | ~€0 (within free tier) |
| CloudWatch Logs (3 scripts × moderate volume) | €3–8/month |
| EventBridge (3 rules) | Negligible |
| Initial engineering setup (8–12 hrs × €80/hr) | €640–960 (one-time) |
| Monthly maintenance (1–2 hrs/month × €80/hr) | €80–160/month |
| True first-year cost | €1,600–3,000 |
LiteLambda True Cost
| Item | Cost |
|---|---|
| LiteLambda Starter plan | €4.99/month |
| Setup time with AI assistant | 30–45 minutes |
| Ongoing maintenance | Near zero — platform handles uptime |
| True first-year cost | ~€60 compute + €30–60 setup time = ~€90–120 |
The difference is not a percentage improvement. It's an order of magnitude. For a small business, that delta is the difference between automating 3 workflows and automating 30.
How to Migrate From AWS Lambda to LiteLambda in 10 Minutes
If you already have Lambda functions running on a schedule, the migration is straightforward.
Step 1: Copy your handler code
LiteLambda uses the same handler(event, context) signature — just rename lambda_handler:
# Before — AWS Lambda
def lambda_handler(event, context):
result = run_my_logic()
return {"statusCode": 200, "body": json.dumps(result)}
# After — LiteLambda (rename only, code unchanged)
def handler(event, context):
result = run_my_logic()
return result # Return data directly, no statusCode wrapper needed
Step 2: Move your packages
In LiteLambda, go to the Packages tab and list your dependencies by name:
requests==2.31.0
pandas==2.1.0
stripe==7.0.0
LiteLambda installs them automatically before the first run. No Lambda Layers, no zip files, no Docker.
Step 3: Move your environment variables
In Lambda: Configuration → Environment variables
In LiteLambda: Env Vars tab — a simple key-value editor
Step 4: Convert your cron expression
EventBridge uses its own format. Standard cron (used by LiteLambda and every other cron tool) is simpler:
| EventBridge | LiteLambda (standard cron) | Meaning |
|---|---|---|
cron(0 9 * * ? *) |
0 9 * * * |
Every day at 09:00 UTC |
cron(0/30 * * * ? *) |
*/30 * * * * |
Every 30 minutes |
cron(0 8 ? * MON *) |
0 8 * * 1 |
Every Monday at 08:00 UTC |
cron(0 9 1 * ? *) |
0 9 1 * * |
First of every month at 09:00 |
Step 5: Test, activate, and disable Lambda
Click Run Manually in LiteLambda — execution logs appear immediately. Once confirmed working, activate the schedule and disable your EventBridge rule. Delete the Lambda function when you're confident.
When to Keep AWS Lambda
Lambda is the right choice when:
- Your function needs low-latency access to other AWS services inside a VPC (RDS, DynamoDB, S3, SQS)
- You're processing high-volume event streams (thousands of invocations per day) where unit compute costs matter
- Your team has existing AWS infrastructure and you're building one more component of a larger AWS-native system
- You need execution timeouts beyond 5 minutes (Lambda supports up to 15 minutes)
For standalone scheduled Python scripts that don't need AWS-native service integration, the complexity is not worth the marginal cost savings.
Summary
Running scheduled Python scripts on AWS Lambda is technically possible, but it's engineered for microservices and event-driven architectures — not for the straightforward use case of "run this Python script every morning."
For European developers and small businesses, the setup complexity and ongoing maintenance cost of Lambda far outweighs any compute savings. A specialised tool like LiteLambda removes the infrastructure entirely and adds an AI assistant that can write the script from a plain English description.
The math is simple: 45 minutes of setup time versus 8–12 hours. €4.99/month versus hundreds of euros in developer time.
Migrate from AWS Lambda in 10 minutes →
Comparing your options? See our full comparison of Python cron job hosting services and our migration guide from Heroku Scheduler.