Comment

Comment by michal-stlv

I guess this question is not aimed at me as I'm not OP but I'll try to answer as the author of stelvio. I use CDK at my day job every day.

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.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton