You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/docs/2.14/scalers/aws-cloudwatch.md
-7
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,6 @@ triggers:
26
26
metricName: ApproximateNumberOfMessagesVisible
27
27
targetMetricValue: "2.1"
28
28
minMetricValue: "1.5"
29
-
# Optional: ignoreNullValues
30
-
ignoreNullValues: false
31
29
# Required: region
32
30
awsRegion: "eu-west-1"
33
31
# Optional: AWS endpoint url
@@ -61,7 +59,6 @@ triggers:
61
59
- `expression`- Supports query with [expression](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-metrics-insights-querylanguage.html) (Optional, Required when `dimensionName` & `dimensionValue` are not specified)
62
60
63
61
- `identityOwner` - Receive permissions for CloudWatch via Pod Identity or from the KEDA operator itself (see below). (DEPRECATED: This parameter is deprecated as of KEDA v2.13 and will be removed in version `3`, Values: `pod`, `operator`, Default: `pod`, Optional, This field only applies for `aws-eks` and `aws-kiam` authentications)
64
-
65
62
> When `identityOwner` set to `operator` - the only requirement is that the KEDA operator has the correct IAM permissions on the CloudWatch. Additional Authentication Parameters are not required.
66
63
67
64
- `metricCollectionTime` - How long in the past (seconds) should the scaler check AWS Cloudwatch. Used to define **StartTime** ([official documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html)). The value of `metricCollectionTime` must be greater than the `metricStatPeriod`, providing a value which is a multiple of the `metricStatPeriod` can improve performance on fetching data from Cloudwatch. In practice setting `metricCollectionTime` 2-to-3 times more than the `metricStatPeriod` value can make sure the scaler is able to get data points back from Cloudwatch, the scaler will always use the most up-to-date datapoint if more datapoints are returned. (Default: `300`, Optional)
@@ -70,10 +67,6 @@ triggers:
70
67
- `metricUnit`- Which unit to be used by the query. Used to define **Unit** ([official documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Unit)). (Default: `none`, Optional)
71
68
- `metricEndTimeOffset` - How long in seconds to offset the **EndTime** ([official documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html)). Due to the eventual consistency model which is used by Cloudwatch, the latest datapoint one can get from Cloudwatch might not be accurate. The `metricEndTimeOffset` config provides a way to skip the most recent datapoint if needed. (Default: `0`, Optional)
72
69
- `minMetricValue`- Returned value in case of empty response from cloudwatch. (Default: 0, This value can be a float)
73
-
- `ignoreNullValues`- Describes the behaviour when the metric query returns no metric values in the response. If set to `true`, the scaler will scale the workload based on the `minMetricValue` provided. If set to `false`, the scaler will return an error and not adjust the scale of the workload. When set to `false` this will take precedence over `minMetricValue`. (Default: `true`, Optional)
74
-
75
-
> Both `minMetricValue` and `ignoreNullValues` are used to handle the case when the metric query returns no metric values in the response. `minMetricValue` will scale the workload based on the value provided, while `ignoreNullValues`, if false, will return an error and not adjust the scale of the workload.
76
-
77
70
- `targetMetricValue`- Target value for the metric. (Default: 0, This value can be a float)
78
71
- `activationTargetMetricValue`- Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
Copy file name to clipboardexpand all lines: content/docs/2.15/scalers/aws-cloudwatch.md
+49-2
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ triggers:
26
26
metricName: ApproximateNumberOfMessagesVisible
27
27
targetMetricValue: "2.1"
28
28
minMetricValue: "1.5"
29
+
# Optional: ignoreNullValues
30
+
ignoreNullValues: false
29
31
# Required: region
30
32
awsRegion: "eu-west-1"
31
33
# Optional: AWS endpoint url
@@ -58,7 +60,7 @@ triggers:
58
60
- `dimensionValue` - Supports specifying multiple dimension values by using ";" as a separator i.e. dimensionValue: queue1;queue2 (Optional, Required when `expression` is not specified)
59
61
- `expression`- Supports query with [expression](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-metrics-insights-querylanguage.html) (Optional, Required when `dimensionName` & `dimensionValue` are not specified)
60
62
61
-
- `identityOwner` - Receive permissions for CloudWatch via Pod Identity or from the KEDA operator itself (see below). (DEPRECATED: This parameter is deprecated as of KEDA v2.13 and will be removed in version `3`, Values: `pod`, `operator`, Default: `pod`, Optional, This field only applies for `aws-eks` authentication)
63
+
- `identityOwner` - Receive permissions for CloudWatch via Pod Identity or from the KEDA operator itself (see below). (DEPRECATED: This parameter is deprecated as of KEDA v2.13 and will be removed in version `3`, Values: `pod`, `operator`, Default: `pod`, Optional, This field only applies for `aws-eks` and `aws-kiam` authentications)
62
64
63
65
> When `identityOwner` set to `operator` - the only requirement is that the KEDA operator has the correct IAM permissions on the CloudWatch. Additional Authentication Parameters are not required.
64
66
@@ -68,6 +70,10 @@ triggers:
68
70
- `metricUnit`- Which unit to be used by the query. Used to define **Unit** ([official documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Unit)). (Default: `none`, Optional)
69
71
- `metricEndTimeOffset` - How long in seconds to offset the **EndTime** ([official documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html)). Due to the eventual consistency model which is used by Cloudwatch, the latest datapoint one can get from Cloudwatch might not be accurate. The `metricEndTimeOffset` config provides a way to skip the most recent datapoint if needed. (Default: `0`, Optional)
70
72
- `minMetricValue`- Returned value in case of empty response from cloudwatch. (Default: 0, This value can be a float)
73
+
- `ignoreNullValues`- Describes the behaviour when the metric query returns no metric values in the response. If set to `true`, the scaler will scale the workload based on the `minMetricValue` provided. If set to `false`, the scaler will return an error and not adjust the scale of the workload. When set to `false` this will take precedence over `minMetricValue`. (Default: `true`, Optional)
74
+
75
+
> Both `minMetricValue` and `ignoreNullValues` are used to handle the case when the metric query returns no metric values in the response from AWS CloudWatch. `minMetricValue` will scale the workload based on the value provided, while `ignoreNullValues`, if false, will return an error and not adjust the scale of the workload.
76
+
71
77
- `targetMetricValue`- Target value for the metric. (Default: 0, This value can be a float)
72
78
- `activationTargetMetricValue`- Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
73
79
@@ -81,7 +87,7 @@ You can use `TriggerAuthentication` CRD to configure authentication by providing
81
87
82
88
**Role based authentication:**
83
89
84
-
- `awsRoleArn`- Amazon Resource Names (ARNs) uniquely identify AWS resource. (This field is deprecated and only applies for `aws-eks` authentication, for `aws` is set in the auth)
90
+
- `awsRoleArn`- Amazon Resource Names (ARNs) uniquely identify AWS resource. (This field is deprecated only applies for `aws-eks` and `aws-kiam` authentications, for `aws` is set in the auth)
85
91
86
92
**Credential based authentication:**
87
93
@@ -132,6 +138,47 @@ This can be further scoped to specific namespaces, by using the `cloudwatch:name
132
138
133
139
For more information, see the [AWS CloudWatch IAM documentation](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncloudwatch.html).
134
140
141
+
### IAM Permissions
142
+
143
+
The user or role used to authenticate with AWS CloudWatch must have the `cloudwatch:GetMetricData` permissions. The following is an example IAM policy that grants the necessary permissions to read data from CloudWatch:
144
+
145
+
```json
146
+
{
147
+
"Version": "2012-10-17",
148
+
"Statement": [
149
+
{
150
+
"Sid": "AllowCloudWatchGetMetricData",
151
+
"Effect": "Allow",
152
+
"Action": "cloudwatch:GetMetricData",
153
+
"Resource": "*"
154
+
}
155
+
]
156
+
}
157
+
```
158
+
159
+
This can be further scoped to specific namespaces, by using the `cloudwatch:namespace` condition key. For example, to only allow access to the `AWS/EC2` metric namespace:
160
+
161
+
```json
162
+
{
163
+
"Version": "2012-10-17",
164
+
"Statement": [
165
+
{
166
+
"Sid": "AllowCloudWatchGetMetricData",
167
+
"Effect": "Allow",
168
+
"Action": "cloudwatch:GetMetricData",
169
+
"Resource": "*",
170
+
"Condition": {
171
+
"StringEquals": {
172
+
"cloudwatch:namespace": "AWS/EC2"
173
+
}
174
+
}
175
+
}
176
+
]
177
+
}
178
+
```
179
+
180
+
For more information, see the [AWS CloudWatch IAM documentation](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncloudwatch.html).
0 commit comments