Skip to content

StartCanary

Source: src/AWS/Synthetics/StartCanary.ts

Runtime binding for synthetics:StartCanary — start the bound Canary running on its configured schedule (e.g. trigger an on-demand smoke test after a deployment); the canary name is injected automatically.

Provide Synthetics.StartCanaryHttp on the hosting Lambda Function to satisfy the requirement.

// init — grants synthetics:StartCanary on the canary
const startCanary = yield* AWS.Synthetics.StartCanary(canary);
// runtime — a ConflictException means it is already starting/running
yield* startCanary().pipe(
Effect.catchTag("ConflictException", () => Effect.void),
);