axiom
axiom copied to clipboard
AWS: Add fleet option to use EC2 spot instances
Motivation
EC2 spot instances fit perfectly for most scanning activities. According to AWS up to 90% can be saved in costs.
Approach
The AWS CLI run-instance command in aws-function.sh L321 needs to be adapted according to the official documentation run-instances. By adding the --instance-market-options parameter and providing the configuration file accordingly, spot instances would be used instead of on-demand EC2 instances.
I'd suggest introducing a CLI flag in the fleet configuration to activate the usage of spot instances. The spot instances flag should be disabled by default.
It looks interesting. But, what happens if you have 30 instances, running for a couple of days, how are you going to manage the possibility of some instances being dropped? I know it's around 5% of the time, are you willing to test this new feature?
Spot instance interruptions occur and are non-negligible as you mention. I'd follow the "keep it simple stupid" principle here and just provide a warning in case a spot instance has been interrupted - the user should know what he is doing and should implement the interruption handling on his own.
I'd be happy to test the feature.
@1ultimat3 You didn't answer my question though.
Sorry, if my answer was not clear.
Question 1: How are you going to manage the possibility of some instances being dropped? Axiom should do absolutely nothing. The user should manage the fleet status and react on changes.
Question 2:I know it's around 5% of the time, are you willing to test this new feature? Yes, I use spot instances for engagements on a regular basis already. I'd be happy to test this new feature once implemented in axiom