echoing-actor-55539
11/10/2022, 8:53 PMaws.cloudwatch.MetricAlarm
however i cant see how to get the filterId from
aws.s3.BucketMetric
snip:
const bucket = new aws.s3.BucketV2(
`viz-bucket-${region}`,
{
bucketPrefix: `par-${region}-`,
forceDestroy: true
},
{provider: PriActProviders[region]}
);
const bucketMetrics = new aws.s3.BucketMetric(
`bucketMetrics-${region}`,
{bucket: bucket.bucket},
{provider: PriActProviders[region], parent: bucket}
);
// create alarm for R53 to monitor as health check
const bucketMetricAlarm = new aws.cloudwatch.MetricAlarm(
`bucketMetricAlarm-${region}`,
{
comparisonOperator: 'GreaterThanOrEqualToThreshold',
evaluationPeriods: 1,
datapointsToAlarm: 1,
treatMissingData: 'missing',
metricName: '5xxErrors',
namespace: 'AWS/S3',
unit: 'Count',
period: 60,
statistic: 'Sum',
threshold: 2,
dimensions: {
BucketName: bucket.bucket,
// FilterId: '' // ????
},
alarmDescription: 'This metric monitors s3 bucket Sum 5xx errors.'
},
{
provider: PriActProviders[region],
parent: bucket
}
);
millions-furniture-75402
11/10/2022, 9:03 PMThis 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.
echoing-actor-55539
11/10/2022, 9:10 PMmillions-furniture-75402
11/10/2022, 9:10 PM.
or /
?echoing-actor-55539
11/10/2022, 9:12 PMmillions-furniture-75402
11/10/2022, 9:22 PMbucketMetrics.filter
?echoing-actor-55539
11/10/2022, 9:24 PMbucketMetrics.filter
is just the definition of the filter, does not give the FilterIdmillions-furniture-75402
11/10/2022, 9:26 PMechoing-actor-55539
11/10/2022, 9:27 PMmillions-furniture-75402
11/10/2022, 9:30 PMaws.sdk
directly within pulumi to get that ID until the behavior is added to the provider. Might want to open an issue for that.echoing-actor-55539
11/10/2022, 9:33 PMmillions-furniture-75402
11/10/2022, 9:33 PMbucketMetric.id
?echoing-actor-55539
11/10/2022, 9:35 PMmillions-furniture-75402
11/10/2022, 9:36 PMechoing-actor-55539
11/10/2022, 9:41 PM