Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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-*"] },
{ name: "virtualization-type", values: ["hvm"] },
],
mostRecent: true,
owners: ["099720109477"], // Canonical
}));
const instance = new aws.ec2.Instance("web", {
ami: ubuntu.apply(ubuntu => ubuntu.id),
instanceType: "t2.micro",
tags: {
Name: "HelloWorld",
},