I am trying to use aws cdk synth with jenkins but i get an error saying cdk: Permission denied
Error: cdk:permission denied
I am running the aws cdk synth command directly on the jenkins pipeline script like this: cdk synth
I have given jenkins sudo permissions but it still doesnt work. I have tried putting the command in a bash script but then i get bash permission denied
CodePudding user response:
I added jenkins to the ubuntu group and vice versa then restarted jenkins. After this, cdk synth was working properly. I had ran these commands before but didnt restart jenkins.
$ usermod -a -G ubuntu jenkins
$ usermod -a -G jenkins ubuntu