aws-samples / jenkins-on-aws

MIT No Attribution
58 stars 27 forks source link

CDK updates fail when going from ec2_enabled=yes #19

Open ravidetroit opened 3 years ago

ravidetroit commented 3 years ago

ec2_enabled = yes, fargate_enabled = yes in config.ini results in The key pair 'jenkinsonaws' does not exist (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError;

cryofix commented 3 years ago

I was able to bypass this issue by creating a t2.micro instance, at the last step it asks you to create or use an existing key pair. I created a new key pair with the name jenkinsonaws. Then re-ran the cdk scripts to deploy leader. I am sure there is a better way to do this but this worked for me.

kyleflan commented 2 years ago

You can also generate a keypair by going to EC2 -> Network & Security -> Key Pairs, e.g. https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#KeyPairs: