last day (16 days later) » 

11:51 AM
0
Q: AWS CDK CodePipeline : Synth step fails

FenryrMKIIII am using AWS CDK CodePipeline construct to try to build a continuous deployment pipeline. It's new for me so really don't hesitate to fill-in any understanding gaps or misunderstangins on my side. I have a very simple backend coded in Python that is hosted on GitHub Enterprise. I have created a...

 
Well, where is your cdk.json in the repo?
 
It's not. I thought the point was : host your infra as code in one repo. Then host your code in another repo. And make them "talk" to each other during deployment through the CodePipelineSource.connection. Am I understanding that wrongly ?
 
Yes. The point is to have both in the same repo. It uses the connection to get the CDK app along with everything else. It then does a synth using the files it fetched via the connection.
 
Well I don't want to have both in the same repo. I want my application to be in repo A. Without any CDK stuff. And then I want my CDK code to be in repo B. Is that achievable ?
 
You'd have to have two sources in the pipeline, then, and then merge them into one artifact using another action. This is not the idiomatic way of using CDK pipelines, so there are no out of the box solutions.
 
11:51 AM
Ok, will look into that. To me, this seems like the right way to go because external partners develop code and we manage the architecture. Thanks for the info
 
Right. The CDK way is to have developers write their own infrastructure for the apps they deploy, using the language that's familiar to them. We're not there yet as an industry, so your use case makes sense, but that's the idea that AWS is promoting.
 
 
1 hour later…
1:13 PM
Hello. Sorry I don't have the reflex of going to chat :)
You work for AWS ?
I am trying to use the two sources technique you propose
But I am running into a weird error
 
 
4 hours later…
5:01 PM
No, I don't, but I have what I believe is a pretty good idea of what the goal of CDK is, based on reading docs, watching talks and reading AWS blogs.
 
 
4 hours later…
8:31 PM
I am still trying to debug but now on CodeBuild I get that

[Container] 2022/01/21 20:21:39 Running command npx cdk synth
npx: installed 213 in 6.196s
npx: installed 14 in 2.028s
Cannot find module 'typescript'

If by any chance you have any idea I am a taker :)
 
8:58 PM
I've never seen that one I'm afraid. Is that an npx error? What's the build environment, specifically the image?
Are you using a CodeBuildStep?
 

  last day (16 days later) »