Skip to content

Instantly share code, notes, and snippets.

@froop
Created April 11, 2021 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save froop/298076aabc59df80f242ca499dcf4fc2 to your computer and use it in GitHub Desktop.
Save froop/298076aabc59df80f242ca499dcf4fc2 to your computer and use it in GitHub Desktop.
[AWS][Bash] cloudwatch get-metric-statistics
aws cloudwatch get-metric-statistics --namespace AWS/EC2 --metric-name CPUUtilization --start-time $(date +"%Y-%m-%dT%H:%M:%S+09:00" --date='15 minutes ago') --end-time $(date +"%Y-%m-%dT%H:%M:%S+09:00") --period 300 --statistics Average --dimensions Name=InstanceId,Value=${EC2_INSTANCE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment