change keyname to avoid name collisions
@@ -319,7 +319,7 @@ func (p *ec2Provider) Start(ctx gocontext.Context, startAttributes *StartAttribu
svc := ec2.New(p.awsSession)
keyPairInput := &ec2.CreateKeyPairInput{
- KeyName: aws.String(hostName),
+ KeyName: aws.String(fmt.Sprintf("%s-%d", hostName, time.Now().Unix())),
}
keyResp, err := svc.CreateKeyPair(keyPairInput)
