Show HN: Stelvio – Ship Python to AWS
Source: Hacker News
Infrastructure as Python. No YAML. Smart defaults.
Full control.
pip install stelvio
Deploy Python functions to AWS Lambda
from stelvio.aws.function import Function
from stelvio.aws.s3 import Bucket
bucket = Bucket("reports")
# Link grants permissions automatically
Function(
"processor",
handler="functions/process.handler",
links=[bucket],
)
Learn more about Lambda functions →
Schedule Lambda functions
from stelvio.aws.cron import Cron
Cron(
"hourly-cleanup",
"rate(1 hour)",
"functions/cleanup.handler",
)
Cron(
"daily-report",
"cron(0 9 * * ? *)",
"functions/report.handler",
)
Learn more about Event scheduling →
Securely store data with S3 Buckets
from stelvio.aws.s3 import Bucket
# Create a bucket that triggers a function on new uploads
uploads = Bucket("user-uploads")
uploads.notify(
"functions/process_upload.handler",
events=["s3:ObjectCreated:*"],
)
Create DynamoDB tables with automatic permissions
from stelvio.aws.dynamo_db import DynamoTable
from stelvio.aws.function import Function
table = DynamoTable(
name="users",
partition_key="user_id",
sort_key="created_at",
)
Function(
"user-handler",
handler="functions/user.handler",
links=[table],
)
Decouple services with SQS queues and SNS topics
from stelvio.aws.queue import Queue
from stelvio.aws.topic import Topic
orders = Queue("orders")
orders.subscribe(
"processor",
"functions/process_order.handler",
)
alerts = Topic("alerts")
alerts.subscribe(
"notifier",
"functions/send_alert.handler",
)
Learn more about SQS Queues →
Learn more about SNS Topics →
Send high‑volume emails with Amazon SES
from stelvio.aws.email import Email
from stelvio.aws.function import Function
mailer = Email(
"support-email",
"support@example.com",
)
Function(
"sender",
handler="functions/send.handler",
links=[mailer],
)
Define REST APIs with API Gateway
from stelvio.aws.apigateway import Api
api = Api(
"payment-api",
domain_name="api.example.com",
)
api.route("POST", "/charge", handler="functions/charge.post")
api.route("GET", "/history", handler="functions/history.get")
Learn more about API Gateway →
Connect resources to custom domains (automatic SSL)
app = StelvioApp(
"my-app",
dns=CloudflareDns("your-cloudflare-zone-id")
# other configurations...
)
Combine multiple resources under one custom domain with a Router
domain_name = "example.com"
bucket = Bucket("static-files-bucket")
api = Api("my-api")
api.route("GET", "/api", "functions/hello.handler")
router = Router("router-example", custom_domain=domain_name)
router.route("/files", bucket)
router.route("/api", api)
Ready to ship Python to AWS?
Start building with Stelvio and let Python do the heavy lifting.
See Stelvio in Action
Watch how Stelvio bridges the gap between simple scripting and complex infrastructure. Build serverless applications with the language you love.
✨ Features
| 🐍 Pure Python | No new language to learn. If you know Python, you know Stelvio. Your IDE, linter, and type‑checker all just work. |
| ⚡ Smart Defaults | Sensible configurations out of the box. Simple things stay simple; add configuration only when you need it. |
| 🔗 Automated Permissions | Connect functions to databases with a single line. IAM policies and environment variables are configured automatically – we call it linking. |
| 🔄 Live Dev Mode | stlv dev runs your Lambda code locally while the infrastructure stays in AWS. No redeploy on every change. |
| 🎛️ Full Control | Override any default when you need to. Access underlying Pulumi resources for complete customization. |
| 📖 Open Source | Apache 2.0 licensed. Free forever. Contribute, fork, or self‑host with confidence. |
Ready to try it?
Run stlv dev and see the magic happen locally, then deploy with confidence when you’re ready.
Ready to ship?
Get your first Lambda function deployed in under 5 minutes.