I would like to know if its possible to do something like this:
- Do a CDK synth locally which will create a cdk.out folder (it should have all the required files for a cdk deploy?)
- Upload the cdk.out folder to a S3 bucket
- Do a CDK deployment based on the content of the cdk.out folder in S3 using "cdk deploy" in CodeBuild
I can manage to do those three steps if I upload the full CDK project including typescript files to the S3 bucket. So my question is if there is a workaround so you only need the cdk.out folder and not the typescript scripts themselves. I mean the project has already been synthesized?
When I try to do it from cdk.out folder, it complains about needing the cdk.json file. If i upload that file with the cdk.out folder, it compains about not finding the typescript files. I think its because i do have an "app": "npx ts-node bin/app.ts" in cdk.json. I am not sure how to go about this and if its even possible.
If it is not possible, i will just have to upload the full project and not only the cdk.out folder...