Hacker News new | ask | show | jobs
by michal-stlv 460 days ago
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.

1 comments

CDK has high level constructs like aws_ecs_patterns.ApplicationLoadBalancedFargateService etc. It seems like the above could be implemented as high level CDK constructs. So you could make common things simpler, but have the full CDK to change details if needed.