pry0cc / axiom

The dynamic infrastructure framework for everybody! Distribute the workload of many different scanning tools with ease, including nmap, ffuf, masscan, nuclei, meg and many more!
MIT License
4k stars 622 forks source link

AWS :: Axiom Fleet "Init” Fails —Single Region #632

Closed Hax0rG1rl closed 1 year ago

Hax0rG1rl commented 1 year ago

Hi,

Trying to spawn several instances in a single AWS region, nothing fancy, I get this error:

An error occurred (InvalidKeyPair.NotFound) when calling the RunInstances operation: The key pair 'axiom' does not exist

This is a fresh install, axiom version is from Oct 15, 2022.

Any ideas about how this can be resolved?

Thanks!

mrtnrdl commented 1 year ago

Same issue here - building the image right before works fine though.

mrtnrdl commented 1 year ago

I'm pretty sure the root cause of the error is the following line in providers/aws-functions.zsh:

aws ec2 run-instances --image-id "$image_id" --count 1 --instance-type --region "$region" "$size" --key-name axiom --security-groups axiom --tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=$name}]" 2>&1 >> /dev/null

The keys name in the aws config is not "axiom" - it's some random characters... So I'm going to try and see where it is used in the axiom-build and adapt that over there.

0xtavian commented 1 year ago

This has been fixed. Lmk if you run into any issues.

mrtnrdl commented 1 year ago

Works like a charm. Thanks mate <3