← AWS DevOps Engineer Professional: operations and delivery
07 / 24 · 105 MIN

Events, incidents, and replay

Recover pending work while controlling effects.

Concept and mechanism

An event-driven integration needs to distinguish delivery from business processing. EventBridge retries eligible failures with time and count limits. The default policy allows up to 24 hours and 185 attempts; it is not a promise of unlimited functional execution.

Certain errors, such as missing permission, can go directly to a DLQ without retries. Read error metadata before assuming the counter is wrong. For rule DLQs, use SQS standard in the same Region and configure the policy permitting delivery.

A queue created through the API does not guarantee that authorization is correct. Also observe failures to send to the DLQ itself.

Guided application

After correcting integration, accumulated work still needs recovery. Identify effects already applied, including through an alternative procedure, and use idempotency identifiers and reconciliation. Replay a bounded batch, observe results, and expand only with evidence.

A DLQ retains messages; it does not eliminate duplicates or automatically replay all business work. During investigation, build a timeline of changes, traffic, metrics, and traces. Latency after a release is a hypothesis, not isolated proof of cause.

Automatic remediation should have stop conditions: if repeated restarts worsen impact, contain execution and escalate with evidence.

Define the business occurrence

A fictional process must handle one batch per business day. Before writing cron, define time zone, batch identity, deadline, dependencies, and handling of an absent occurrence. EventBridge Scheduler has sixty-second invocation precision; that does not guarantee work completion within that minute.

A flexible window disperses calls within the selected interval and can be unsuitable when another process expects a result shortly after nominal time. Orchestrate dependencies from observed results or an explicit availability contract. Record planned time, invocation attempt, actual start, and functional completion separately.

Those timestamps help distinguish scheduling delay, slow execution, and consumer failure, supporting a precise handover rather than a single ambiguous status.

Rehearse clock changes and lifecycle

A cron schedule in a local zone can point to a nonexistent time during clock advance. That date’s occurrence is skipped. During rollback, repeated local time does not create two cron occurrences; this calendar behavior does not guarantee exactly-once business effects.

A rate using days instead represents a twenty-four-hour duration, which is not always the interval between the same local time on consecutive days. Choose semantics matching the requirement. For at schedules, StartDate and EndDate do not replace the one-time expression or explicit disabling.

One-time schedules that still exist continue counting toward quota after execution, so lifecycle needs cleanup and separate evidence of business processing.

Separate delivery failure and batch recovery

Configure retries and a DLQ appropriate to target and deadline. Scheduler DLQ uses SQS standard and requires send authorization in the execution role; consumer read permission does not fix that path. Failure content helps diagnose invocation but does not itself establish final business-operation outcome.

In the clock-change case, a calendar-skipped occurrence requires batch identification and recovery without assuming a corresponding invocation-failure event. Before repeating, inspect effects already applied, stable identity, and reconciliation.

Recovery should explain which instructions were processed, which remain outstanding, and who validates closure. A transport status and a completed business batch are separate pieces of evidence that must be connected.

Make approval enforceable

In an Automation runbook, the approver list defines who may decide, while MinRequiredApprovals defines how many approvals are needed. Omitting that parameter uses a minimum of one even if several names are listed. Align timeout and failure handling with the change window: the seven-day default does not extend a two-hour internal authorization.

Revalidate identity, scope, and validity before applying the action. aws:approve does not support Automation’s multi-account and Region mode; if changes are distributed, place the decision at a supported orchestration boundary. Approval messages should present effect and resource unambiguously so a reviewer can make an informed decision rather than approve an unexplained technical identifier.

Observe state and bound scripts

After starting an asynchronous change, a fixed wait does not demonstrate completion. Use a property-wait action when the next step needs observed state, with explicit timeout and failure path. JSONPath should select the right resource’s property; a list converted to text or any HTTP 200 response does not prove equality with the desired value.

When custom code is needed, account for aws:executeScript limits: each action runs for at most ten minutes and does not provide automatic throttling retry. Code or its client must handle bounded repetition without hiding failures or duplicating effects.

For long work, separate starting, observing, and validating through orchestration suited to the duration. If the script calls AWS APIs or sends output to CloudWatch Logs, configure the required service role with appropriate trust and permissions. The identity starting the runbook does not replace that requirement.

Exercise: authorize an identified occurrence

The local model receives a batch identifier, principal decisions, internal quorum, and time validity. It implements neither Scheduler nor aws:approve. It distinguishes an already completed occurrence, insufficient approval, and expired authorization before preparing work.

Real persistence needs concurrency protection; checking an in-memory set does not make the following action atomic. Run the cases and add a scenario where two workers attempt the same batch. Describe the reservation or conditional write required and how to reconcile an effect applied without acknowledgement.

Finish with a shift-handover message identifying batch, decision, evidence, and next owner. This links technical retry behavior with the operational responsibility to avoid duplicate business effects.


# Original local policy exercise; not Scheduler, aws:approve, or an atomic deduplication store.
def plan_occurrence(batch_id, completed, decisions, allowed, quorum, now, expires):
    if not batch_id or quorum < 1 or quorum > len(allowed):
        raise ValueError("invalid occurrence or quorum")
    if batch_id in completed:
        return "already completed: reconcile evidence"
    if now >= expires:
        return "hold: authorization expired"
    approved = {principal for principal, decision in decisions.items()
                if principal in allowed and decision == "approve"}
    if len(approved) < quorum:
        return "hold: insufficient approval"
    return "prepare: reserve identity atomically and revalidate before effect"

allowed = {"operator-a", "operator-b", "operator-c"}
approvals = {"operator-a": "approve", "operator-b": "approve"}
assert plan_occurrence("batch-7", set(), approvals, allowed, 2, 10, 20).startswith("prepare")
assert plan_occurrence("batch-7", {"batch-7"}, approvals, allowed, 2, 10, 20).startswith("already completed")
assert plan_occurrence("batch-7", set(), approvals, allowed, 2, 20, 20) == "hold: authorization expired"
assert plan_occurrence("batch-7", set(), {"operator-a": "approve", "outsider": "approve"}, allowed, 2, 10, 20) == "hold: insufficient approval"
# An approval count alone is an internal exercise policy, not all AWS rejection semantics.
IN PRACTICE

Fixing permission resolves the delivery path. Retained movements need comparison with work already handled manually.

Common pitfalls

Retry as guarantee; DLQ as exactly once; technical fix as closure; correlation as root cause.

Related topics: Security and operational evidence · Pipeline, artifacts, and identity

Take this idea with you

Close the incident when service and pending work are reconciled.

Create account

References

AWS is a trademark of Amazon.com, Inc. or its affiliates. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by AWS. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.