This message was deleted.
# aws
s
This message was deleted.
m
Have you tried something like a prefix?
This dimension filters metrics configurations that you specify for the request metrics on a bucket. When you create a metrics configuration, you specify a filter ID (for example, a prefix, a tag, or an access point). For more information, see Creating a metrics configuration.
To request metrics for the entire bucket, create a metrics configuration without a filter.
e
my bucketMetrics does not specify a filter, however a filter Id is created that only has the criteria of entire bucket. and the alarm does not get data in cloudwatch unless a filterId is specified
m
have you tried
.
or
/
?
e
the metrics get created. i can see them in the s3 console, however the alarm wont pick up the data without the filterId, however i dont see any way to get it from the BucketMetric object
m
Have you tried using
bucketMetrics.filter
?
Do you even need the dimensions on the alarm if the metric is for a single bucket?
e
bucketMetrics.filter
is just the definition of the filter, does not give the FilterId
the alarm at the very least needs the BucketName dimension otherwise it would have no link to the bucket at all
m
Ahh yes, sorry, I'm using awsx and alarms a bit differently
e
The alarm as is just sits in a state of "Insufficient data", however if i manually create the alarm in the cloudwatch console it wont let me not specify the filter id
which i can see does exist as was created by pulumi, just does not seem to be exposed
m
If you can get it with the aws sdk, you can use
aws.sdk
directly within pulumi to get that ID until the behavior is added to the provider. Might want to open an issue for that.
What is the filter id when you do it in the console?
e
to enable requests metrics you must create a filter, you can give it whatever name you want then just scope to entire bucket. in the case of the auto generated pulumi one it uses the same resource name as BucketMetric with a hash appended to it
m
oh, but it's different than
bucketMetric.id
?
e
ok, i looks likte bucketMetrics.name is being used as the filter id, let me try that
m
perfect!
e
deployment is running, will keep you posted. thank you for your help!
👍 1
That worked
🎉 1