Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const restApiMetric = awsx.apigateway.metrics.error5XX({ restApi });
const restApiAlarm = restApiMetric.createAlarm("alarm" + alarmIndex++, { threshold: 50, evaluationPeriods: 2 });
const table = new aws.dynamodb.Table("testtable", {
attributes: [{
name: "id",
type: "S",
}],
hashKey: "id",
readCapacity: 5,
writeCapacity: 5,
streamEnabled: true,
streamViewType: "NEW_AND_OLD_IMAGES",
});
const tableMetric = awsx.dynamodb.metrics.throttledRequests({ table });
const tableAlarm = tableMetric.createAlarm("alarm" + alarmIndex++, { threshold: 120, evaluationPeriods: 2 });
const bucket = new aws.s3.Bucket("b", {
acl: "private",
tags: {
Environment: "Dev",
Name: "My bucket",
},
});
const bucketMetric = awsx.s3.metrics.firstByteLatency({ bucket, unit: "Seconds" });
const bucketAlarm = bucketMetric.createAlarm("alarm" + alarmIndex++, { threshold: 30 , evaluationPeriods: 2 });
const ubuntu = pulumi.output(aws.getAmi({
filters: [
{ name: "name", values: ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"] },