GetCanaryRuns
Source:
src/AWS/Synthetics/GetCanaryRuns.ts
Runtime binding for synthetics:GetCanaryRuns — list the run results
(status, timeline, artifact location) of the bound Canary; the
canary name is injected automatically.
Provide Synthetics.GetCanaryRunsHttp on the hosting Lambda Function to
satisfy the requirement.
Reading Canary Runs
Section titled “Reading Canary Runs”// init — grants synthetics:GetCanaryRuns on the canaryconst getCanaryRuns = yield* AWS.Synthetics.GetCanaryRuns(canary);
// runtimeconst { CanaryRuns } = yield* getCanaryRuns({ MaxResults: 10 });const failed = CanaryRuns?.filter((run) => run.Status?.State === "FAILED");