How to deploy lambda created with CDKTF using terraform?

I am trying to import/use CDKTF code into my existing Terraform project.

I am trying to implement Lambda with API gateway using typescript, and I figured out that working with typescript lambda + terraform is difficult.

So I am thinking to use CDKTF to generate zip, compiled TS code into JSON format and use that cdktf.json into may existing terraform code.

For simple CDKTF code like creating s3 bucket cdktf.json works with terraform deploy.

But when I am trying to deploy cdktf.json generate form this tutorial it fails

It is failing at this source unable to load "assets/lambda-asset/XXXXXXX8908/archive.zip": open assets/lambda-asset/XXXXXXXX12344XXX/archive.zip: no such file or directory. Is it possible to extract zip file created from TerraformAsset or is there a solution to use plain HCL without any CDKTF?

"aws_s3_object": {
      "lambda-archive": {
        "//": {
          "metadata": {
            "path": "lambda-hello-world/lambda-archive",
            "uniqueId": "lambda-archive"
          }
        },
        "bucket": "${aws_s3_bucket.bucket.bucket}",
        "key": "v0.0.2/archive.zip",
        "source": "assets/lambda-asset/ABCDEDGHIJKLAMN000006786986/archive.zip"
      }
    },

If I’m understanding correctly you are running cdktf synth, but then deploying directly with the terraform cli.
That’s definitely possible. One thing to watch out for is the path of execution. When you use cdktf deploy, the terraform cli is invoked from the the cdktf.out/stacks/<stackname> directory. This means that the assets are in a directory directly at the root of execution. If you invoke from somewhere else, then you’ll need to either alter the output or copy the assets directory. You could probably modify the source argument to be prefixed by a path expansion or the abspath function to make it work in other locations.