Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CDK deploy takes seconds locally and >5 mins in CI

When I run a CDK deploy locally and there is nothing to update it performs the task in a matter of seconds but the same thing in a CI pipeline takes >5 mins, seemingly updating every resource in the process even though nothing has changed.

I presumed this was due to caching in the cdk.out folder so I tried adding that to my CI cache and also deleting it locally to see if it would slow down my local deploy but it made no difference.

This has lead me to believe that there must be another cache somewhere on my machine that it refers to but I can't for the life of me figure it out.

For reference my CI environment is GitHub actions Ubuntu and my local machine is Macos Big Sur

like image 762
bert Avatar asked Oct 24 '25 05:10

bert


1 Answers

Turns out I'm an idiot. The reason was because every build in CI increments an AWS tag which is a version number. Because of this every resource in the stack was having its tags updated every time I deployed, hence the long waits.

like image 108
bert Avatar answered Oct 25 '25 20:10

bert