Skip to content

Instantly share code, notes, and snippets.

@gcanales75
Created July 4, 2017 23:06
Show Gist options
  • Select an option

  • Save gcanales75/a4f5f190fd1962348afaea98375f3628 to your computer and use it in GitHub Desktop.

Select an option

Save gcanales75/a4f5f190fd1962348afaea98375f3628 to your computer and use it in GitHub Desktop.
Crea alarma CW para monitorear espcio consumido en Bucket S3
$topicARN = "arn:aws:sns:us-east-1:123445-miARN"
Write-CWMetricAlarm `
-AlarmName "mi_alarma" `
-Namespace "AWS/S3" `
-MetricName BucketSizeBytes `
-ComparisonOperator GreaterThanOrEqualToThreshold `
-EvaluationPeriod 1 `
-Period 86400 `
-Statistic Maximum `
-Threshold 1073741824 `
-Dimension @{ Name="BucketName"; Value="nombre_de_mi_bucket" } `
-AlarmAction $topicARN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment