author of Stelvio here. Stelvio is in very early alpha far from any production use, but it's able to deploy simple API gateway, lambda and dynamo db tables with just few lines of code.
Idea is that Python devs should be able to deal with infra with Python only and minimal boilerplate - simple thing should be simple.
I'm currently working on v 0.2.0 which will have support for lambda dependencies & layers, Dynamo indexes and CORS and authorizers for API gateway.
I hope to release that in April.
For v0.3.0, stelvio will get it's own CLI too.
Any feedback is welcomed here or michal at stelvio.dev
Michal
1. state management & stages - pulumi already deals with state and has support for stages (stacks) which stelvio will need.
2. there are things outside of AWS that stelvio might support later (cloudflare, etc.)
Initially I was gonna use AWS CDK which I use at work but Pulumi seems to have faster deployment and option to use other things than AWS. (Although AWS is main focus of Stelvio at leats for now)
- aws cdk (with outputs) - https://github.com/zappa/Zappa - a python script which stitches outputs from cdk into the zappa config - extra python scripts to do a few small things post deployment. Zappa has some bugs that would be tedious to fix vs 100 lines of python.
Our product has the luxury of only being used during stock market hours and really thrives in serverless everything. We use rds serverless (v2) along with lambdas.
Some of our work is heavy and we’ll dynamically spin up an ecs container which has the hallmarks of a normal django app: redis + celery queues. We try to saturate the ecs container resources with this type of setup. After the container is done, it’ll shutdown.
I was super skeptical of this 2 years ago. 4 envs costing ~$2k/month. I would do this setup again if the product warrants windowed usage.
This looks to be exactly what I was looking for. When you are production ready this is something I'll use.
I think it's amazing the python community has like 5 half baked solutions to this problem, all of which are either abandoned, poorly monetized, or have a janky UI. I mean we have: Zappa, Chalice, Serverless, and if you attempt to do it yourself, do you use Cloudformation, CDK, or AWS SAM?
Following with interest, I think there is room for better tool in this space.
I wrote my own thinking here https://blog.stelvio.dev/why-i-am-building-stelvio/
I 'm working hard on Stelvio hoping it can become the best tool to do infra in Python.
Btw. If you'd be willing to share more details about what you want/miss in python cloud tooling could you drop me an email at michal at stelvio.dev ? I'm happy to talk. Applies to other interested people too!
The above recently did a rug pull and being developed in JS means it's not great for Python devs to maintain an open source version, so good to see alternatives in Python.
Not sure I agree with the choices on the AWS side, particularly lambda and dynamo. They seem great when you first start, but I've found the pain comes with maturing code.
As professionals, we should always plan for our code to live longer than we thought originally, and supporting new use cases not in the initial design.
A cheap always on server and a hosted RDBMS are going to go a lot further for next to the same mental overhead.
thanks! (author here not OP)
lambda/api/dynamo is just a start. I have very clear vision where i want to take this and it's not limited to lambda/api/dynamo. but these are easier to start with before you get to VPC, NAT, security groups etc. etc.
I like CDK, it was huge step forward compared to Cloud Formation, Terraform etc.
But I think infra tools can be still made better for developers. In stelvio you can do this:
table = DynamoTable(
name="todos",
fields={
"username": AttributeType.STRING,
"created": AttributeType.STRING,
},
partition_key="username",
sort_key='created'
)
api = Api("todo-api")
api.route("POST", "/todos", handler="functions/todos.post", links=[table])
api.route("GET", "/todos/{username}", handler="functions/todos.get")
It creates:- DynamoDB table
- Lambda function with IAM (policy - with permissions for dynamo table, role)
- API Gateway (resources, methods, integrations, role, stage & deployment)
- CloudWatch log groups
It would be much more code in CDK.
Stelvio aims to make common things much simpler while allowing you to change details if you need to.
- as you mentioned, seems to be abandoned
- chalice mixes infra code with app code within the file (decorators), stelvio keeps them separate
- in chalice you configure lambdas using json. I strongly believe that everything should be done in python
- chalice is limited to lambda/api/queues, stelvio aims to go further/broader
hope this explains, happy to answer any other questions