DescribeCanariesLastRun
Source:
src/AWS/Synthetics/DescribeCanariesLastRun.ts
Runtime binding for synthetics:DescribeCanariesLastRun — read the most
recent run of every canary in the account (optionally filtered by
Names), e.g. to render a fleet-wide status page.
Provide Synthetics.DescribeCanariesLastRunHttp on the hosting Lambda
Function to satisfy the requirement.
Reading Canary Status
Section titled “Reading Canary Status”// init — grants synthetics:DescribeCanariesLastRunconst describeCanariesLastRun = yield* AWS.Synthetics.DescribeCanariesLastRun();
// runtimeconst { CanariesLastRun } = yield* describeCanariesLastRun();const failing = CanariesLastRun?.filter( (c) => c.LastRun?.Status?.State === "FAILED",);