Skip to content

Instantly share code, notes, and snippets.

@adhorn
Last active August 19, 2019 14:06
Show Gist options
  • Save adhorn/1ea31884d4f19db8f579aa4ed72e0c74 to your computer and use it in GitHub Desktop.
Save adhorn/1ea31884d4f19db8f579aa4ed72e0c74 to your computer and use it in GitHub Desktop.
CPU stress document for SSM
---
schemaVersion: '2.2'
description: Run a CPU stress on an instance
parameters:
duration:
type: String
description: 'Specify the duration - in seconds - of the CPU burn. (Required) '
default: "60"
cpu:
type: String
description: 'Specify the number of CPU stressors to use (default all)'
default: "0"
mainSteps:
- action: aws:runShellScript
name: ChaosCPUAttack
inputs:
runCommand:
- stress-ng --cpu {{ cpu }} --cpu-method matrixprod -t {{ duration }}s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment